about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-14 04:57:27 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-14 04:57:27 +0000
commit91bc38d09ce2df68d5f03e88df144243907437da (patch)
tree0c388abd7c33a8fb5ebe894bc2fffb8d42646798
parent8de72f531eb4d63481115e91d144731c5326bc79 (diff)
downloadglibc-91bc38d09ce2df68d5f03e88df144243907437da.tar.gz
glibc-91bc38d09ce2df68d5f03e88df144243907437da.tar.xz
glibc-91bc38d09ce2df68d5f03e88df144243907437da.zip
Update.
2000-08-12  Andreas Jaeger  <aj@suse.de>

	* include/features.h (__STDC_ISO_10646__): Define.
	Reported by Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>.

	* include/features.h (__USE_ISOC99): Define for _XOPEN_SOURCE >= 600.

	* locale/langinfo.h: Define YESSTR and NOSTR also for XPG4 (but not
	for revision 6 and up).

	* posix/sys/types.h: Define __need_timer_t and __need_clockid_t before
	including <time.h>.
	* time/time.h: Allow __need_timer_t and __need_clockid_t to be defined
	to get definitions of just these types.

	* signal/signal.h: Define thread signal handling functions also for
	POSIX95.

	* sysdeps/unix/sysv/linux/bits/types.h: Define thread types also for
	POSIX95.
	* sysdeps/unix/sysv/linux/alpha/bits/types.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/bits/types.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/types.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/types.h: Likewise.

	* sysvipc/sys/shm.h: Define pid_t for XPG.

	* wcsmbs/wchar.h: Make the various wide char string and stream
	functions available for the respective XPG versions.
-rw-r--r--CONFORMANCE113
-rw-r--r--ChangeLog30
-rw-r--r--include/features.h5
-rw-r--r--linuxthreads/ChangeLog7
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h5
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h5
-rw-r--r--locale/langinfo.h4
-rw-r--r--posix/sys/types.h2
-rw-r--r--signal/signal.h2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/types.h2
-rw-r--r--sysdeps/unix/sysv/linux/bits/types.h2
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/types.h2
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/types.h2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/types.h2
-rw-r--r--sysvipc/sys/shm.h6
-rw-r--r--time/time.h28
-rw-r--r--wcsmbs/wchar.h61
17 files changed, 136 insertions, 142 deletions
diff --git a/CONFORMANCE b/CONFORMANCE
index cf00caa4d9..8df261e401 100644
--- a/CONFORMANCE
+++ b/CONFORMANCE
@@ -13,7 +13,7 @@ The hdrchk test suite is available from the Open Group at
 
 	ftp://ftp.rdg.opengroup.org/pub/unsupported/stdtools/hdrchk/
 
-I've last run the suite on 1998-07-08 on a Linux/ix86 system with the
+I've last run the suite on 2000-08-13 on a Linux/ix86 system with the
 following results [*]:
 
 	FIPS		No reported problems
@@ -22,105 +22,28 @@ following results [*]:
 
 	XPG3		No reported problems
 
