Mercurial > hg > octave-lojdl > gnulib-hg
changeset 17216:03a686917ca6
argp: port new 'inline' approach to Sun C 5.12 + Solaris 10
On this platform, we are not optimizing but we are using
the substitute for extern inlines, so compile as if
C99-style extern inline, or a substitute, is available.
* lib/argp-fmtstream.h (argp_fmtstream_set_lmargin)
(__argp_fmtstream_set_lmargin, argp_fmtstream_set_rmargin)
(__argp_fmtstream_set_rmargin, argp_fmtstream_set_wmargin)
(__argp_fmtstream_set_wmargin, argp_fmtstream_point)
(__argp_fmtstream_point) [!_LIBC && !__OPTIMIZE__]:
Declare as ARGP_FS_EI, not as extern.
* lib/argp.h (argp_usage, __argp_usage, _option_is_short)
(__option_is_short, _option_is_end, __option_is_end)
[!_LIBC && __USE_EXTERN_INLINES]:
Declare as ARGP_EI, not as extern.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sat, 22 Dec 2012 15:34:16 -0800 |
parents | 567abe96b5ab |
children | 377436e17e3f |
files | ChangeLog lib/argp-fmtstream.h lib/argp.h |
diffstat | 3 files changed, 23 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2012-12-22 Paul Eggert <eggert@cs.ucla.edu> + + argp: port new 'inline' approach to Sun C 5.12 + Solaris 10 + On this platform, we are not optimizing but we are using + the substitute for extern inlines, so compile as if + C99-style extern inline, or a substitute, is available. + * lib/argp-fmtstream.h (argp_fmtstream_set_lmargin) + (__argp_fmtstream_set_lmargin, argp_fmtstream_set_rmargin) + (__argp_fmtstream_set_rmargin, argp_fmtstream_set_wmargin) + (__argp_fmtstream_set_wmargin, argp_fmtstream_point) + (__argp_fmtstream_point) [!_LIBC && !__OPTIMIZE__]: + Declare as ARGP_FS_EI, not as extern. + * lib/argp.h (argp_usage, __argp_usage, _option_is_short) + (__option_is_short, _option_is_end, __option_is_end) + [!_LIBC && __USE_EXTERN_INLINES]: + Declare as ARGP_EI, not as extern. + 2012-12-21 Paul Eggert <eggert@cs.ucla.edu> AC_PROG_MKDIR_P: port workaround to pre-2.62 Autoconf
--- a/lib/argp-fmtstream.h +++ b/lib/argp-fmtstream.h @@ -154,7 +154,7 @@ #define __argp_fmtstream_rmargin argp_fmtstream_rmargin #define __argp_fmtstream_wmargin argp_fmtstream_wmargin -#if _LIBC || !defined __OPTIMIZE__ +#if _LIBC /* Set __FS's left margin to LMARGIN and return the old value. */ extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, size_t __lmargin); @@ -184,7 +184,7 @@ extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount); extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount); -#ifdef __OPTIMIZE__ +#if !_LIBC || defined __OPTIMIZE__ /* Inline versions of above routines. */ #if !_LIBC @@ -352,7 +352,7 @@ _GL_INLINE_HEADER_END #endif -#endif /* __OPTIMIZE__ */ +#endif /* !_LIBC || __OPTIMIZE__ */ #endif /* ARGP_FMTSTREAM_USE_LINEWRAP */
--- a/lib/argp.h +++ b/lib/argp.h @@ -519,7 +519,7 @@ FILE *__restrict __stream, unsigned int __flags); -#if _LIBC || !defined __USE_EXTERN_INLINES +#if _LIBC /* Possibly output the standard usage message for ARGP to stderr and exit. */ extern void argp_usage (const struct argp_state *__state); extern void __argp_usage (const struct argp_state *__state); @@ -552,7 +552,7 @@ const char *__restrict __fmt, ...) _GL_ATTRIBUTE_FORMAT ((__printf__, 4, 5)); -#if _LIBC || !defined __USE_EXTERN_INLINES +#if _LIBC /* Returns true if the option OPT is a valid short option. */ extern int _option_is_short (const struct argp_option *__opt) __THROW; extern int __option_is_short (const struct argp_option *__opt) __THROW; @@ -572,7 +572,7 @@ const struct argp_state *__restrict __state) __THROW; -#ifdef __USE_EXTERN_INLINES +#if !_LIBC || defined __USE_EXTERN_INLINES # if !_LIBC # define __argp_usage argp_usage