aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-02-06 17:01:26 -0800
committerPaul Eggert2011-02-06 17:01:26 -0800
commit595785701d1fe44d8abac5a1454f2468a0482bf0 (patch)
treea64680a308c1824001e0d6f92be804992d70e629
parentc5aff743c3963a8fdaab628d2b695df50432e0de (diff)
downloademacs-595785701d1fe44d8abac5a1454f2468a0482bf0.tar.gz
emacs-595785701d1fe44d8abac5a1454f2468a0482bf0.zip
gnulib: allow multiple gnulib generated replacements to coexist
This defines a few preprocessor symbols that should not affect Emacs. * lib/getopt.in.h, lib/time.in.h, lib/unistd.in.h: Regenerate via "make sync-from-gnulib".
-rw-r--r--ChangeLog5
-rw-r--r--lib/getopt.in.h3
-rw-r--r--lib/time.in.h10
-rw-r--r--lib/unistd.in.h3
4 files changed, 19 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ec53bb0ecd5..07f01d6207e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
12011-02-06 Paul Eggert <eggert@cs.ucla.edu> 12011-02-06 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 gnulib: allow multiple gnulib generated replacements to coexist
4 This defines a few preprocessor symbols that should not affect Emacs.
5 * lib/getopt.in.h, lib/time.in.h, lib/unistd.in.h: Regenerate
6 via "make sync-from-gnulib".
7
3 gnulib: undo previous change 8 gnulib: undo previous change
4 The upstream _HEADERS change was backed out of gnulib (see the 9 The upstream _HEADERS change was backed out of gnulib (see the
5 same thread). Stay in sync with gnulib. 10 same thread). Stay in sync with gnulib.
diff --git a/lib/getopt.in.h b/lib/getopt.in.h
index 9b0a9a58bc9..82e2937d6d2 100644
--- a/lib/getopt.in.h
+++ b/lib/getopt.in.h
@@ -181,6 +181,7 @@ extern int optopt;
181 one). For long options that have a zero `flag' field, `getopt' 181 one). For long options that have a zero `flag' field, `getopt'
182 returns the contents of the `val' field. */ 182 returns the contents of the `val' field. */
183 183
184# if !GNULIB_defined_struct_option
184struct option 185struct option
185{ 186{
186 const char *name; 187 const char *name;
@@ -190,6 +191,8 @@ struct option
190 int *flag; 191 int *flag;
191 int val; 192 int val;
192}; 193};
194# define GNULIB_defined_struct_option 1
195# endif
193 196
194/* Names for the values of the `has_arg' field of `struct option'. */ 197/* Names for the values of the `has_arg' field of `struct option'. */
195 198
diff --git a/lib/time.in.h b/lib/time.in.h
index 2d6da7161fb..cb533a46e10 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -69,13 +69,16 @@
69extern "C" { 69extern "C" {
70# endif 70# endif
71 71
72# undef timespec 72# if !GNULIB_defined_struct_timespec
73# define timespec rpl_timespec 73# undef timespec
74# define timespec rpl_timespec
74struct timespec 75struct timespec
75{ 76{
76 time_t tv_sec; 77 time_t tv_sec;
77 long int tv_nsec; 78 long int tv_nsec;
78}; 79};
80# define GNULIB_defined_struct_timespec 1
81# endif
79 82
80# ifdef __cplusplus 83# ifdef __cplusplus
81} 84}
@@ -84,6 +87,7 @@ struct timespec
84# endif 87# endif
85# endif 88# endif
86 89
90# if !GNULIB_defined_struct_time_t_must_be_integral
87/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires 91/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires
88 time_t to be an integer type, even though C99 permits floating 92 time_t to be an integer type, even though C99 permits floating
89 point. We don't know of any implementation that uses floating 93 point. We don't know of any implementation that uses floating
@@ -92,6 +96,8 @@ struct timespec
92struct __time_t_must_be_integral { 96struct __time_t_must_be_integral {
93 unsigned int __floating_time_t_unsupported : (time_t) 1; 97 unsigned int __floating_time_t_unsupported : (time_t) 1;
94}; 98};
99# define GNULIB_defined_struct_time_t_must_be_integral 1
100# endif
95 101
96/* Sleep for at least RQTP seconds unless interrupted, If interrupted, 102/* Sleep for at least RQTP seconds unless interrupted, If interrupted,
97 return -1 and store the remaining time into RMTP. See 103 return -1 and store the remaining time into RMTP. See
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index 14d685e0c8f..15893d7eecc 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -796,11 +796,14 @@ _GL_CXXALIAS_RPL (getpagesize, int, (void));
796# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 796# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
797# define getpagesize() _gl_getpagesize () 797# define getpagesize() _gl_getpagesize ()
798# else 798# else
799# if !GNULIB_defined_getpagesize_function
799static inline int 800static inline int
800getpagesize () 801getpagesize ()
801{ 802{
802 return _gl_getpagesize (); 803 return _gl_getpagesize ();
803} 804}
805# define GNULIB_defined_getpagesize_function 1
806# endif
804# endif 807# endif
805# endif 808# endif
806# endif 809# endif