From c035a57f4e1f3a8d133bb1a823e96d38afce9f2a Mon Sep 17 00:00:00 2001 From: drepper Date: Thu, 31 Oct 1996 02:56:47 +0000 Subject: [PATCH] update from main archive 961030 --- sysdeps/unix/sysv/linux/errnos.h | 46 +++++++++++++++----------- sysdeps/unix/sysv/linux/i386/sysdep.S | 5 +-- sysdeps/unix/sysv/linux/m68k/sysdep.S | 5 +-- time/test-tz.c | 4 +-- time/time.h | 28 ++++++++-------- wctype/wctype.h | 62 +++++++++++++++++------------------ 6 files changed, 75 insertions(+), 75 deletions(-) diff --git a/sysdeps/unix/sysv/linux/errnos.h b/sysdeps/unix/sysv/linux/errnos.h index 40707d1d62..4456e570f0 100644 --- a/sysdeps/unix/sysv/linux/errnos.h +++ b/sysdeps/unix/sysv/linux/errnos.h @@ -19,34 +19,40 @@ Boston, MA 02111-1307, USA. */ #ifdef _ERRNO_H -#undef EDOM -#undef ERANGE -#include +# undef EDOM +# undef ERANGE +# include -#ifndef __ASSEMBLER__ -#if defined __USE_REENTRANT && (!defined _LIBC || defined _LIBC_REENTRANT) -/* Declare alias of `errno' variable so it is accessible even if macro - with name `errno' is defined. */ -extern int __errno; +# ifndef __ASSEMBLER__ +# ifdef _LIBC +/* We now need a declaration of the `errno' variable. */ +extern int errno; -/* When using threads, errno is a per-thread value. */ +/* Function to get address of global `errno' variable. */ extern int *__errno_location __P ((void)) __attribute__ ((__const__)); -#define errno (*__errno_location ()) - -#define __set_errno(val) errno = __errno = (val) - -#else /* !__USE_REENTRENT || (_LIBC && !_LIBC_REENTRANT) */ -#define __set_errno(val) errno = (val) - -#endif /* __USE_REENTRANT && (!_LIBC || _LIBC_REENTRANT) */ -#endif /* !__ASSEMBLER */ +# ifdef _LIBC_REENTRANT +static inline int +__set_errno (int __err) +{ + return *__errno_location () = errno = __err; +} +# else /* !_LIBC_REENTRANT */ +# define __set_errno(val) errno = (val) +# endif /* _LIBC_REENTRANT */ +# endif /* _LIBC */ + +# if defined __USE_REENTRANT && (!defined _LIBC || defined _LIBC_REENTRANT) +/* When using threads, errno is a per-thread value. */ +# define errno (*__errno_location ()) +# endif +# endif /* !__ASSEMBLER__ */ #endif /* _ERRNO_H */ #if !defined (_ERRNO_H) && defined (__need_Emath) /* This is ugly but the kernel header is not clean enough. We must define only the values EDOM and ERANGE in case __need_Emath is defined. The value is the same for all Linux ports. */ -#define EDOM 33 /* Math argument out of domain of function. */ -#define ERANGE 34 /* Math result not representable. */ +# define EDOM 33 /* Math argument out of domain of function. */ +# define ERANGE 34 /* Math result not representable. */ #endif /* !_ERRNO_H && __need_Emath */ diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.S b/sysdeps/unix/sysv/linux/i386/sysdep.S index 742ba2b1a9..c9c78842d8 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.S +++ b/sysdeps/unix/sysv/linux/i386/sysdep.S @@ -32,10 +32,7 @@ Cambridge, MA 02139, USA. */ errno: .zero 4 .globl _errno .type _errno,@object -_errno = errno /* This name is expected by hj libc.so.5 startup code. */ - .globl __errno - .type __errno,@object -__errno = errno /* This name is expected by the MT code. */ +_errno = errno /* This name is expected by hj's libc.so.5 startup code. */ .text /* The following code is only used in the shared library when we diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index 848ece58e8..7016a26a60 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -32,10 +32,7 @@ errno: .space 4 .size errno,4 .globl _errno .type _errno,@object -_errno = errno /* This name is expected by hj libc.so.5 startup code. */ - .globl __errno - .type __errno,@object -__errno = errno /* This name is expected by the MT code. */ +_errno = errno /* This name is expected by hj's libc.so.5 startup code. */ .text /* The following code is only used in the shared library when we diff --git a/time/test-tz.c b/time/test-tz.c index 47565cedec..c59a8b5ecf 100644 --- a/time/test-tz.c +++ b/time/test-tz.c @@ -21,7 +21,7 @@ main(int argc, char ** argv) int errors = 0; struct tm tm; time_t t; - int i; + unsigned int i; memset (&tm, 0, sizeof (tm)); tm.tm_isdst = 0; @@ -39,7 +39,7 @@ main(int argc, char ** argv) t = mktime(&tm); if (t != tests[i].expected) { - printf ("%s: flunked test %d (expected %lu, got %lu)\n", + printf ("%s: flunked test %u (expected %lu, got %lu)\n", argv[0], i, (long) tests[i].expected, (long) t); ++errors; } diff --git a/time/time.h b/time/time.h index 2dc25ab0b9..de7214ac52 100644 --- a/time/time.h +++ b/time/time.h @@ -1,23 +1,23 @@ /* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc. -This file is part of the GNU C Library. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* - * ANSI Standard: 4.12 DATE and TIME + * ISO C Standard: 4.12 DATE and TIME */ #ifndef _TIME_H diff --git a/wctype/wctype.h b/wctype/wctype.h index 87451e5d83..7a165810cf 100644 --- a/wctype/wctype.h +++ b/wctype/wctype.h @@ -1,20 +1,20 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* * ISO/IEC 9899:1990/Amendment 1:1995 7.15: @@ -44,7 +44,7 @@ typedef unsigned int wint_t; /* Scalar type that can hold values which represent locale-specific character mappings. */ -typedef const unsigned int *wctrans_t; +typedef __const unsigned int *wctrans_t; /* Scalar type that can hold values which represent locale-specific character classifications. */ @@ -96,52 +96,52 @@ enum /* Test for any wide character for which `iswalpha' or `iswdigit' is true. */ -int iswalnum __P ((wint_t __wc)); +extern int iswalnum __P ((wint_t __wc)); /* Test for any wide character for which `iswupper' or 'iswlower' is true, or any wide character that is one of a locale-specific set of wide-characters for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ -int iswalpha __P ((wint_t __wc)); +extern int iswalpha __P ((wint_t __wc)); /* Test for any control wide character. */ -int iswcntrl __P ((wint_t __wc)); +extern int iswcntrl __P ((wint_t __wc)); /* Test for any wide character that corresponds to a decimal-digit character. */ -int iswdigit __P ((wint_t __wc)); +extern int iswdigit __P ((wint_t __wc)); /* Test for any wide character for which `iswprint' is true and `iswspace' is false. */ -int iswgraph __P ((wint_t __wc)); +extern int iswgraph __P ((wint_t __wc)); /* Test for any wide character that corresponds to a lowercase letter or is one of a locale-specific set of wide characters for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ -int iswlower __P ((wint_t __wc)); +extern int iswlower __P ((wint_t __wc)); /* Test for any printing wide character. */ -int iswprint __P ((wint_t __wc)); +extern int iswprint __P ((wint_t __wc)); /* Test for any printing wide character that is one of a locale-specific et of wide characters for which neither `iswspace' nor `iswalnum' is true. */ -int iswpunct __P ((wint_t __wc)); +extern int iswpunct __P ((wint_t __wc)); /* Test for any wide character that corresponds to a locale-specific set of wide characters for which none of `iswalnum', `iswgraph', or `iswpunct' is true. */ -int iswspace __P ((wint_t __wc)); +extern int iswspace __P ((wint_t __wc)); /* Test for any wide character that corresponds to an uppercase letter or is one of a locale-specific set of wide character for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ -int iswupper __P ((wint_t __wc)); +extern int iswupper __P ((wint_t __wc)); /* Test for any wide character that corresponds to a hexadecimal-digit character equivalent to that performed be the functions described in the previous subclause. */ -int iswxdigit __P ((wint_t __wc)); +extern int iswxdigit __P ((wint_t __wc)); /* * Extensible wide-character classification functions: 7.15.2.2. @@ -149,11 +149,11 @@ int iswxdigit __P ((wint_t __wc)); /* Construct value that describes a class of wide characters identified by the string argument PROPERTY. */ -wctype_t wctype __P ((__const char *__property)); +extern wctype_t wctype __P ((__const char *__property)); /* Determine whether the wide-character WC has the property described by DESC. */ -int iswctype __P ((wint_t __wc, wctype_t __desc)); +extern int iswctype __P ((wint_t __wc, wctype_t __desc)); /* @@ -161,10 +161,10 @@ int iswctype __P ((wint_t __wc, wctype_t __desc)); */ /* Converts an uppercase letter to the corresponding lowercase letter. */ -wint_t towlower __P ((wint_t __wc)); +extern wint_t towlower __P ((wint_t __wc)); /* Converts an lowercase letter to the corresponding uppercase letter. */ -wint_t towupper __P ((wint_t __wc)); +extern wint_t towupper __P ((wint_t __wc)); /* * Extensible wide-character mapping functions: 7.15.3.2. @@ -172,10 +172,10 @@ wint_t towupper __P ((wint_t __wc)); /* Construct value that describes a mapping between wide characters identified by the string argument PROPERTY. */ -wctrans_t wctrans __P ((__const char *__property)); +extern wctrans_t wctrans __P ((__const char *__property)); /* Map the wide character WC using the mapping described by DESC. */ -wint_t towctrans __P ((wint_t __wc, wctrans_t __desc)); +extern wint_t towctrans __P ((wint_t __wc, wctrans_t __desc)); -- 2.11.0