* libio/stdio.h: Define __FILE if __need___FILE is defined.
	* stdio/stdio.h: Likewise.
	* wcsmbs/wchar.h: Get definition of __FILE. Use __FILE instead of FILE.
	* include/stdio.h: Handle __need___FILE like __need_FILE.
	* include/wchar.h: Use __FILE instead of FILE.
	* libio/fwprintf.c: Include <stdio.h> for FILE definition.
	* libio/fwscanf.c: Likewise.
	* libio/getwc.c: Likewise.

	* sysdeps/generic/stdint.h (WINT_MAX): Define to 4294967295u.
	* sysdeps/generic/bits/wchar.h (WCHAR_MIN): Define to -2147483647 - 1.
	* sysdeps/unix/sysv/linux/i386/bits/wchar.h: Likewise.

	* assert/assert.h: Update comment header about ISO C section.
	* math/complex.h: Likewise.
	* ctype/ctype.h: Likewise.
	* include/errno.h: Likewise.
	* include/limits.h: Likewise.
	* locale/locale.h: Likewise.
	* math/math.h: Likewise.
	* setjmp/setjmp.h: Likewise.
	* signal/signal.h: Likewise.
	* stdio/stdio.h: Likewise.
	* libio/stdio.h: Likewise.
	* stdlib/stdlib.h: Likewise.
	* string/string.h: Likewise.
	* time/time.h: Likewise.
	* wcsmbs/wchar.h: Likewise.
	* wctype/wctype.h: Likewise.
	Patches by Joseph S. Myers <jsm28@cam.ac.uk>.

2000-09-13  Andreas Jaeger  <aj@suse.de>

	* sysdeps/unix/sysv/linux/bits/socket.h (__cmsg_nxthdr): Fix test
	for no more entries.
	* sysdeps/unix/sysv/aix/bits/socket.h (__cmsg_nxthdr): Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/socket.h (__cmsg_nxthdr): Likewise.
	Reported by Eric S. Johnson <esj@cs.fiu.edu>, closes PR libc/1887.

2000-09-13  Ulrich Drepper  <drepper@redhat.com>
This commit is contained in:
Ulrich Drepper 2000-09-14 01:43:19 +00:00
parent d817a43892
commit d164630900
29 changed files with 126 additions and 58 deletions

View File

@ -1,3 +1,44 @@
2000-09-13 Ulrich Drepper <drepper@redhat.com>
* libio/stdio.h: Define __FILE if __need___FILE is defined.
* stdio/stdio.h: Likewise.
* wcsmbs/wchar.h: Get definition of __FILE. Use __FILE instead of FILE.
* include/stdio.h: Handle __need___FILE like __need_FILE.
* include/wchar.h: Use __FILE instead of FILE.
* libio/fwprintf.c: Include <stdio.h> for FILE definition.
* libio/fwscanf.c: Likewise.
* libio/getwc.c: Likewise.
* sysdeps/generic/stdint.h (WINT_MAX): Define to 4294967295u.
* sysdeps/generic/bits/wchar.h (WCHAR_MIN): Define to -2147483647 - 1.
* sysdeps/unix/sysv/linux/i386/bits/wchar.h: Likewise.
* assert/assert.h: Update comment header about ISO C section.
* math/complex.h: Likewise.
* ctype/ctype.h: Likewise.
* include/errno.h: Likewise.
* include/limits.h: Likewise.
* locale/locale.h: Likewise.
* math/math.h: Likewise.
* setjmp/setjmp.h: Likewise.
* signal/signal.h: Likewise.
* stdio/stdio.h: Likewise.
* libio/stdio.h: Likewise.
* stdlib/stdlib.h: Likewise.
* string/string.h: Likewise.
* time/time.h: Likewise.
* wcsmbs/wchar.h: Likewise.
* wctype/wctype.h: Likewise.
Patches by Joseph S. Myers <jsm28@cam.ac.uk>.
2000-09-13 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/bits/socket.h (__cmsg_nxthdr): Fix test
for no more entries.
* sysdeps/unix/sysv/aix/bits/socket.h (__cmsg_nxthdr): Likewise.
* sysdeps/unix/sysv/linux/mips/bits/socket.h (__cmsg_nxthdr): Likewise.
Reported by Eric S. Johnson <esj@cs.fiu.edu>, closes PR libc/1887.
2000-09-13 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/bits/time.h (CLOCKS_PER_SEC): Make a long int

