From 4a582094c28099144dac9528174ce7c0be72c0fd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 25 Oct 1998 09:11:53 +0000 Subject: Update. 1998-10-25 Ulrich Drepper * include/features.h: Define __USE_POSIS199506 is _POSIX_C_SOURCE is greater or equal than 199506L. * sysdeps/generic/bits/types.h (__fd_set): Define element as fds_bits only is __USE_XOPEN. Otherwise use __fds_bits. * sysdeps/unix/sysv/linux/alpha/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/bits/types.h: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/bits/types.h: Likewise. 1998-10-24 H.J. Lu * locale/programs/charmap.c (parse_charmap): Accept tok_string for . 1998-10-25 H.J. Lu * locale/programs/ld-ctype.c (ctype_finish): Also check . 1998-10-25 Ulrich Drepper * signal/signal.h: Include bits/sigthread.h only if __USE_POSIX199506. * sysdeps/unix/sysv/linux/bits/types.h: Include pthreadtypes.h only if __USE_POSIX199506 or __USE_UNIX98. 1998-10-24 22:34 -0400 Zack Weinberg * string/bits/string2.h: Inline strdup+friends only if __USE_MISC || __USE_GNU (prevents namespace pollution). 1998-10-24 H.J. Lu * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Protect with __USE_BSD. * sysdeps/unix/sysv/linux/i386/bits/fcntl.h (LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Likewise. * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Likewise. * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Likewise. * sysdeps/unix/sysv/linux/bits/fcntl.h (LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Likewise. 1998-10-24 H.J. Lu * libio/ioseekoff.c (_IO_seekoff): Check the valid dir value. * libio/rewind.c (rewind): Clear the error. 1998-10-24 H.J. Lu * grp/grp.h (getgrent_r, getgrgid_r, getgrnam_r): Add "__" to "buffer". 1998-10-24 H.J. Lu * sysdeps/unix/sysv/linux/alpha/bits/time.h (timeval): Protect with __need_timeval. * sysdeps/unix/sysv/linux/mips/bits/time.h (timeval): Likewise. * sysdeps/unix/sysv/linux/bits/time.h (timeval): Likewise. 1998-10-24 H.J. Lu * signal/signal.h (timespec, siginfo_t, sigwaitinfo, sigtimedwait, sigqueue): Protect with __USE_POSIX199309. 1998-10-24 H.J. Lu * time/time.h (timespec): Protect with __USE_POSIX199309 instead of __USE_POSIX. 1998-10-24 H.J. Lu * libio/fileops.c (_IO_new_file_seekoff): Always resync with the kernel file offset. * libio/oldfileops.c (_IO_old_file_seekoff): Likewise. --- string/bits/string2.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'string/bits') diff --git a/string/bits/string2.h b/string/bits/string2.h index fd431b8ece..cfbcc18aa0 100644 --- a/string/bits/string2.h +++ b/string/bits/string2.h @@ -1011,18 +1011,18 @@ __strsep_g (char **__s, __const char *__reject) #endif /* We need the memory allocation functions for inline strdup(). - Referring to stdlib.h (even minimally) is not allowed if - __STRICT_ANSI__. */ -#ifndef __STRICT_ANSI__ + Referring to stdlib.h (even minimally) is not allowed + in any of the tight standards compliant modes. */ +#if defined __USE_MISC || defined __USE_GNU -#if !defined _HAVE_STRING_ARCH_strdup || !defined _HAVE_STRING_ARCH_strndup -# define __need_malloc_and_calloc -# include -#endif +# if !defined _HAVE_STRING_ARCH_strdup || !defined _HAVE_STRING_ARCH_strndup +# define __need_malloc_and_calloc +# include +# endif -#ifndef _HAVE_STRING_ARCH_strdup +# ifndef _HAVE_STRING_ARCH_strdup -# define __strdup(s) \ +# define __strdup(s) \ (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ ? (((__const char *) (s))[0] == '\0' \ ? (char *) calloc (1, 1) \ @@ -1033,14 +1033,14 @@ __strsep_g (char **__s, __const char *__reject) __retval; })) \ : __strdup (s))) -# if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED -# define strdup(s) __strdup (s) +# if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED +# define strdup(s) __strdup (s) +# endif # endif -#endif -#ifndef _HAVE_STRING_ARCH_strndup +# ifndef _HAVE_STRING_ARCH_strndup -# define __strndup(s, n) \ +# define __strndup(s, n) \ (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ ? (((__const char *) (s))[0] == '\0' \ ? (char *) calloc (1, 1) \ @@ -1059,12 +1059,12 @@ __strsep_g (char **__s, __const char *__reject) __retval; })) \ : __strndup ((s), (n)))) -# ifdef __GNU_SOURCE -# define strndup(s, n) __strndup ((s), (n)) +# ifdef __GNU_SOURCE +# define strndup(s, n) __strndup ((s), (n)) +# endif # endif -#endif -#endif /* Strict ANSI */ +#endif /* Use misc. or use GNU. */ #undef __STRING_INLINE -- cgit v1.2.3