mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
Update.
1998-10-13 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c: Include string.h to get memcpy prototype and NULL definition. 1998-10-12 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * misc/sys/cdefs.h (__THROW): New macro. * argp/argp.h: Use it to replace the kludgey __P in inline function definitions. * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. * stdlib/stdlib.h: Likewise. * wcsmbs/wchar.h: Likewise. * libio/stdio.h: Likewise. * stdio/stdio.h: Likewise. * sysdeps/wordsize-64/inttypes.h: Likewise. * sysdeps/wordsize-32/inttypes.h: Likewise. * string/argz.h: Likewise. * io/sys/stat.h: Likewise. 1998-10-12 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * Rules (stdio_lim): New variable. ($(stdio_lim:h=st)): Use this as intermediate stamp file, depend on Rules and config.make, use $(move-if-change) to avoid unnessary recompilations, and cleanup command. (common-generated): Add bits/stdio_lim.st.
This commit is contained in:
parent
1622fda9c0
commit
99e46354d9
28
ChangeLog
28
ChangeLog
@ -1,3 +1,31 @@
|
||||
1998-10-13 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c: Include
|
||||
string.h to get memcpy prototype and NULL definition.
|
||||
|
||||
1998-10-12 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
|
||||
|
||||
* misc/sys/cdefs.h (__THROW): New macro.
|
||||
* argp/argp.h: Use it to replace the kludgey __P in inline
|
||||
function definitions.
|
||||
* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
|
||||
* stdlib/stdlib.h: Likewise.
|
||||
* wcsmbs/wchar.h: Likewise.
|
||||
* libio/stdio.h: Likewise.
|
||||
* stdio/stdio.h: Likewise.
|
||||
* sysdeps/wordsize-64/inttypes.h: Likewise.
|
||||
* sysdeps/wordsize-32/inttypes.h: Likewise.
|
||||
* string/argz.h: Likewise.
|
||||
* io/sys/stat.h: Likewise.
|
||||
|
||||
1998-10-12 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
|
||||
|
||||
* Rules (stdio_lim): New variable.
|
||||
($(stdio_lim:h=st)): Use this as intermediate stamp file, depend
|
||||
on Rules and config.make, use $(move-if-change) to avoid unnessary
|
||||
recompilations, and cleanup command.
|
||||
(common-generated): Add bits/stdio_lim.st.
|
||||
|
||||
1998-10-12 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/alpha/Makefile (CFLAGS-ioperm.c): New
|
||||
|
35
Rules
35
Rules
@ -214,19 +214,23 @@ TMP_MAX = 238328
|
||||
L_ctermid = 9
|
||||
L_cuserid = 9
|
||||
endif
|
||||
stdio_lim = $(common-objpfx)bits/stdio_lim.h
|
||||
|
||||
$(common-objpfx)bits/stdio_%.h $(common-objpfx)bits/stdio_%.d: \
|
||||
$(..)stdio-common/stdio_%.h.in
|
||||
$(stdio_lim:lim.h=%.h) $(stdio_lim:lim.h=%.d): $(stdio_lim:lim.h=%.st); @:
|
||||
$(stdio_lim:h=st): $(..)stdio-common/stdio_lim.h.in $(..)Rules \
|
||||
$(common-objpfx)config.make
|
||||
$(make-target-directory)
|
||||
echo '#include "$(..)posix/bits/posix1_lim.h"' | \
|
||||
SUNPRO_DEPENDENCIES='$(@:.h=.d)T MARKER' \
|
||||
$(CC) $(+includes) -E -dM -xc - -o $(@:.d=.h)T
|
||||
sed -e 's!MARKER!$(@:.h=.d) $(@:.d=.h)!' \
|
||||
-e 's!$(common-objpfx)!$$(common-objpfx)!g' \
|
||||
$(@:.h=.d)T > $(@:.h=.d)t
|
||||
mv -f $(@:.h=.d)t $(@:.h=.d)
|
||||
fopen_max=`sed -n 's/^#define OPEN_MAX //p' $(@:.d=.h)T`; \
|
||||
filename_max=`sed -n 's/^#define PATH_MAX //p' $(@:.d=.h)T`; \
|
||||
SUNPRO_DEPENDENCIES='$(@:st=dT) $@' \
|
||||
$(CC) $(+includes) -E -dM -xc - -o $(@:st=hT)
|
||||
ifdef sed-remove-objpfx
|
||||
sed $(sed-remove-objpfx) $(@:st=dT) > $(@:st=dt)
|
||||
mv -f $(@:st=dt) $(@:st=d)
|
||||
else
|
||||
mv -f $(@:st=dT) $(@:st=d)
|
||||
endif
|
||||
fopen_max=`sed -n 's/^#define OPEN_MAX //p' $(@:st=hT)`; \
|
||||
filename_max=`sed -n 's/^#define PATH_MAX //p' $(@:st=hT)`; \
|
||||
fopen_max=$${fopen_max:-16}; \
|
||||
filename_max=$${filename_max:-1024}; \
|
||||
sed -e "s/@FOPEN_MAX@/$$fopen_max/" \
|
||||
@ -235,12 +239,13 @@ $(common-objpfx)bits/stdio_%.h $(common-objpfx)bits/stdio_%.d: \
|
||||
-e "s/@TMP_MAX@/$(TMP_MAX)/" \
|
||||
-e "s/@L_ctermid@/$(L_ctermid)/" \
|
||||
-e "s/@L_cuserid@/$(L_cuserid)/" \
|
||||
$< > $(@:.d=.h).new
|
||||
mv -f $(@:.d=.h).new $(@:.d=.h)
|
||||
$< > $(@:st=h.new)
|
||||
$(move-if-change) $(@:st=h.new) $(@:st=h)
|
||||
# Remove these last so that they can be examined if something went wrong.
|
||||
rm -f $(@:.d=.h)T $(@:.h=.d)T
|
||||
rm -f $(@:st=hT) $(@:st=dT)
|
||||
touch $@
|
||||
# Get dependencies.
|
||||
ifndef no_deps
|
||||
-include $(common-objpfx)bits/stdio_lim.d
|
||||
-include $(stdio_lim:h=d)
|
||||
endif
|
||||
common-generated += bits/stdio_lim.h bits/stdio_lim.d
|
||||
common-generated += bits/stdio_lim.h bits/stdio_lim.d bits/stdio_lim.st
|
||||
|
@ -535,13 +535,13 @@ extern void *__argp_input __P ((__const struct argp *argp,
|
||||
# endif
|
||||
|
||||
ARGP_EI void
|
||||
__argp_usage __P ((__const struct argp_state *__state))
|
||||
__argp_usage (__const struct argp_state *__state) __THROW
|
||||
{
|
||||
__argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
|
||||
}
|
||||
|
||||
ARGP_EI int
|
||||
__option_is_short __P ((__const struct argp_option *__opt))
|
||||
__option_is_short (__const struct argp_option *__opt) __THROW
|
||||
{
|
||||
if (__opt->flags & OPTION_DOC)
|
||||
return 0;
|
||||
@ -553,7 +553,7 @@ __option_is_short __P ((__const struct argp_option *__opt))
|
||||
}
|
||||
|
||||
ARGP_EI int
|
||||
__option_is_end __P ((__const struct argp_option *__opt))
|
||||
__option_is_end (__const struct argp_option *__opt) __THROW
|
||||
{
|
||||
return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
|
||||
}
|
||||
|
@ -310,53 +310,51 @@ extern int __xmknod __P ((int __ver, __const char *__path,
|
||||
__mode_t __mode, __dev_t *__dev));
|
||||
|
||||
#if defined __GNUC__ && __GNUC__ >= 2
|
||||
/* Inlined versions of the real stat and mknod functions.
|
||||
/* Inlined versions of the real stat and mknod functions. */
|
||||
|
||||
We have to use __P here since we need definitions matching the
|
||||
declarations above. */
|
||||
|
||||
extern __inline__ int stat __P ((__const char *__path, struct stat *__statbuf))
|
||||
extern __inline__ int stat (__const char *__path,
|
||||
struct stat *__statbuf) __THROW
|
||||
{
|
||||
return __xstat (_STAT_VER, __path, __statbuf);
|
||||
}
|
||||
|
||||
# if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
|
||||
extern __inline__ int lstat __P ((__const char *__path,
|
||||
struct stat *__statbuf))
|
||||
extern __inline__ int lstat (__const char *__path,
|
||||
struct stat *__statbuf) __THROW
|
||||
{
|
||||
return __lxstat (_STAT_VER, __path, __statbuf);
|
||||
}
|
||||
# endif
|
||||
|
||||
extern __inline__ int fstat __P ((int __fd, struct stat *__statbuf))
|
||||
extern __inline__ int fstat (int __fd, struct stat *__statbuf) __THROW
|
||||
{
|
||||
return __fxstat (_STAT_VER, __fd, __statbuf);
|
||||
}
|
||||
|
||||
# if defined __USE_MISC || defined __USE_BSD
|
||||
extern __inline__ int mknod __P ((__const char *__path, __mode_t __mode,
|
||||
__dev_t __dev))
|
||||
extern __inline__ int mknod (__const char *__path, __mode_t __mode,
|
||||
__dev_t __dev) __THROW
|
||||
{
|
||||
return __xmknod (_MKNOD_VER, __path, __mode, &__dev);
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef __USE_LARGEFILE64
|
||||
extern __inline__ int stat64 __P ((__const char *__path,
|
||||
struct stat64 *__statbuf))
|
||||
extern __inline__ int stat64 (__const char *__path,
|
||||
struct stat64 *__statbuf) __THROW
|
||||
{
|
||||
return __xstat64 (_STAT_VER, __path, __statbuf);
|
||||
}
|
||||
|
||||
# if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
|
||||
extern __inline__ int lstat64 __P ((__const char *__path,
|
||||
struct stat64 *__statbuf))
|
||||
extern __inline__ int lstat64 (__const char *__path,
|
||||
struct stat64 *__statbuf) __THROW
|
||||
{
|
||||
return __lxstat64 (_STAT_VER, __path, __statbuf);
|
||||
}
|
||||
# endif
|
||||
|
||||
extern __inline__ int fstat64 __P ((int __fd, struct stat64 *__statbuf))
|
||||
extern __inline__ int fstat64 (int __fd, struct stat64 *__statbuf) __THROW
|
||||
{
|
||||
return __fxstat64 (_STAT_VER, __fd, __statbuf);
|
||||
}
|
||||
|
@ -281,7 +281,7 @@ extern int vsprintf __P ((char *__restrict __s,
|
||||
|
||||
#ifdef __USE_EXTERN_INLINES
|
||||
__STDIO_INLINE int
|
||||
vprintf __P ((__const char *__restrict __fmt, _G_va_list __arg))
|
||||
vprintf (__const char *__restrict __fmt, _G_va_list __arg) __THROW
|
||||
{
|
||||
return vfprintf (stdout, __fmt, __arg);
|
||||
}
|
||||
@ -366,7 +366,7 @@ extern int getchar __P ((void));
|
||||
|
||||
#ifdef __USE_EXTERN_INLINES
|
||||
__STDIO_INLINE int
|
||||
getchar __P ((void))
|
||||
getchar (void) __THROW
|
||||
{
|
||||
return _IO_getc (stdin);
|
||||
}
|
||||
@ -379,13 +379,13 @@ extern int getchar_unlocked __P ((void));
|
||||
|
||||
# ifdef __USE_EXTERN_INLINES
|
||||
__STDIO_INLINE int
|
||||
getc_unlocked __P ((FILE *__fp))
|
||||
getc_unlocked (FILE *__fp) __THROW
|
||||
{
|
||||
return _IO_getc_unlocked (__fp);
|
||||
}
|
||||
|
||||
__STDIO_INLINE int
|
||||
getchar_unlocked __P ((void))
|
||||
getchar_unlocked (void) __THROW
|
||||
{
|
||||
return _IO_getc_unlocked (stdin);
|
||||
}
|
||||
@ -406,7 +406,7 @@ extern int putchar __P ((int __c));
|
||||
|
||||
#ifdef __USE_EXTERN_INLINES
|
||||
__STDIO_INLINE int
|
||||
putchar __P ((int __c))
|
||||
putchar (int __c) __THROW
|
||||
{
|
||||
return _IO_putc (__c, stdout);
|
||||
}
|
||||
@ -418,7 +418,7 @@ extern int fputc_unlocked __P ((int __c, FILE *__stream));
|
||||
|
||||
# ifdef __USE_EXTERN_INLINES
|
||||
__STDIO_INLINE int
|
||||
fputc_unlocked __P ((int __c, FILE *__stream))
|
||||
fputc_unlocked (int __c, FILE *__stream) __THROW
|
||||
{
|
||||
return _IO_putc_unlocked (__c, __stream);
|
||||
}
|
||||
@ -432,13 +432,13 @@ extern int putchar_unlocked __P ((int __c));
|
||||
|
||||
# ifdef __USE_EXTERN_INLINES
|
||||
__STDIO_INLINE int
|
||||
putc_unlocked __P ((int __c, FILE *__stream))
|
||||
putc_unlocked (int __c, FILE *__stream) __THROW
|
||||
{
|
||||
return _IO_putc_unlocked (__c, __stream);
|
||||
}
|
||||
|
||||
__STDIO_INLINE int
|
||||
putchar_unlocked __P ((int __c))
|
||||
putchar_unlocked (int __c) __THROW
|
||||
{
|
||||
return _IO_putc_unlocked (__c, stdout);
|
||||
}
|
||||
@ -487,7 +487,7 @@ extern _IO_ssize_t getline __P ((char **__lineptr, size_t *__n,
|
||||
|
||||
# ifdef __USE_EXTERN_INLINES
|
||||
__STDIO_INLINE _IO_ssize_t
|
||||
getline __P ((char **__lineptr, size_t *__n, FILE *__stream))
|
||||
getline (char **__lineptr, size_t *__n, FILE *__stream) __THROW
|
||||
{
|
||||
return __getdelim (__lineptr, __n, '\n', __stream);
|
||||
}
|
||||
@ -618,13 +618,13 @@ extern int ferror_unlocked __P ((FILE *__stream));
|
||||
|
||||
# ifdef __USE_EXTERN_INLINES
|
||||
__STDIO_INLINE int
|
||||
feof_unlocked __P ((FILE *__stream))
|
||||
feof_unlocked (FILE *__stream) __THROW
|
||||
{
|
||||
return _IO_feof_unlocked (__stream);
|
||||
}
|
||||
|
||||
__STDIO_INLINE int
|
||||
ferror_unlocked __P ((FILE *__stream))
|
||||
ferror_unlocked (FILE *__stream) __THROW
|
||||
{
|
||||
return _IO_ferror_unlocked (__stream);
|
||||
}
|
||||
|
@ -30,10 +30,11 @@
|
||||
to help it optimize the function calls. But this works only with
|
||||
gcc 2.8.x and egcs. */
|
||||
# if defined __cplusplus && __GNUC_MINOR__ >= 8
|
||||
# define __P(args) args throw ()
|
||||
# define __THROW throw ()
|
||||
# else
|
||||
# define __P(args) args
|
||||
# define __THROW
|
||||
# endif
|
||||
# define __P(args) args __THROW
|
||||
/* This macro will be used for functions which might take C++ callback
|
||||
functions. */
|
||||
# define __PMT(args) args
|
||||
|
@ -426,7 +426,7 @@ extern int vsprintf __P ((char *__restrict __s,
|
||||
|
||||
#ifdef __OPTIMIZE__
|
||||
extern __inline int
|
||||
vprintf __P ((const char *__restrict __fmt, __gnuc_va_list __arg))
|
||||
vprintf (const char *__restrict __fmt, __gnuc_va_list __arg) __THROW
|
||||
{
|
||||
return vfprintf (stdout, __fmt, __arg);
|
||||
}
|
||||
@ -500,17 +500,17 @@ extern int vsscanf __P ((__const char *__s, __const char *__format,
|
||||
|
||||
#ifdef __OPTIMIZE__
|
||||
extern __inline int
|
||||
vfscanf __P ((FILE *__s, const char *__fmt, __gnuc_va_list __arg))
|
||||
vfscanf (FILE *__s, const char *__fmt, __gnuc_va_list __arg) __THROW
|
||||
{
|
||||
return __vfscanf (__s, __fmt, __arg);
|
||||
}
|
||||
extern __inline int
|
||||
vscanf __P ((const char *__fmt, __gnuc_va_list __arg))
|
||||
vscanf (const char *__fmt, __gnuc_va_list __arg) __THROW
|
||||
{
|
||||
return __vfscanf (stdin, __fmt, __arg);
|
||||
}
|
||||
extern __inline int
|
||||
vsscanf __P ((const char *__s, const char *__fmt, __gnuc_va_list __arg))
|
||||
vsscanf (const char *__s, const char *__fmt, __gnuc_va_list __arg) __THROW
|
||||
{
|
||||
return __vsscanf (__s, __fmt, __arg);
|
||||
}
|
||||
@ -542,7 +542,7 @@ extern int getchar __P ((void));
|
||||
|
||||
#ifdef __OPTIMIZE__
|
||||
extern __inline int
|
||||
getchar __P ((void))
|
||||
getchar (void) __THROW
|
||||
{
|
||||
return __getc (stdin);
|
||||
}
|
||||
@ -555,13 +555,13 @@ extern int getchar_unlocked __P ((void));
|
||||
|
||||
# ifdef __OPTIMIZE__
|
||||
extern __inline int
|
||||
getc_unlocked __P ((FILE *__stream))
|
||||
getc_unlocked (FILE *__stream) __THROW
|
||||
{
|
||||
return __getc (__stream);
|
||||
}
|
||||
|
||||
extern __inline int
|
||||
getchar_unlocked __P ((void))
|
||||
getchar_unlocked (void) __THROW
|
||||
{
|
||||
return __getc (stdin);
|
||||
}
|
||||
@ -590,7 +590,7 @@ extern int putchar __P ((int __c));
|
||||
|
||||
#ifdef __OPTIMIZE__
|
||||
extern __inline int
|
||||
putchar __P ((int __c))
|
||||
putchar (int __c) __THROW
|
||||
{
|
||||
return __putc (__c, stdout);
|
||||
}
|
||||
@ -602,7 +602,7 @@ extern int fputc_unlocked __P ((int __c, FILE *__stream));
|
||||
|
||||
# ifdef __OPTIMIZE__
|
||||
extern __inline int
|
||||
fputc_unlocked __P ((int __c, FILE *__stream))
|
||||
fputc_unlocked (int __c, FILE *__stream) __THROW
|
||||
{
|
||||
return __putc (__c, __stream);
|
||||
}
|
||||
@ -616,13 +616,13 @@ extern int putchar_unlocked __P ((int __c));
|
||||
|
||||
# ifdef __OPTIMIZE__
|
||||
extern __inline int
|
||||
putc_unlocked __P ((int __c, FILE *__stream))
|
||||
putc_unlocked (int __c, FILE *__stream) __THROW
|
||||
{
|
||||
return __putc (__c, __stream);
|
||||
}
|
||||
|
||||
extern __inline int
|
||||
putchar_unlocked __P ((int __c))
|
||||
putchar_unlocked (int __c) __THROW
|
||||
{
|
||||
return __putc (__c, stdout);
|
||||
}
|
||||
@ -673,7 +673,7 @@ ssize_t getline __P ((char **__lineptr, size_t *__n, FILE *__stream));
|
||||
|
||||
#ifdef __OPTIMIZE__
|
||||
extern __inline ssize_t
|
||||
getline __P ((char **__lineptr, size_t *__n, FILE *__stream))
|
||||
getline (char **__lineptr, size_t *__n, FILE *__stream) __THROW
|
||||
{
|
||||
return __getdelim (__lineptr, __n, '\n', __stream);
|
||||
}
|
||||
|
@ -236,31 +236,31 @@ extern unsigned long long int __strtoull_internal __P ((__const char *
|
||||
/* Define inline functions which call the internal entry points. */
|
||||
|
||||
extern __inline double
|
||||
strtod __P ((__const char *__restrict __nptr, char **__restrict __endptr))
|
||||
strtod (__const char *__restrict __nptr, char **__restrict __endptr) __THROW
|
||||
{
|
||||
return __strtod_internal (__nptr, __endptr, 0);
|
||||
}
|
||||
extern __inline long int
|
||||
strtol __P ((__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
int __base))
|
||||
strtol (__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{
|
||||
return __strtol_internal (__nptr, __endptr, __base, 0);
|
||||
}
|
||||
extern __inline unsigned long int
|
||||
strtoul __P ((__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
int __base))
|
||||
strtoul (__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{
|
||||
return __strtoul_internal (__nptr, __endptr, __base, 0);
|
||||
}
|
||||
|
||||
# ifdef __USE_ISOC9X
|
||||
extern __inline float
|
||||
strtof __P ((__const char *__restrict __nptr, char **__restrict __endptr))
|
||||
strtof (__const char *__restrict __nptr, char **__restrict __endptr) __THROW
|
||||
{
|
||||
return __strtof_internal (__nptr, __endptr, 0);
|
||||
}
|
||||
extern __inline __long_double_t
|
||||
strtold __P ((__const char *__restrict __nptr, char **__restrict __endptr))
|
||||
strtold (__const char *__restrict __nptr, char **__restrict __endptr) __THROW
|
||||
{
|
||||
return __strtold_internal (__nptr, __endptr, 0);
|
||||
}
|
||||
@ -268,14 +268,14 @@ strtold __P ((__const char *__restrict __nptr, char **__restrict __endptr))
|
||||
|
||||
# ifdef __USE_BSD
|
||||
__extension__ extern __inline long long int
|
||||
strtoq __P ((__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
int __base))
|
||||
strtoq (__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{
|
||||
return __strtoll_internal (__nptr, __endptr, __base, 0);
|
||||
}
|
||||
__extension__ extern __inline unsigned long long int
|
||||
strtouq __P ((__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
int __base))
|
||||
strtouq (__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{
|
||||
return __strtoull_internal (__nptr, __endptr, __base, 0);
|
||||
}
|
||||
@ -283,38 +283,38 @@ strtouq __P ((__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
|
||||
# if defined __USE_MISC || defined __USE_ISOC9X
|
||||
__extension__ extern __inline long long int
|
||||
strtoll __P ((__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
int __base))
|
||||
strtoll (__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{
|
||||
return __strtoll_internal (__nptr, __endptr, __base, 0);
|
||||
}
|
||||
__extension__ extern __inline unsigned long long int
|
||||
strtoull __P ((__const char * __restrict __nptr, char **__restrict __endptr,
|
||||
int __base))
|
||||
strtoull (__const char * __restrict __nptr, char **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{
|
||||
return __strtoull_internal (__nptr, __endptr, __base, 0);
|
||||
}
|
||||
# endif
|
||||
|
||||
extern __inline double
|
||||
atof __P ((__const char *__nptr))
|
||||
atof (__const char *__nptr) __THROW
|
||||
{
|
||||
return strtod (__nptr, (char **) NULL);
|
||||
}
|
||||
extern __inline int
|
||||
atoi __P ((__const char *__nptr))
|
||||
atoi (__const char *__nptr) __THROW
|
||||
{
|
||||
return (int) strtol (__nptr, (char **) NULL, 10);
|
||||
}
|
||||
extern __inline long int
|
||||
atol __P ((__const char *__nptr))
|
||||
atol (__const char *__nptr) __THROW
|
||||
{
|
||||
return strtol (__nptr, (char **) NULL, 10);
|
||||
}
|
||||
|
||||
# if defined __USE_MISC || defined __USE_ISOC9X
|
||||
__extension__ extern __inline long long int
|
||||
atoll __P ((__const char *__nptr))
|
||||
atoll (__const char *__nptr) __THROW
|
||||
{
|
||||
return strtoll (__nptr, (char **) NULL, 10);
|
||||
}
|
||||
|
@ -137,7 +137,8 @@ extern char *argz_next __P ((__const char *argz, size_t __argz_len,
|
||||
|
||||
#ifdef __USE_EXTERN_INLINES
|
||||
extern inline char *
|
||||
__argz_next __P ((__const char *__argz, size_t __argz_len, __const char *__entry))
|
||||
__argz_next (__const char *__argz, size_t __argz_len,
|
||||
__const char *__entry) __THROW
|
||||
{
|
||||
if (__entry)
|
||||
{
|
||||
@ -150,7 +151,8 @@ __argz_next __P ((__const char *__argz, size_t __argz_len, __const char *__entry
|
||||
return __argz_len > 0 ? (char *) __argz : 0;
|
||||
}
|
||||
extern inline char *
|
||||
argz_next __P ((__const char *__argz, size_t __argz_len, __const char *__entry))
|
||||
argz_next (__const char *__argz, size_t __argz_len,
|
||||
__const char *__entry) __THROW
|
||||
{
|
||||
return __argz_next (__argz, __argz_len, __entry);
|
||||
}
|
||||
|
@ -47,6 +47,17 @@ __opendir (const char *name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* We first have to check whether the name is for a directory. We
|
||||
cannot do this after the open() call since the open/close operation
|
||||
performed on, say, a tape device might have undesirable effects. */
|
||||
if (stat (name, &statbuf) < 0)
|
||||
return NULL;
|
||||
if (! S_ISDIR (statbuf.st_mode))
|
||||
{
|
||||
__set_errno (ENOTDIR);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fd = __open (name, O_RDONLY|O_NDELAY);
|
||||
if (fd < 0)
|
||||
return NULL;
|
||||
@ -54,14 +65,6 @@ __opendir (const char *name)
|
||||
if (__fcntl (fd, F_SETFD, FD_CLOEXEC) < 0)
|
||||
goto lose;
|
||||
|
||||
if (fstat (fd, &statbuf) < 0)
|
||||
goto lose;
|
||||
if (! S_ISDIR (statbuf.st_mode))
|
||||
{
|
||||
save_errno = ENOTDIR;
|
||||
goto lose2;
|
||||
}
|
||||
|
||||
#ifdef _STATBUF_ST_BLKSIZE
|
||||
if (statbuf.st_blksize < sizeof (struct dirent))
|
||||
allocation = sizeof (struct dirent);
|
||||
|
@ -200,7 +200,7 @@ struct cmsghdr
|
||||
extern struct cmsghdr *__cmsg_nxthdr __P ((struct msghdr *__mhdr,
|
||||
struct cmsghdr *__cmsg));
|
||||
_EXTERN_INLINE struct cmsghdr *
|
||||
__cmsg_nxthdr __P ((struct msghdr *__mhdr, struct cmsghdr *__cmsg))
|
||||
__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
|
||||
{
|
||||
if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
|
||||
/* The kernel header does this so there may be a reason. */
|
||||
|
@ -18,6 +18,7 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <string.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/signal.h>
|
||||
#include <errno.h>
|
||||
|
@ -278,8 +278,8 @@ extern long long int __strtoll_internal __P ((__const char *__restrict __nptr,
|
||||
# define __strtoll_internal_defined 1
|
||||
# endif
|
||||
extern __inline intmax_t
|
||||
strtoimax __P ((__const char *__restrict nptr, char **__restrict endptr,
|
||||
int base))
|
||||
strtoimax (__const char *__restrict nptr, char **__restrict endptr,
|
||||
int base) __THROW
|
||||
{
|
||||
return __strtoll_internal (nptr, endptr, base, 0);
|
||||
}
|
||||
@ -296,8 +296,8 @@ extern unsigned long long int __strtoull_internal __P ((__const char *
|
||||
# define __strtoull_internal_defined 1
|
||||
# endif
|
||||
extern __inline uintmax_t
|
||||
strtoumax __P ((__const char *__restrict nptr, char **__restrict endptr,
|
||||
int base))
|
||||
strtoumax (__const char *__restrict nptr, char **__restrict endptr,
|
||||
int base) __THROW
|
||||
{
|
||||
return __strtoull_internal (nptr, endptr, base, 0);
|
||||
}
|
||||
@ -312,8 +312,8 @@ extern long long int __wcstoll_internal __P ((__const wchar_t *
|
||||
# define __wcstoll_internal_defined 1
|
||||
# endif
|
||||
extern __inline intmax_t
|
||||
wcstoimax __P ((__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
|
||||
int base))
|
||||
wcstoimax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
|
||||
int base) __THROW
|
||||
{
|
||||
return __wcstoll_internal (nptr, endptr, base, 0);
|
||||
}
|
||||
@ -331,8 +331,8 @@ extern unsigned long long int __wcstoull_internal __P ((__const wchar_t *
|
||||
# define __wcstoull_internal_defined 1
|
||||
# endif
|
||||
extern __inline uintmax_t
|
||||
wcstoumax __P ((__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
|
||||
int base))
|
||||
wcstoumax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
|
||||
int base) __THROW
|
||||
{
|
||||
return __wcstoull_internal (nptr, endptr, base, 0);
|
||||
}
|
||||
|
@ -277,8 +277,8 @@ extern long int __strtol_internal __P ((__const char *__restrict __nptr,
|
||||
# define __strtol_internal_defined 1
|
||||
# endif
|
||||
extern __inline intmax_t
|
||||
strtoimax __P ((__const char *__restrict nptr, char **__restrict endptr,
|
||||
int base))
|
||||
strtoimax (__const char *__restrict nptr, char **__restrict endptr,
|
||||
int base) __THROW
|
||||
{
|
||||
return __strtol_internal (nptr, endptr, base, 0);
|
||||
}
|
||||
@ -292,8 +292,8 @@ extern unsigned long int __strtoul_internal __P ((__const char *
|
||||
# define __strtoul_internal_defined 1
|
||||
# endif
|
||||
extern __inline uintmax_t
|
||||
strtoumax __P ((__const char *__restrict nptr, char **__restrict endptr,
|
||||
int base))
|
||||
strtoumax (__const char *__restrict nptr, char **__restrict endptr,
|
||||
int base) __THROW
|
||||
{
|
||||
return __strtoul_internal (nptr, endptr, base, 0);
|
||||
}
|
||||
@ -306,8 +306,8 @@ extern long int __wcstol_internal __P ((__const wchar_t * __restrict __nptr,
|
||||
# define __wcstol_internal_defined 1
|
||||
# endif
|
||||
extern __inline intmax_t
|
||||
wcstoimax __P ((__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
|
||||
int base))
|
||||
wcstoimax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
|
||||
int base) __THROW
|
||||
{
|
||||
return __wcstol_internal (nptr, endptr, base, 0);
|
||||
}
|
||||
@ -323,8 +323,8 @@ extern unsigned long int __wcstoul_internal __P ((__const wchar_t *
|
||||
# define __wcstoul_internal_defined 1
|
||||
# endif
|
||||
extern __inline uintmax_t
|
||||
wcstoumax __P ((__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
|
||||
int base))
|
||||
wcstoumax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
|
||||
int base) __THROW
|
||||
{
|
||||
return __wcstoul_internal (nptr, endptr, base, 0);
|
||||
}
|
||||
|
@ -236,8 +236,8 @@ extern size_t mbrlen __P ((__const char *__restrict __s, size_t __n,
|
||||
#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ \
|
||||
&& defined __USE_EXTERN_INLINES
|
||||
/* Define inline function as optimization. */
|
||||
extern __inline size_t mbrlen __P ((__const char *__restrict __s, size_t __n,
|
||||
mbstate_t *__restrict __ps))
|
||||
extern __inline size_t mbrlen (__const char *__restrict __s, size_t __n,
|
||||
mbstate_t *__restrict __ps) __THROW
|
||||
{ return (__ps != NULL
|
||||
? mbrtowc (NULL, __s, __n, __ps) : __mbrlen (__s, __n, NULL)); }
|
||||
#endif
|
||||
@ -440,40 +440,37 @@ extern unsigned long long int __wcstoull_internal __P ((__const wchar_t *
|
||||
#if defined __OPTIMIZE__ && __GNUC__ >= 2
|
||||
/* Define inline functions which call the internal entry points. */
|
||||
|
||||
extern __inline double wcstod __P ((__const wchar_t *__restrict __nptr,
|
||||
wchar_t **__restrict __endptr))
|
||||
extern __inline double wcstod (__const wchar_t *__restrict __nptr,
|
||||
wchar_t **__restrict __endptr) __THROW
|
||||
{ return __wcstod_internal (__nptr, __endptr, 0); }
|
||||
extern __inline long int wcstol __P ((__const wchar_t *__restrict __nptr,
|
||||
extern __inline long int wcstol (__const wchar_t *__restrict __nptr,
|
||||
wchar_t **__restrict __endptr,
|
||||
int __base))
|
||||
int __base) __THROW
|
||||
{ return __wcstol_internal (__nptr, __endptr, __base, 0); }
|
||||
extern __inline unsigned long int wcstoul __P ((__const wchar_t *
|
||||
__restrict __nptr,
|
||||
extern __inline unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
|
||||
wchar_t **__restrict __endptr,
|
||||
int __base))
|
||||
int __base) __THROW
|
||||
{ return __wcstoul_internal (__nptr, __endptr, __base, 0); }
|
||||
|
||||
# ifdef __USE_GNU
|
||||
extern __inline float wcstof __P ((__const wchar_t *__restrict __nptr,
|
||||
wchar_t **__restrict __endptr))
|
||||
extern __inline float wcstof (__const wchar_t *__restrict __nptr,
|
||||
wchar_t **__restrict __endptr) __THROW
|
||||
{ return __wcstof_internal (__nptr, __endptr, 0); }
|
||||
extern __inline __long_double_t wcstold __P ((__const wchar_t *
|
||||
__restrict __nptr,
|
||||
wchar_t **__restrict __endptr))
|
||||
extern __inline __long_double_t wcstold (__const wchar_t *__restrict __nptr,
|
||||
wchar_t **__restrict __endptr) __THROW
|
||||
{ return __wcstold_internal (__nptr, __endptr, 0); }
|
||||
|
||||
|
||||
__extension__
|
||||
extern __inline long long int wcstoq __P ((__const wchar_t *__restrict __nptr,
|
||||
extern __inline long long int wcstoq (__const wchar_t *__restrict __nptr,
|
||||
wchar_t **__restrict __endptr,
|
||||
int __base))
|
||||
int __base) __THROW
|
||||
{ return __wcstoll_internal (__nptr, __endptr, __base, 0); }
|
||||
__extension__
|
||||
extern __inline unsigned long long int wcstouq __P ((__const wchar_t *
|
||||
extern __inline unsigned long long int wcstouq (__const wchar_t *
|
||||
__restrict __nptr,
|
||||
wchar_t **
|
||||
__restrict __endptr,
|
||||
int __base))
|
||||
wchar_t **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{ return __wcstoull_internal (__nptr, __endptr, __base, 0); }
|
||||
# endif /* Use GNU. */
|
||||
#endif /* Optimizing GCC >=2. */
|
||||
|
Loading…
Reference in New Issue
Block a user