X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Freadtokens.c;h=9fb611db1c9c7a53d5ca86da26aa0fbe744dd660;hb=3feb3145b632af0fd4349f5685a19ec58fa0fb75;hp=438441c4e535c930571f677b2b53b17fa437570e;hpb=5838d4303c49ad4fe32f9e01a7b30c89ecddac5a;p=gnulib.git diff --git a/lib/readtokens.c b/lib/readtokens.c index 438441c4e..9fb611db1 100644 --- a/lib/readtokens.c +++ b/lib/readtokens.c @@ -32,9 +32,12 @@ #include #include -#include "unlocked-io.h" #include "xalloc.h" +#if USE_UNLOCKED_IO +# include "unlocked-io.h" +#endif + #define STREQ(a,b) ((a) == (b) || ((a) && (b) && *(a) == *(b) \ && strcmp(a, b) == 0)) @@ -96,7 +99,10 @@ readtoken (FILE *stream, saved_delim = delim; memset (isdelim, 0, sizeof isdelim); for (j = 0; j < n_delim; j++) - isdelim[(unsigned char) delim[j]] = 1; + { + unsigned char ch = delim[j]; + isdelim[ch] = 1; + } } /* FIXME: don't fool with this caching. Use strchr instead. */