-	XPG4		The wide character I/O stuff is missing in glibc.
+	XPG4		No reported problems
 
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-*** Starting wchar.h
-Missing: extern wint_t  fgetwc();
-Missing: extern wchar_t *fgetws();
-Missing: extern wint_t  fputwc();
-Missing: extern int     fputws();
-Missing: extern wint_t  getwc();
-Missing: extern wint_t  getwchar();
-Missing: extern wint_t  putwc();
-Missing: extern wchar_t putwchar();
-Missing: extern wint_t  ungetwc();
-Missing: extern size_t  wcsftime();
-*** Completed wchar.h
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-			Beside this a problem in stdio.h is reported but
-			this is only because the scripts don't understand
-			the sometimes complex constructs in the header.
-
-	POSIX96		Same as UNIX98 [see below].
-	UNIX98		Quite a lot of problems, almost all due to limitations
-			of the Linux kernel (2.1.108):
+	POSIX96		Same as for UNIX98 (see below).
+	UNIX98		The message queue implementation is missing:
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-*** Starting mqueue.h
-Missing #include file: mqueue.h
-*** Completed mqueue.h
-*** Starting semaphore.h
-Missing: #define SEM_FAILED (-1)
-Missing: extern int  sem_close();
-Missing: extern sem_t *sem_open();
-Missing: extern int  sem_unlink();
-*** Completed semaphore.h
-*** Starting signal.h
-Missing: #define        SIGSYS  (-1)
-*** Completed signal.h
-*** Starting sys/mman.h
-Missing: extern int shm_open();
-Missing: extern int shm_unlink();
-*** Completed sys/mman.h
-*** Starting sys/stat.h
-Missing: #define        S_TYPEISMQ      (-1)
-Missing: #define        S_TYPEISSEM     (-1)
-Missing: #define        S_TYPEISSHM     (-1)
-*** Completed sys/stat.h
-*** Starting sys/types.h
-Missing: typedef        <type>  clockid_t;
-Missing: typedef        <type>  timer_t;
-*** Completed sys/types.h
-*** Starting time.h
-Missing: #define        CLOCK_REALTIME  (-1)
-Missing: #define        TIMER_ABSTIME   (-1)
-Missing: extern int     clock_getres();
-Missing: extern int     clock_gettime();
-Missing: extern int     clock_settime();
-Missing: struct itimerspec { <members> };
-Missing: extern int     timer_create();
-Missing: extern int     timer_delete();
-Missing: extern int     timer_getoverrun();
-Missing: extern int     timer_gettime();
-Missing: extern int     timer_settime();
-*** Completed time.h
-*** Starting unistd.h
-Missing: #define        _POSIX_MESSAGE_PASSING          (-1)
-Missing: #define        _POSIX_SEMAPHORES               (-1)
-Missing: #define        _POSIX_SHARED_MEMORY_OBJECTS            (-1)
-Missing: #define        _POSIX_TIMERS           (-1)
-*** Completed unistd.h
-*** Starting wchar.h
-Missing: extern wint_t  fgetwc();
-Missing: extern wchar_t *fgetws();
-Missing: extern wint_t  fputwc();
-Missing: extern int     fputws();
-Missing: extern int     fwide();
-Missing: extern int     fwprintf();
-Missing: extern int     fwscanf();
-Missing: extern wint_t  getwc();
-Missing: extern wint_t  getwchar();
-Missing: extern wint_t  putwc();
-Missing: extern wchar_t putwchar();
-Missing: extern int     swprintf();
-Missing: extern int     swscanf();
-Missing: extern wint_t  ungetwc();
-Missing: extern int     vfwprintf();
-Missing: extern int     vswprintf();
-Missing: extern int     vwprintf();
-Missing: extern size_t  wcsftime();
-Missing: extern wchar_t *wcswcs();
-Missing: extern int     wprintf();
-Missing: extern int     wscanf();
-*** Completed wchar.h
+/****** <mqueue.h> - Missing include file ******/
+/****** Start of Definitions for file mqueue.h ******/
+extern int mq_close();
+extern int mq_getattr();
+extern int mq_notify();
+extern mqd_t mq_open();
+extern ssize_t mq_receive();
+extern int mq_send();
+extern int mq_setattr();
+extern int mq_unlink();
+typedef <type> mqd_t;
+struct mq_attr { <members> };
+struct sigevent { <members> };
+/****** End of Definitions for file mqueue.h ******/
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-			Only the `wchar.h' problems result from glibc
-			defficiencies since we still don't support wide
-			character I/O.
-
 [*] Since the scripts are not clever enough for the way gcc handles
 include files (namely, putting some of them in gcc-local directory) I
 copied over the iso646.h, float.h, and stddef.h headers and ignored the
diff --git a/ChangeLog b/ChangeLog
index 6f573db7e0..f899c07366 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,38 @@
+2000-08-12  Andreas Jaeger  <aj@suse.de>
+
+	* include/features.h (__STDC_ISO_10646__): Define.
+	Reported by Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>.
+
 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
 
+	* include/features.h (__USE_ISOC99): Define for _XOPEN_SOURCE >= 600.
+
+	* locale/langinfo.h: Define YESSTR and NOSTR also for XPG4 (but not
+	for revision 6 and up).
+
+	* posix/sys/types.h: Define __need_timer_t and __need_clockid_t before
+	including <time.h>.
+	* time/time.h: Allow __need_timer_t and __need_clockid_t to be defined
+	to get definitions of just these types.
+
+	* signal/signal.h: Define thread signal handling functions also for
+	POSIX95.
+
+	* sysdeps/unix/sysv/linux/bits/types.h: Define thread types also for
+	POSIX95.
+	* sysdeps/unix/sysv/linux/alpha/bits/types.h: Likewise.
+	* sysdeps/unix/sysv/linux/ia64/bits/types.h: Likewise.
+	* sysdeps/unix/sysv/linux/mips/bits/types.h: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/bits/types.h: Likewise.
+
+	* sysvipc/sys/shm.h: Define pid_t for XPG.
+
 	* posix/unistd.h: Remove setkey, rename, and cuserid prototypes as
 	they are not anymore required here.
 
+	* wcsmbs/wchar.h: Make the various wide char string and stream
+	functions available for the respective XPG versions.
+
 	* nss/Makefile: Remove rules to build and distribute nss_db.
 
 	* sysdeps/generic/alphasort64.c: Remove unnecessary versioning.
diff --git a/include/features.h b/include/features.h
index 6e3a8763b3..bbf03f0692 100644
--- a/include/features.h
+++ b/include/features.h
@@ -196,6 +196,8 @@
 #  define _LARGEFILE_SOURCE	1
 #  if (_XOPEN_SOURCE - 0) >= 600
 #   define __USE_XOPEN2K	1
+#   undef __USE_ISOC99
+#   define __USE_ISOC99		1
 #  endif
 # else
 #  ifdef _XOPEN_SOURCE_EXTENDED
@@ -240,6 +242,9 @@
 #define __STDC_IEC_559__		1
 #define __STDC_IEC_559_COMPLEX__	1
 
+/* wchar_t uses Unicode 3.0.  */
+#define __STDC_ISO_10646__		200001L
+
 /* This macro indicates that the installed library is the GNU C Library.
    For historic reasons the value now is 6 and this will stay from now
    on.  The use of this variable is deprecated.  Use __GLIBC__ and
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 489fbcec0b..17bd42956b 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,10 @@
+2000-08-13  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
+	even though the implementation is not quite complete (but it reports
+	it).  Define _POSIX_MESSAGE_PASSING to -1.
+	* sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
+
 2000-08-12  Andreas Jaeger  <aj@suse.de>
 
 	* sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h b/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h
index a1b5f04b6a..35f8fefb7b 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h
+++ b/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h
@@ -89,7 +89,7 @@
 #define _POSIX_THREAD_ATTR_STACKADDR	1
 
 /* We support POSIX.1b semaphores, but only the non-shared form for now.  */
-/*#define _POSIX_SEMAPHORES	1	XXX We are not quite there now.  */
+#define _POSIX_SEMAPHORES	1
 
 /* Real-time signals are supported.  */
 #define _POSIX_REALTIME_SIGNALS	1
@@ -134,4 +134,7 @@
 /* The barrier functions are available.  */
 #define _POSIX_BARRIERS	200912L
 
+/* POSIX message queues are not yet supported.  */
+#define	_POSIX_MESSAGE_PASSING	(-1)
+
 #endif /* posix_opt.h */
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h b/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
index 19acebb8c9..489e152e88 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
+++ b/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
@@ -89,7 +89,7 @@
 #define _POSIX_THREAD_ATTR_STACKADDR	1
 
 /* We support POSIX.1b semaphores, but only the non-shared form for now.  */
-/*#define _POSIX_SEMAPHORES	1	XXX We are not quite there now.  */
+#define _POSIX_SEMAPHORES	1
 
 /* Real-time signals are supported.  */
 #define _POSIX_REALTIME_SIGNALS	1
@@ -143,4 +143,7 @@
 /* The barrier functions are available.  */
 #define _POSIX_BARRIERS	200912L
 
+/* POSIX message queues are not yet supported.  */
+#define	_POSIX_MESSAGE_PASSING	(-1)
+
 #endif /* posix_opt.h */
diff --git a/locale/langinfo.h b/locale/langinfo.h
index 3db293bbda..6a94a8759b 100644
--- a/locale/langinfo.h
+++ b/locale/langinfo.h
@@ -484,11 +484,11 @@ enum
   __NOEXPR,			/* Regex matching ``no'' input.  */
 #define NOEXPR			__NOEXPR
   __YESSTR,			/* Output string for ``yes''.  */
-#ifdef __USE_GNU
+#if defined __USE_GNU || (defined __USE_XOPEN || !defined __USE_XOPEN2K)
 # define YESSTR			__YESSTR
 #endif
   __NOSTR,			/* Output string for ``no''.  */
-#ifdef __USE_GNU
+#if defined __USE_GNU || (defined __USE_XOPEN || !defined __USE_XOPEN2K)
 # define	NOSTR		__NOSTR
 #endif
   _NL_NUM_LC_MESSAGES,
diff --git a/posix/sys/types.h b/posix/sys/types.h
index bf07f73ee1..816c0291c9 100644
--- a/posix/sys/types.h
+++ b/posix/sys/types.h
@@ -121,6 +121,8 @@ typedef __key_t key_t;
 # define __need_clock_t
 #endif
 #define	__need_time_t
+#define __need_timer_t
+#define __need_clockid_t
 #include <time.h>
 
 #ifdef __USE_XOPEN
diff --git a/signal/signal.h b/signal/signal.h
index 2ae76a1f37..3f6373ee75 100644
--- a/signal/signal.h
+++ b/signal/signal.h
@@ -348,7 +348,9 @@ extern int sigignore (int __sig) __THROW;
 
 /* Set the disposition of SIG.  */
 extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW;
+#endif
 
+#if defined __USE_POSIX199506 || defined __USE_UNIX98
 /* Some of the functions for handling signals in threaded programs must
    be defined here.  */
 # include <bits/sigthread.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 722db9e230..445ca94e8f 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -128,7 +128,7 @@ typedef unsigned int __socklen_t;
 
 
 /* Now add the thread types.  */
-#ifdef __USE_UNIX98
+#if defined __USE_POSIX199506 || defined __USE_UNIX98
 # include <bits/pthreadtypes.h>
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/bits/types.h b/sysdeps/unix/sysv/linux/bits/types.h
index b5576357ae..a45b452534 100644
--- a/sysdeps/unix/sysv/linux/bits/types.h
+++ b/sysdeps/unix/sysv/linux/bits/types.h
@@ -154,7 +154,7 @@ typedef unsigned int __socklen_t;
 
 
 /* Now add the thread types.  */
-#ifdef __USE_UNIX98
+#if defined __USE_POSIX199506 || defined __USE_UNIX98
 # include <bits/pthreadtypes.h>
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/types.h b/sysdeps/unix/sysv/linux/ia64/bits/types.h
index 48ef3c1257..4f37db4cce 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/types.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/types.h
@@ -129,7 +129,7 @@ typedef long int __intptr_t;
 typedef unsigned int __socklen_t;
 
 /* Now add the thread types.  */
-#ifdef __USE_UNIX98
+#if defined __USE_POSIX199506 || defined __USE_UNIX98
 # include <bits/pthreadtypes.h>
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 379f2bcd32..818b9479c3 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -154,7 +154,7 @@ typedef unsigned int __socklen_t;
 
 
 /* Now add the thread types.  */
-#ifdef __USE_UNIX98
+#if defined __USE_POSIX199506 || defined __USE_UNIX98
 # include <bits/pthreadtypes.h>
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/types.h b/sysdeps/unix/sysv/linux/sparc/bits/types.h
index 191315ff0b..78d85ab516 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/types.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/types.h
@@ -178,7 +178,7 @@ typedef unsigned int __socklen_t;
 
 
 /* Now add the thread types.  */
-#ifdef __USE_UNIX98
+#if defined __USE_POSIX199506 || defined __USE_UNIX98
 # include <bits/pthreadtypes.h>
 #endif
 
diff --git a/sysvipc/sys/shm.h b/sysvipc/sys/shm.h
index b74a9cb441..7a00a39f67 100644
--- a/sysvipc/sys/shm.h
+++ b/sysvipc/sys/shm.h
@@ -34,6 +34,12 @@
 #define __need_time_t
 #include <time.h>
 
+#ifdef __USE_XOPEN
+# ifndef __pid_t_defined
+typedef __pid_t pid_t;
+#  define __pid_t_defined
+# endif
+#endif	/* X/Open */
 
 __BEGIN_DECLS
 
diff --git a/time/time.h b/time/time.h
index 08a4a98b7b..47e4d8c5be 100644
--- a/time/time.h
+++ b/time/time.h
@@ -73,6 +73,28 @@ typedef __time_t time_t;
 #endif /* time_t not defined and <time.h> or need time_t.  */
 #undef	__need_time_t
 
+#if !defined __clockid_t_defined && (defined _TIME_H || defined __need_clockid_t)
+# define __clockid_t_defined	1
+
+# include <bits/types.h>
+
+/* Clock ID used in clock and timer functions.  */
+typedef __clockid_t clockid_t;
+
+#endif /* clockid_t not defined and <time.h> or need clockid_t.  */
+#undef	__clockid_time_t
+
+#if !defined __timer_t_defined && (defined _TIME_H || defined __need_timer_t)
+# define __timer_t_defined	1
+
+# include <bits/types.h>
+
+/* Timer ID returned by `timer_create'.  */
+typedef __timer_t timer_t;
+
+#endif /* timer_t not defined and <time.h> or need timer_t.  */
+#undef	__need_timer_t
+
 
 #if !defined __timespec_defined && \
     ((defined _TIME_H && defined __USE_POSIX199309) || defined __need_timespec)
