diff options
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/inttypes.h | 50 | ||||
-rw-r--r-- | sysdeps/generic/stdint.h | 4 |
2 files changed, 33 insertions, 21 deletions
diff --git a/sysdeps/generic/inttypes.h b/sysdeps/generic/inttypes.h index 7bb3effac4..29830ea2fb 100644 --- a/sysdeps/generic/inttypes.h +++ b/sysdeps/generic/inttypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,6 +27,18 @@ /* Get the type definitions. */ #include <stdint.h> +/* Get a definition for wchar_t. But we must not define wchar_t itself. */ +#ifndef ____wchar_t_defined +# ifdef __WCHAR_TYPE__ +typedef __WCHAR_TYPE__ __wchar_t; +# else +# defined __need_wchar_t +# include <stddef.h> +typedef wchar_t __wchar_t; +# endif +# define ____wchar_t_defined 1 +#endif + /* The ISO C99 standard specifies that these macros must only be defined if explicitly requested. */ @@ -292,16 +304,18 @@ extern intmax_t strtoimax (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW; /* Like `strtoul' but convert to `uintmax_t'. */ -extern uintmax_t strtoumax (__const char * __restrict __nptr, +extern uintmax_t strtoumax (__const char *__restrict __nptr, char ** __restrict __endptr, int __base) __THROW; /* Like `wcstol' but convert to `intmax_t'. */ -extern intmax_t wcstoimax (__const wchar_t * __restrict __nptr, - wchar_t **__restrict __endptr, int __base) __THROW; +extern intmax_t wcstoimax (__const __wchar_t *__restrict __nptr, + __wchar_t **__restrict __endptr, int __base) + __THROW; /* Like `wcstoul' but convert to `uintmax_t'. */ -extern uintmax_t wcstoumax (__const wchar_t * __restrict __nptr, - wchar_t ** __restrict __endptr, int __base) __THROW; +extern uintmax_t wcstoumax (__const __wchar_t *__restrict __nptr, + __wchar_t ** __restrict __endptr, int __base) + __THROW; #ifdef __USE_EXTERN_INLINES @@ -338,13 +352,13 @@ strtoumax (__const char *__restrict nptr, char **__restrict endptr, /* Like `wcstol' but convert to `intmax_t'. */ # ifndef __wcstol_internal_defined -extern long int __wcstol_internal (__const wchar_t * __restrict __nptr, - wchar_t **__restrict __endptr, +extern long int __wcstol_internal (__const __wchar_t * __restrict __nptr, + __wchar_t **__restrict __endptr, int __base, int __group) __THROW; # define __wcstol_internal_defined 1 # endif extern __inline intmax_t -wcstoimax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr, +wcstoimax (__const __wchar_t *__restrict nptr, __wchar_t **__restrict endptr, int base) __THROW { return __wcstol_internal (nptr, endptr, base, 0); @@ -353,15 +367,15 @@ wcstoimax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr, /* Like `wcstoul' but convert to `uintmax_t'. */ # ifndef __wcstoul_internal_defined -extern unsigned long int __wcstoul_internal (__const wchar_t * +extern unsigned long int __wcstoul_internal (__const __wchar_t * __restrict __nptr, - wchar_t ** + __wchar_t ** __restrict __endptr, int __base, int __group) __THROW; # define __wcstoul_internal_defined 1 # endif extern __inline uintmax_t -wcstoumax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr, +wcstoumax (__const __wchar_t *__restrict nptr, __wchar_t **__restrict endptr, int base) __THROW { return __wcstoul_internal (nptr, endptr, base, 0); @@ -405,14 +419,14 @@ strtoumax (__const char *__restrict nptr, char **__restrict endptr, /* Like `wcstol' but convert to `intmax_t'. */ # ifndef __wcstoll_internal_defined __extension__ -extern long long int __wcstoll_internal (__const wchar_t * +extern long long int __wcstoll_internal (__const __wchar_t * __restrict __nptr, - wchar_t **__restrict __endptr, + __wchar_t **__restrict __endptr, int __base, int __group) __THROW; # define __wcstoll_internal_defined 1 # endif extern __inline intmax_t -wcstoimax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr, +wcstoimax (__const __wchar_t *__restrict nptr, __wchar_t **__restrict endptr, int base) __THROW { return __wcstoll_internal (nptr, endptr, base, 0); @@ -422,16 +436,16 @@ wcstoimax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr, /* Like `wcstoul' but convert to `uintmax_t'. */ # ifndef __wcstoull_internal_defined __extension__ -extern unsigned long long int __wcstoull_internal (__const wchar_t * +extern unsigned long long int __wcstoull_internal (__const __wchar_t * __restrict __nptr, - wchar_t ** + __wchar_t ** __restrict __endptr, int __base, int __group) __THROW; # define __wcstoull_internal_defined 1 # endif extern __inline uintmax_t -wcstoumax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr, +wcstoumax (__const __wchar_t *__restrict nptr, __wchar_t **__restrict endptr, int base) __THROW { return __wcstoull_internal (nptr, endptr, base, 0); diff --git a/sysdeps/generic/stdint.h b/sysdeps/generic/stdint.h index 1d51c71406..c860030409 100644 --- a/sysdeps/generic/stdint.h +++ b/sysdeps/generic/stdint.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,8 +24,6 @@ #define _STDINT_H 1 #include <features.h> -#define __need_wchar_t -#include <stddef.h> #include <bits/wchar.h> #include <bits/wordsize.h> |