From b2e79f980050562756250491e135cb3e5072b82f Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 22 Dec 2009 13:07:24 +0000 Subject: [PATCH] Fix getsubopt declaration. * libc/include/sys/unistd.h (suboptarg, getsubopt): Move... * libc/include/stdlib.h: ...here, to match POSIX for getsubopt. --- newlib/ChangeLog | 53 +++++++++++++++++--------------- newlib/libc/include/stdlib.h | 4 +++ newlib/libc/include/sys/unistd.h | 3 -- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 491c26139..660e700ba 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,19 +1,24 @@ +2009-12-22 Eric Blake + + * libc/include/sys/unistd.h (suboptarg, getsubopt): Move... + * libc/include/stdlib.h: ...here, to match POSIX for getsubopt. + 2009-12-17 Jeff Johnston - * NEWS: Update with 1.18.0 info. - * README: Ditto. - * acinclude.m4: Change version number to 1.18.0. - * aclocal.m4: Regenerated. - * configure: Ditto. - * doc/aclocal.m4: Ditto. - * doc/configure: Ditto. - * libc/*/aclocal.m4: Ditto. - * libc/*/configure: Ditto. - * libc/libc.texinfo: Ditto. - * libm/*/aclocal.m4: Ditto. - * libm/*/configure: Ditto. - * libm/libm.texinfo: Ditto. - * libc/sys/linux/shared.ld: Add VERS_1.18 + * NEWS: Update with 1.18.0 info. + * README: Ditto. + * acinclude.m4: Change version number to 1.18.0. + * aclocal.m4: Regenerated. + * configure: Ditto. + * doc/aclocal.m4: Ditto. + * doc/configure: Ditto. + * libc/*/aclocal.m4: Ditto. + * libc/*/configure: Ditto. + * libc/libc.texinfo: Ditto. + * libm/*/aclocal.m4: Ditto. + * libm/*/configure: Ditto. + * libm/libm.texinfo: Ditto. + * libc/sys/linux/shared.ld: Add VERS_1.18 2009-12-17 Jeff Johnston @@ -44,7 +49,7 @@ 2009-12-17 Ralf Corsépius * libc/include/machine/ieeefp.h: Rework __IEEE_*_ENDIAN handling. - * libc/machine/arm/machine/endian.h: Remove (Conflicts with + * libc/machine/arm/machine/endian.h: Remove (Conflicts with libc/include/machine/endian.h) 2009-12-17 Ralf Corsépius @@ -53,7 +58,7 @@ 2009-12-17 Ralf Corsepius - * libc/include/pthread.h: Add pthread_atfork, pthread_rwlock_unlock + * libc/include/pthread.h: Add pthread_atfork, pthread_rwlock_unlock * libc/include/sys/stat.h: Use struct timespec st_*tim, blksize_t st_blksize, blkcnt_t st_blocks. Add st_*time compatibility macros. @@ -75,17 +80,17 @@ 2009-12-16 Ralf Corsépius - * libc/sys/rtems/machine/_types.h: New (Derived from + * libc/sys/rtems/machine/_types.h: New (Derived from machine/_default_types.h). - * libc/sys/rtems/crt0.c: Rework. Introduce macro RTEMS_STUB. + * libc/sys/rtems/crt0.c: Rework. Introduce macro RTEMS_STUB. * libc/sys/rtems/sys/param.h: - Update copyright notice from FreeBSD. - Remove HZ. - Add #include - Remove priority handling (moved to sys/priority.h). - Remove CLBYTES (Unused, abandoned in BSD). + Update copyright notice from FreeBSD. + Remove HZ. + Add #include + Remove priority handling (moved to sys/priority.h). + Remove CLBYTES (Unused, abandoned in BSD). * libc/sys/rtems/sys/queue.h: Update copyright (from FreeBSD). - Remove CIRCLEQ_*. + Remove CIRCLEQ_*. 2009-12-15 Conny Marco Menebrocker diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h index 82a2207f5..b33503d82 100644 --- a/newlib/libc/include/stdlib.h +++ b/newlib/libc/include/stdlib.h @@ -83,6 +83,10 @@ char * _EXFUN(getenv,(const char *__string)); char * _EXFUN(_getenv_r,(struct _reent *, const char *__string)); char * _EXFUN(_findenv,(_CONST char *, int *)); char * _EXFUN(_findenv_r,(struct _reent *, _CONST char *, int *)); +#ifndef __STRICT_ANSI__ +extern char *suboptarg; /* getsubopt(3) external variable */ +int _EXFUN(getsubopt,(char **, char * const *, char **)); +#endif long _EXFUN(labs,(long)); ldiv_t _EXFUN(ldiv,(long __numer, long __denom)); _PTR _EXFUN_NOTHROW(malloc,(size_t __size)); diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index 80c35daf3..419300253 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -191,9 +191,6 @@ extern int optreset; /* getopt(3) external variable */ #ifndef _POSIX_SOURCE pid_t _EXFUN(vfork, (void )); - -extern char *suboptarg; /* getsubopt(3) external variable */ -int getsubopt(char **, char * const *, char **); #endif /* _POSIX_SOURCE */ #ifdef _COMPILING_NEWLIB