@@ -115,12 +137,6 @@ struct tm
 
 
 #ifdef __USE_POSIX199309
-/* Clock ID used in clock and timer functions.  */
-typedef __clockid_t clockid_t;
-
-/* Timer ID returned by `timer_create'.  */
-typedef __timer_t timer_t;
-
 /* POSIX.1b structure for timer start values and intervals.  */
 struct itimerspec
   {
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 66e72908bb..6ffe38b02f 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -196,7 +196,7 @@ extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept)
 extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle)
      __THROW;
 
-#if defined __USE_XOPEN && !defined __USE_UNIX98
+#ifdef __USE_XOPEN
 /* Another name for `wcsstr' from XPG4.  */
 extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle)
      __THROW;
@@ -334,7 +334,7 @@ extern float wcstof (__const wchar_t *__restrict __nptr,
 		     wchar_t **__restrict __endptr) __THROW;
 extern long double wcstold (__const wchar_t *__restrict __nptr,
 			    wchar_t **__restrict __endptr) __THROW;
-#endif /* C9x */
+#endif /* C99 */
 
 
 /* Convert initial portion of wide string NPTR to `long int'
@@ -526,7 +526,7 @@ extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)
 
 
 /* Wide character I/O functions.  */
-#ifdef __USE_ISOC99
+#if defined __USE_ISOC99 || defined __USE_UNIX98
 
 /* Select orientation for stream.  */
 extern int fwide (FILE *__fp, int __mode) __THROW;
