* time/time.h (struct timespec): Use __time_t for tv_sec element.

	* sysdeps/generic/inttypes.h: Define __wchar_t.  Use it instead of
	wchar_t for function declarations and defintions.

	* misc/sys/select.h: Define __need_time_t before including <time.h>.
	Define suseconds_t if it hasn't happened yet.

	* iconv/gconv.h: Define __need_wchar_t before including <stddef.h>.

	* conform/data/sys/uio.h-data: Allow UIO_MAXIOV to be defined.

	* sysdeps/generic/stdint.h: Don't get definition of wchar_t from
	<stddef.h>.

	* conform/data/stddef.h-data: Remove wint_t.
This commit is contained in:
Ulrich Drepper 2001-08-18 23:36:58 +00:00
parent 9c777dfe83
commit 689849878d
9 changed files with 63 additions and 27 deletions

View File

@ -1,5 +1,22 @@
2001-08-18 Ulrich Drepper <drepper@redhat.com>
* time/time.h (struct timespec): Use __time_t for tv_sec element.
* sysdeps/generic/inttypes.h: Define __wchar_t. Use it instead of
wchar_t for function declarations and defintions.
* misc/sys/select.h: Define __need_time_t before including <time.h>.
Define suseconds_t if it hasn't happened yet.
* iconv/gconv.h: Define __need_wchar_t before including <stddef.h>.
* conform/data/sys/uio.h-data: Allow UIO_MAXIOV to be defined.
* sysdeps/generic/stdint.h: Don't get definition of wchar_t from
<stddef.h>.
* conform/data/stddef.h-data: Remove wint_t.
* conform/conformtest.pl: Change namespace test to take #undef
lines into account.

View File

@ -5,6 +5,5 @@ macro offsetof
type ptrdiff_t
type wchar_t
type size_t
type wint_t
allow *_t

View File

@ -1,11 +1,11 @@
#if !defined ISO && !defined POSIX
type time_t
type suseconds_t
type {struct timeval}
element {struct timeval} time_t tv_sec
element {struct timeval} suseconds_t tv_usec
type time_t
type suseconds_t
type sigset_t
type {struct timespec}

View File

@ -9,3 +9,4 @@ function ssize_t writev (int, const struct iovec*, int)
allow iov_*
allow IOV_*
allow *_t
allow UIO_MAXIOV

View File

@ -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,7 @@
#define __need_mbstate_t
#include <wchar.h>
#define __need_size_t
#define __need_wchar_t
#include <stddef.h>
/* ISO 10646 value used to signal invalid value. */

View File

@ -39,11 +39,17 @@ typedef __sigset_t sigset_t;
#endif
/* Get definition of timer specification structures. */
#define __need_time_t
#define __need_timespec
#include <time.h>
#define __need_timeval
#include <bits/time.h>
#ifndef __suseconds_t_defined
typedef __suseconds_t suseconds_t;
# define __suseconds_t_defined
#endif
/* The fd_set member is required to be an array of longs. */
typedef long int __fd_mask;

View File

@ -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);

View File

@ -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>

View File

@ -105,7 +105,7 @@ typedef __timer_t timer_t;
has nanoseconds instead of microseconds. */
struct timespec
{
long int tv_sec; /* Seconds. */
__time_t tv_sec; /* Seconds. */
long int tv_nsec; /* Nanoseconds. */
};