View File

@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C Standard: 4.2 DIAGNOSTICS <assert.h>
* ISO C99 Standard: 7.2 Diagnostics <assert.h>
*/
#ifdef _ASSERT_H

View File

@ -20,7 +20,7 @@
#ifndef _BITS_WCHAR_H
#define _BITS_WCHAR_H 1
#define __WCHAR_MIN (-127)
#define __WCHAR_MIN (-2147483647 - 1)
#define __WCHAR_MAX (2147483647)
#endif /* bits/wchar.h */

View File

@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C Standard 4.3: CHARACTER HANDLING <ctype.h>
* ISO C99 Standard 7.4: Character handling <ctype.h>
*/
#ifndef _CTYPE_H

View File

@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C Standard: 4.1.3 Errors <errno.h>
* ISO C99 Standard: 7.5 Errors <errno.h>
*/
#ifndef _ERRNO_H

View File

@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C Standard: 4.14/2.2.4.2 Limits of integral types <limits.h>
* ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h>
*/
#ifndef _LIBC_LIMITS_H_

View File

@ -1,5 +1,5 @@
#ifndef _STDIO_H
# ifdef __need_FILE
# if defined __need_FILE || defined __need___FILE
# ifdef USE_IN_LIBIO
# include <libio/stdio.h>
# else

View File