@@ -572,7 +572,9 @@ extern int wscanf (__const wchar_t *__restrict __format, ...)
 extern int swscanf (__const wchar_t *__restrict __s,
 		    __const wchar_t *__restrict __format, ...)
      __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
+#endif /* Use ISO C99 and Unix98. */
 
+#ifdef __USE_ISOC99
 /* Read formatted input from S into argument list ARG.  */
 extern int vfwscanf (FILE *__restrict __s,
 		     __const wchar_t *__restrict __format,
@@ -587,6 +589,7 @@ extern int vswscanf (__const wchar_t *__restrict __s,
 		     __const wchar_t *__restrict __format,
 		     __gnuc_va_list __arg)
      __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
+#endif /* Use ISO C99. */
 
 
 /* Read a character from STREAM.  */
@@ -596,16 +599,6 @@ extern wint_t getwc (FILE *__stream);
 /* Read a character from stdin.  */
 extern wint_t getwchar (void);
 
-#ifdef __USE_GNU
-/* These are defined to be equivalent to the `char' functions defined
-   in POSIX.1:1996.  */
-extern wint_t getwc_unlocked (FILE *__stream);
-extern wint_t getwchar_unlocked (void);
-
-/* This is the wide character version of a GNU extension.  */
-extern wint_t fgetwc_unlocked (FILE *__stream);
-#endif /* Use POSIX or MISC.  */
-
 
 /* Write a character to STREAM.  */
 extern wint_t fputwc (wchar_t __wc, FILE *__stream);
@@ -614,7 +607,30 @@ extern wint_t putwc (wchar_t __wc, FILE *__stream);
 /* Write a character to stdout.  */
 extern wint_t putwchar (wchar_t __wc);
 
+
+/* Get a newline-terminated wide character string of finite length
+   from STREAM.  */
+extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n,
+			FILE *__restrict __stream);
+
+/* Write a string to STREAM.  */
+extern int fputws (__const wchar_t *__restrict __ws,
+		   FILE *__restrict __stream);
+
+
+/* Push a character back onto the input buffer of STREAM.  */
+extern wint_t ungetwc (wint_t __wc, FILE *__stream);
+
+
 #ifdef __USE_GNU
