Mercurial > gnulib
annotate modules/stdlib @ 14316:6f2788453d27
Split large sed scripts, for HP-UX sed.
* modules/math (Makefile.am): Split sed scripts around 50 sed commands,
to avoid HP-UX limit of 99 commands, in the near future.
* modules/stdlib (Makefile.am): Likewise.
* modules/unistd (Makefile.am): Likewise.
* modules/wchar (Makefile.am): Likewise.
Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
Suggestion by Ralf Wildenhues <Ralf.Wildenhues@gmx.de> in
<http://lists.gnu.org/archive/html/bug-gnulib/2010-01/msg00216.html>.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Wed, 09 Feb 2011 00:16:54 +0100 |
parents | 289c9659c1c4 |
children | d9460671313e |
rev | line source |
---|---|
8190 | 1 Description: |
2 A GNU-like <stdlib.h>. | |
3 | |
4 Files: | |
9263
bb62a6456893
Rename stdlib_.h to stdlib.in.h.
Bruno Haible <bruno@clisp.org>
parents:
9192
diff
changeset
|
5 lib/stdlib.in.h |
8190 | 6 m4/stdlib_h.m4 |
7 | |
8 Depends-on: | |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12422
diff
changeset
|
9 arg-nonnull |
12941
0c9896a5a035
stdlib: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
10 c++defs |
9781
118f0bb3f732
Fix commit from 2007-06-20.
Bruno Haible <bruno@clisp.org>
parents:
9545
diff
changeset
|
11 include_next |
11832
ff3dd373542b
stddef: fix NetBSD 5.0 NULL bug, rather than working around it
Eric Blake <ebb9@byu.net>
parents:
11428
diff
changeset
|
12 stddef |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12422
diff
changeset
|
13 unistd |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12422
diff
changeset
|
14 warn-on-use |
8190 | 15 |
16 configure.ac: | |
17 gl_STDLIB_H | |
18 | |
19 Makefile.am: | |
20 BUILT_SOURCES += stdlib.h | |
21 | |
22 # We need the following in order to create <stdlib.h> when the system | |
23 # doesn't have one that works with the given compiler. | |
12941
0c9896a5a035
stdlib: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
24 stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) |
11868
67c2b22aff08
annotate automake snippets with $(AM_V_GEN) and $(AM_V_at)
Jim Meyering <meyering@redhat.com>
parents:
11832
diff
changeset
|
25 $(AM_V_GEN)rm -f $@-t $@ && \ |
8190 | 26 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ |
10375
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10001
diff
changeset
|
27 sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ |
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10001
diff
changeset
|
28 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ |
13761
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13751
diff
changeset
|
29 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
8819
diff
changeset
|
30 -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ |
13457 | 31 -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \ |
11997 | 32 -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \ |
9190 | 33 -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \ |
12015
9317d4a9ac96
canonicalize, canonicalize-lgpl: use <stdlib.h>
Eric Blake <ebb9@byu.net>
parents:
12008
diff
changeset
|
34 -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \ |
10673 | 35 -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \ |
8198
d84ab7c183f4
getsubopt.h is replaced with <stdlib.h>.
Bruno Haible <bruno@clisp.org>
parents:
8190
diff
changeset
|
36 -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ |
13028 | 37 -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \ |
11997 | 38 -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \ |
8190 | 39 -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ |
11882 | 40 -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \ |
12234
b45701f2ff71
mkstemps, mkostemps: new modules
Eric Blake <ebb9@byu.net>
parents:
12018
diff
changeset
|
41 -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \ |
8190 | 42 -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ |
12234
b45701f2ff71
mkstemps, mkostemps: new modules
Eric Blake <ebb9@byu.net>
parents:
12018
diff
changeset
|
43 -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \ |
13025 | 44 -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \ |
9434
b839560eec9f
Define the putenv substitute in <stdlib.h> rather than in <config.h>.
Bruno Haible <bruno@clisp.org>
parents:
9315
diff
changeset
|
45 -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \ |
10704 | 46 -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \ |
11997 | 47 -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \ |
12015
9317d4a9ac96
canonicalize, canonicalize-lgpl: use <stdlib.h>
Eric Blake <ebb9@byu.net>
parents:
12008
diff
changeset
|
48 -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \ |
10001 | 49 -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \ |
9545
c596ca4e89b4
Split setenv module into setenv and unsetenv. Get rid of setenv.h.
Bruno Haible <bruno@clisp.org>
parents:
9434
diff
changeset
|
50 -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \ |
9821
18bab9955c43
Document various strtod bugs, with some fixes.
Eric Blake <ebb9@byu.net>
parents:
9781
diff
changeset
|
51 -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \ |
10671
459974cd8b12
Add strtoll() declaration to <stdlib.h>.
Bruno Haible <bruno@clisp.org>
parents:
10665
diff
changeset
|
52 -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \ |
10672
66414a3e577c
Add strtoull() declaration to <stdlib.h>.
Bruno Haible <bruno@clisp.org>
parents:
10671
diff
changeset
|
53 -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \ |
13751
0bf7f277a1af
New module 'system-posix'.
Bruno Haible <bruno@clisp.org>
parents:
13682
diff
changeset
|
54 -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \ |
13030 | 55 -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \ |
9545
c596ca4e89b4
Split setenv module into setenv and unsetenv. Get rid of setenv.h.
Bruno Haible <bruno@clisp.org>
parents:
9434
diff
changeset
|
56 -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \ |
14316
6f2788453d27
Split large sed scripts, for HP-UX sed.
Bruno Haible <bruno@clisp.org>
parents:
14314
diff
changeset
|
57 < $(srcdir)/stdlib.in.h | \ |
6f2788453d27
Split large sed scripts, for HP-UX sed.
Bruno Haible <bruno@clisp.org>
parents:
14314
diff
changeset
|
58 sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ |
10673 | 59 -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ |
12015
9317d4a9ac96
canonicalize, canonicalize-lgpl: use <stdlib.h>
Eric Blake <ebb9@byu.net>
parents:
12008
diff
changeset
|
60 -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ |
11997 | 61 -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ |
8198
d84ab7c183f4
getsubopt.h is replaced with <stdlib.h>.
Bruno Haible <bruno@clisp.org>
parents:
8190
diff
changeset
|
62 -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ |
13028 | 63 -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ |
8190 | 64 -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ |
11882 | 65 -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ |
12234
b45701f2ff71
mkstemps, mkostemps: new modules
Eric Blake <ebb9@byu.net>
parents:
12018
diff
changeset
|
66 -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ |
13120
0f4b3b66e73c
mkstemp: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
13030
diff
changeset
|
67 -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ |
12234
b45701f2ff71
mkstemps, mkostemps: new modules
Eric Blake <ebb9@byu.net>
parents:
12018
diff
changeset
|
68 -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ |
13025 | 69 -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ |
11997 | 70 -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ |
71 -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ | |
12016
4fac822214af
canonicalize-lgpl: use native realpath if it works
Eric Blake <ebb9@byu.net>
parents:
12015
diff
changeset
|
72 -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ |
10001 | 73 -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ |
13947
4ca29955b657
setenv: Add missing declaration on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents:
13761
diff
changeset
|
74 -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ |
9821
18bab9955c43
Document various strtod bugs, with some fixes.
Eric Blake <ebb9@byu.net>
parents:
9781
diff
changeset
|
75 -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ |
10671
459974cd8b12
Add strtoll() declaration to <stdlib.h>.
Bruno Haible <bruno@clisp.org>
parents:
10665
diff
changeset
|
76 -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ |
10672
66414a3e577c
Add strtoull() declaration to <stdlib.h>.
Bruno Haible <bruno@clisp.org>
parents:
10671
diff
changeset
|
77 -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ |
10719
620520e8b04c
stdlib: Provide struct random_data.
Simon Josefsson <simon@josefsson.org>
parents:
10704
diff
changeset
|
78 -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ |
10665
5394a3a10398
Add a getloadavg() declaration to <stdlib.h>.
Bruno Haible <bruno@clisp.org>
parents:
10375
diff
changeset
|
79 -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ |
13030 | 80 -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ |
13948
4d99f06b61cd
unsetenv: Add missing declaration on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents:
13947
diff
changeset
|
81 -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ |
13438
425a8899539e
Fix HAVE_CALLOC_POSIX misnomer.
Bruno Haible <bruno@clisp.org>
parents:
13436
diff
changeset
|
82 -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ |
12018
586fda772b8f
canonicalize-lgpl: fix glibc bug with trailing slash
Eric Blake <ebb9@byu.net>
parents:
12016
diff
changeset
|
83 -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ |
13434
3075f4843802
Fix HAVE_MALLOC_POSIX misnomer.
Bruno Haible <bruno@clisp.org>
parents:
13120
diff
changeset
|
84 -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ |
8190 | 85 -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ |
9434
b839560eec9f
Define the putenv substitute in <stdlib.h> rather than in <config.h>.
Bruno Haible <bruno@clisp.org>
parents:
9315
diff
changeset
|
86 -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ |
13436
cb3c3063dacf
Fix HAVE_REALLOC_POSIX misnomer.
Bruno Haible <bruno@clisp.org>
parents:
13434
diff
changeset
|
87 -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ |
12015
9317d4a9ac96
canonicalize, canonicalize-lgpl: use <stdlib.h>
Eric Blake <ebb9@byu.net>
parents:
12008
diff
changeset
|
88 -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ |
12300
c8288fd3f281
setenv, unsetenv: work around various bugs
Eric Blake <ebb9@byu.net>
parents:
12234
diff
changeset
|
89 -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ |
9821
18bab9955c43
Document various strtod bugs, with some fixes.
Eric Blake <ebb9@byu.net>
parents:
9781
diff
changeset
|
90 -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ |
12300
c8288fd3f281
setenv, unsetenv: work around various bugs
Eric Blake <ebb9@byu.net>
parents:
12234
diff
changeset
|
91 -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ |
12941
0c9896a5a035
stdlib: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
92 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12410
diff
changeset
|
93 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ |
14316
6f2788453d27
Split large sed scripts, for HP-UX sed.
Bruno Haible <bruno@clisp.org>
parents:
14314
diff
changeset
|
94 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ |
11868
67c2b22aff08
annotate automake snippets with $(AM_V_GEN) and $(AM_V_at)
Jim Meyering <meyering@redhat.com>
parents:
11832
diff
changeset
|
95 } > $@-t && \ |
8190 | 96 mv $@-t $@ |
97 MOSTLYCLEANFILES += stdlib.h stdlib.h-t | |
98 | |
99 Include: | |
12008
18ea6ab4e81d
maint: make Include sections of modules consistent
Eric Blake <ebb9@byu.net>
parents:
11997
diff
changeset
|
100 <stdlib.h> |
8190 | 101 |
102 License: | |
9315
be88e4511678
Change license to LGPLv2+ on dummy, float, realloc, stdlib.
Simon Josefsson <simon@josefsson.org>
parents:
9263
diff
changeset
|
103 LGPLv2+ |
8190 | 104 |
105 Maintainer: | |
106 all |