@ -43,7 +43,7 @@ extern wchar_t *__wmemmove (wchar_t *__s1, __const wchar_t *__s2,
extern wchar_t *__wcschrnul (__const wchar_t *__s, wchar_t __wc)
__attribute_pure__;
extern int __vfwscanf (FILE *__restrict __s,
extern int __vfwscanf (__FILE *__restrict __s,
__const wchar_t *__restrict __format,
__gnuc_va_list __arg)
/* __attribute__ ((__format__ (__wscanf__, 2, 0)) */;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1997, 1999 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1997, 1999, 2000 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
@ -17,6 +17,7 @@
Boston, MA 02111-1307, USA. */
#include <stdarg.h>
#include <stdio.h>
#include <wchar.h>

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1997, 1999 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1997, 1999, 2000 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
@ -17,6 +17,7 @@
Boston, MA 02111-1307, USA. */
#include <stdarg.h>
#include <stdio.h>
#include <wchar.h>
/* Read formatted input from STREAM according to the format string FORMAT. */

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1993, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
/* Copyright (C) 1993, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
This file is part of the GNU IO Library.
This library is free software; you can redistribute it and/or
@ -24,6 +24,7 @@
General Public License. */
#include "libioP.h"
#include <stdio.h>
#include <wchar.h>
#undef _IO_getwc

View File

@ -17,12 +17,12 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C Standard: 4.9 INPUT/OUTPUT <stdio.h>
* ISO C99 Standard: 7.19 Input/output <stdio.h>
*/
#ifndef _STDIO_H
#ifndef __need_FILE
#if !defined __need_FILE && !defined __need___FILE
# define _STDIO_H 1
# include <features.h>
@ -38,17 +38,29 @@ __BEGIN_DECLS
# include <stdarg.h>
# include <bits/types.h>
# define __need_FILE
# define __need___FILE
#endif /* Don't need FILE. */
#undef __need_FILE
#ifndef __FILE_defined
#if !defined __FILE_defined && defined __need_FILE
/* The opaque type of streams. */
/* The opaque type of streams. This is the definition used elsewhere. */
typedef struct _IO_FILE FILE;
# define __FILE_defined 1
#endif /* FILE not defined. */
#undef __need_FILE
#if !defined ____FILE_defined && defined __need___FILE
/* The opaque type of streams. This is the definition used elsewhere. */
typedef struct _IO_FILE __FILE;
# define ____FILE_defined 1
#endif /* __FILE not defined. */
#undef __need___FILE
#ifdef _STDIO_H

View File

@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C Standard: 4.4 LOCALIZATION <locale.h>
* ISO C99 Standard: 7.11 Localization <locale.h>
*/
#ifndef _LOCALE_H

View File

@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C99: 7.8 Complex arithmetic <complex.h>
* ISO C99: 7.3 Complex arithmetic <complex.h>
*/
#ifndef _COMPLEX_H

View File

@ -18,7 +18,7 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C Standard: 4.5 MATHEMATICS <math.h>
* ISO C99 Standard: 7.12 Mathematics <math.h>
*/
#ifndef _MATH_H

View File

@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C Standard: 4.6 NON-LOCAL JUMPS <setjmp.h>
* ISO C99 Standard: 7.13 Nonlocal jumps <setjmp.h>
*/
#ifndef _SETJMP_H

View File

@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C Standard: 4.7 SIGNAL HANDLING <signal.h>
* ISO C99 Standard: 7.14 Signal handling <signal.h>
*/
#ifndef _SIGNAL_H

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc.
/* Copyright (C) 1991-1999, 2000 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
@ -17,12 +17,12 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C Standard: 4.9 INPUT/OUTPUT <stdio.h>
* ISO C99 Standard: 7.19 Input/output <stdio.h>
*/
#ifndef _STDIO_H
#if !defined(__need_FILE)
#if !defined(__need_FILE) && !defined(__need___FILE)
#define _STDIO_H 1
#include <features.h>
@ -39,17 +39,29 @@ __BEGIN_DECLS
#endif
#include <bits/types.h>
#define __need_FILE
#define __need___FILE
#endif /* Don't need FILE. */
#undef __need_FILE
#ifndef __FILE_defined
#if !defined __FILE_defined && defined __need_FILE
/* The opaque type of streams. */
typedef struct __stdio_file FILE;
#define __FILE_defined 1
#endif /* FILE not defined. */
#undef __need_FILE
#if !defined ____FILE_defined && defined __need___FILE
/* The opaque type of streams. */
typedef struct __stdio_file __FILE;
#define ____FILE_defined 1
#endif /* __FILE not defined. */
#undef __need___FILE
#ifdef _STDIO_H

View File

@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C Standard: 4.10 GENERAL UTILITIES <stdlib.h>
* ISO C99 Standard: 7.20 General utilities <stdlib.h>
*/
#ifndef _STDLIB_H

View File

@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C Standard: 4.11 STRING HANDLING <string.h>
* ISO C99 Standard: 7.21 String handling <string.h>
*/
#ifndef _STRING_H

View File

@ -20,7 +20,7 @@
#ifndef _BITS_WCHAR_H
#define _BITS_WCHAR_H 1
#define __WCHAR_MIN (-127)
#define __WCHAR_MIN (-2147483647 - 1)
#define __WCHAR_MAX (2147483647)
#endif /* bits/wchar.h */

View File

@ -279,7 +279,7 @@ typedef unsigned long long int uintmax_t;
/* Limits of `wint_t'. */
# define WINT_MIN (0u)
# define WINT_MAX (2147483647u)
# define WINT_MAX (4294967295u)
#endif /* C++ && limit macros */

View File

@ -243,7 +243,7 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
+ __mhdr->msg_controllen)
|| ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
>= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
> ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
/* No more entries. */
return 0;
return __cmsg;

View File

@ -267,7 +267,7 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
+ __mhdr->msg_controllen)
|| ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
>= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
> ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
/* No more entries. */
return 0;
return __cmsg;

View File

@ -20,7 +20,7 @@
#ifndef _BITS_WCHAR_H
#define _BITS_WCHAR_H 1
#define __WCHAR_MIN (-127l)
#define __WCHAR_MIN (-2147483647l - 1l)
#define __WCHAR_MAX (2147483647l)
#endif /* bits/wchar.h */

View File

@ -267,7 +267,7 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
+ __mhdr->msg_controllen)
|| ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
>= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
> ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
/* No more entries. */
return 0;
return __cmsg;

View File

@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C Standard: 4.12 DATE and TIME <time.h>
* ISO C99 Standard: 7.23 Date and time <time.h>
*/
#ifndef _TIME_H

View File

