[I pushed this after discovering a porting problem on
that platform.]
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.
---
ChangeLog | 17 +++++++++++++++++
lib/argp-fmtstream.h | 6 +++---
lib/argp.h | 6 +++---
3 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 40a5d1c..fe530ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2012-12-22 Paul Eggert <egg...@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 <egg...@cs.ucla.edu>
AC_PROG_MKDIR_P: port workaround to pre-2.62 Autoconf
diff --git a/lib/argp-fmtstream.h b/lib/argp-fmtstream.h
index 3de0979..8247fc2 100644
--- a/lib/argp-fmtstream.h
+++ b/lib/argp-fmtstream.h
@@ -154,7 +154,7 @@ extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
#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 void __argp_fmtstream_update (argp_fmtstream_t __fs);
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 @@ __argp_fmtstream_point (argp_fmtstream_t __fs)
_GL_INLINE_HEADER_END
#endif
-#endif /* __OPTIMIZE__ */
+#endif /* !_LIBC || __OPTIMIZE__ */
#endif /* ARGP_FMTSTREAM_USE_LINEWRAP */
diff --git a/lib/argp.h b/lib/argp.h
index 8a7654a..5ca26de 100644
--- a/lib/argp.h
+++ b/lib/argp.h
@@ -519,7 +519,7 @@ extern void __argp_state_help (const struct argp_state
*__restrict __state,
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 @@ extern void __argp_failure (const struct argp_state
*__restrict __state,
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 @@ extern void *__argp_input (const struct argp *__restrict
__argp,
const struct argp_state *__restrict __state)
__THROW;
-#ifdef __USE_EXTERN_INLINES
+#if !_LIBC || defined __USE_EXTERN_INLINES
# if !_LIBC
# define __argp_usage argp_usage
--
1.7.11.7