aboutsummaryrefslogtreecommitdiff
path: root/wcsmbs/wchar.h
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 /wcsmbs/wchar.h
parent8de72f531eb4d63481115e91d144731c5326bc79 (diff)
downloadglibc-91bc38d09ce2df68d5f03e88df144243907437da.zip
glibc-91bc38d09ce2df68d5f03e88df144243907437da.tar.gz
glibc-91bc38d09ce2df68d5f03e88df144243907437da.tar.bz2
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.
Diffstat (limited to 'wcsmbs/wchar.h')
-rw-r--r--wcsmbs/wchar.h61
1 files changed, 29 insertions, 32 deletions
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 66e7290..6ffe38b 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