+/* These are defined to be equivalent to the `char' functions defined
+   in POSIX.1:1996.  */
+extern wint_t getwc_unlocked (FILE *__stream);
+extern wint_t getwchar_unlocked (void);
+
+/* This is the wide character version of a GNU extension.  */
+extern wint_t fgetwc_unlocked (FILE *__stream);
+
 /* Faster version when locking is not necessary.  */
 extern wint_t fputwc_unlocked (wchar_t __wc, FILE *__stream);
 
@@ -622,43 +638,24 @@ extern wint_t fputwc_unlocked (wchar_t __wc, FILE *__stream);
    in POSIX.1:1996.  */
 extern wint_t putwc_unlocked (wchar_t __wc, FILE *__stream);
 extern wint_t putwchar_unlocked (wchar_t __wc);
-#endif
 
 
-/* Get a newline-terminated wide character string of finite length
-   from STREAM.  */
-extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n,
-			FILE *__restrict __stream);
-
-#ifdef __USE_GNU
 /* This function does the same as `fgetws' but does not lock the stream.  */
 extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n,
 				 FILE *__restrict __stream);
-#endif
-
 
-/* Write a string to STREAM.  */
-extern int fputws (__const wchar_t *__restrict __ws,
-		   FILE *__restrict __stream);
-
-#ifdef __USE_GNU
 /* This function does the same as `fputws' but does not lock the stream.  */
 extern int fputws_unlocked (__const wchar_t *__restrict __ws,
 			    FILE *__restrict __stream);
 #endif
 
 
-/* Push a character back onto the input buffer of STREAM.  */
-extern wint_t ungetwc (wint_t __wc, FILE *__stream);
-
-
 /* Format TP into S according to FORMAT.
    Write no more than MAXSIZE wide characters and return the number
    of wide characters written, or 0 if it would exceed MAXSIZE.  */
 extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,
 			__const wchar_t *__restrict __format,
 			__const struct tm *__restrict __tp);
-#endif /* Use ISO C9x. */
 
 /* The X/Open standard demands that most of the functions defined in
    the <wctype.h> header must also appear here.  This is probably