X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgen-uio;h=e7ef6a365caf3f0c573573e5be79800d258bb4af;hb=501a2458ede839305c0ba827e2a667d5364022b1;hp=4d09c4c3d6f0e046dc4644c7d736ee0a41ed3c64;hpb=008ec691711a3086950f7d72fd0874e6d61d9668;p=gnulib.git diff --git a/lib/gen-uio b/lib/gen-uio index 4d09c4c3d..e7ef6a365 100755 --- a/lib/gen-uio +++ b/lib/gen-uio @@ -1,26 +1,29 @@ #!/bin/sh -tmp=gen-uio.$$ -trap 'status=$?; rm -f $tmp && exit $status' 0 -trap 'exit $?' 1 2 13 15 - -cat <<\EOF +fail=0 +cat <<\EOF || fail=1 #ifndef UNLOCKED_IO_H # define UNLOCKED_IO_H 1 +# ifndef USE_UNLOCKED_IO +# define USE_UNLOCKED_IO 1 +# endif + # if USE_UNLOCKED_IO /* These are wrappers for functions/macros from GNU libc. - The standard I/O functions are thread-safe. These *_unlocked ones - are more efficient but not thread-safe. That they're not thread-safe - is fine since all these applications are single threaded. */ + The standard I/O functions are thread-safe. These *_unlocked ones are + more efficient but not thread-safe. That they're not thread-safe is + fine since all of the applications in this package are single threaded. */ EOF for f in $@; do u=`echo $f|tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` - echo "# if HAVE_${u}_UNLOCKED" - echo "# undef $f" + cat <&1; exit 1;; + echo $0: missing case for $f 2>&1; fail=1;; esac - echo "# define $f($params) ${f}_unlocked ($params)" - echo '# endif' + cat <