@ -17,8 +17,8 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C Standard, Amendment 1, 7.16.4
* General wide-string utilities <wchar.h>
* ISO C99 Standard: 7.24
* Extended multibyte and wide character utilities <wchar.h>
*/
#ifndef _WCHAR_H
@ -30,7 +30,7 @@
#ifdef _WCHAR_H
/* Get FILE definition. */
# define __need_FILE
# define __need___FILE
# include <stdio.h>
/* Get va_list definition. */
# define __need___va_list
@ -537,11 +537,11 @@ extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)
#if defined __USE_ISOC99 || defined __USE_UNIX98
/* Select orientation for stream. */
extern int fwide (FILE *__fp, int __mode) __THROW;
extern int fwide (__FILE *__fp, int __mode) __THROW;
/* Write formatted output to STREAM. */
extern int fwprintf (FILE *__restrict __stream,
extern int fwprintf (__FILE *__restrict __stream,
__const wchar_t *__restrict __format, ...)
__THROW /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
/* Write formatted output to stdout. */
@ -553,7 +553,7 @@ extern int swprintf (wchar_t *__restrict __s, size_t __n,
__THROW /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */;
/* Write formatted output to S from argument list ARG. */
extern int vfwprintf (FILE *__restrict __s,
extern int vfwprintf (__FILE *__restrict __s,
__const wchar_t *__restrict __format,
__gnuc_va_list __arg)
__THROW /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;
@ -570,7 +570,7 @@ extern int vswprintf (wchar_t *__restrict __s, size_t __n,
/* Read formatted input from STREAM. */
extern int fwscanf (FILE *__restrict __stream,
extern int fwscanf (__FILE *__restrict __stream,
__const wchar_t *__restrict __format, ...)
__THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
/* Read formatted input from stdin. */
@ -584,7 +584,7 @@ extern int swscanf (__const wchar_t *__restrict __s,
#ifdef __USE_ISOC99
/* Read formatted input from S into argument list ARG. */
extern int vfwscanf (FILE *__restrict __s,
extern int vfwscanf (__FILE *__restrict __s,
__const wchar_t *__restrict __format,
__gnuc_va_list __arg)
__THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
@ -601,16 +601,16 @@ extern int vswscanf (__const wchar_t *__restrict __s,
/* Read a character from STREAM. */
extern wint_t fgetwc (FILE *__stream);
extern wint_t getwc (FILE *__stream);
extern wint_t fgetwc (__FILE *__stream);
extern wint_t getwc (__FILE *__stream);
/* Read a character from stdin. */
extern wint_t getwchar (void);
/* Write a character to STREAM. */
extern wint_t fputwc (wchar_t __wc, FILE *__stream);
extern wint_t putwc (wchar_t __wc, FILE *__stream);
extern wint_t fputwc (wchar_t __wc, __FILE *__stream);
extern wint_t putwc (wchar_t __wc, __FILE *__stream);
/* Write a character to stdout. */
extern wint_t putwchar (wchar_t __wc);
@ -619,42 +619,42 @@ 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);
__FILE *__restrict __stream);
/* Write a string to STREAM. */
extern int fputws (__const wchar_t *__restrict __ws,
FILE *__restrict __stream);
__FILE *__restrict __stream);
/* Push a character back onto the input buffer of STREAM. */
extern wint_t ungetwc (wint_t __wc, FILE *__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 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);
extern wint_t fgetwc_unlocked (__FILE *__stream);
/* Faster version when locking is not necessary. */
extern wint_t fputwc_unlocked (wchar_t __wc, FILE *__stream);
extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream);
/* These are defined to be equivalent to the `char' functions defined
in POSIX.1:1996. */
extern wint_t putwc_unlocked (wchar_t __wc, FILE *__stream);
extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream);
extern wint_t putwchar_unlocked (wchar_t __wc);
/* 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);
__FILE *__restrict __stream);
/* 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);
__FILE *__restrict __stream);
#endif

View File

@ -17,8 +17,8 @@
Boston, MA 02111-1307, USA. */
/*
* ISO C Standard, Amendment 1, 7.15:
* Wide-character classification and mapping utilities <wctype.h>
* ISO C99 Standard: 7.25
* Wide character classification and mapping utilities <wctype.h>
*/
#ifndef _WCTYPE_H