Codebase list libntlm / 5f3dc83
New upstream version 1.6 Simon Josefsson 4 years ago
129 changed file(s) with 5465 addition(s) and 2566 deletion(s). Raw diff Collapse all Expand all
00 Libntlm AUTHORS -- information about the authors
1 Copyright (C) 2002-2018 Simon Josefsson
1 Copyright (C) 2002-2020 Simon Josefsson
22 See the end for copying conditions.
33
44 Please do not send general e-mail about the library to the addresses
0 2020-04-19 Simon Josefsson <simon@josefsson.org>
1
2 * NEWS: Version 1.6.
3
4 2020-04-19 Simon Josefsson <simon@josefsson.org>
5
6 * ChangeLog: Generated.
7
8 2020-04-19 Simon Josefsson <simon@josefsson.org>
9
10 * .gitignore: Ignore more.
11
12 2020-04-19 Simon Josefsson <simon@josefsson.org>
13
14 * build-aux/update-copyright, build-aux/useless-if-before-free,
15 gl/tests/test-update-copyright.sh: Update gnulib files.
16
17 2020-04-19 Simon Josefsson <simon@josefsson.org>
18
19 * NEWS, THANKS: Add NEWS entry about buffer overflow bug.
20
21 2020-04-19 Simon Josefsson <simon@josefsson.org>
22
23 * Makefile.am, test_CVE-2019-17455.c: Add regression check for
24 CVE-2019-17455 overflow.
25
26 2020-04-19 Simon Josefsson <simon@josefsson.org>
27
28 * ntlm.h.in, smbutil.c: Improve namespace.
29
30 2020-04-19 Simon Josefsson <simon@josefsson.org>
31
32 * ntlm.h.in, smbutil.c: Fix buffer overflow. Patch from Cedric
33 Buissart based on report by Kirin. CVE-2019-17455 <https://gitlab.com/jas/libntlm/-/issues/2>
34
35 2020-03-22 Simon Josefsson <simon@josefsson.org>
36
37 * .clcopying, AUTHORS, ChangeLog, NEWS, README, THANKS, cfg.mk,
38 configure.ac, libntlm.pc.in, libntlm4win.mk, smbencrypt.c,
39 smbutil.c, test_ntlm.c: Update copyright years.
40
41 2020-03-22 Simon Josefsson <simon@josefsson.org>
42
43 * Makefile.am: Modernize automake usage.
44
45 2020-03-22 Simon Josefsson <simon@josefsson.org>
46
47 * .gitlab-ci.yml: Run on glr1.
48
49 2020-03-22 Simon Josefsson <simon@josefsson.org>
50
51 * .gitignore, GNUmakefile, build-aux/update-copyright,
52 build-aux/useless-if-before-free, build-aux/vc-list-files,
53 gl/Makefile.am, gl/arg-nonnull.h, gl/byteswap.in.h, gl/c++defs.h,
54 gl/cdefs.h, gl/check-version.c, gl/check-version.h, gl/des.c,
55 gl/des.h, gl/libc-config.h, gl/limits.in.h, gl/m4/00gnulib.m4,
56 gl/m4/__inline.m4, gl/m4/absolute-header.m4, gl/m4/autobuild.m4,
57 gl/m4/byteswap.m4, gl/m4/extensions.m4, gl/m4/extern-inline.m4,
58 gl/m4/gnulib-cache.m4, gl/m4/gnulib-common.m4,
59 gl/m4/gnulib-comp.m4, gl/m4/gnulib-tool.m4, gl/m4/include_next.m4,
60 gl/m4/inline.m4, gl/m4/inttypes-pri.m4, gl/m4/inttypes.m4,
61 gl/m4/limits-h.m4, gl/m4/longlong.m4, gl/m4/manywarnings-c++.m4,
62 gl/m4/manywarnings.m4, gl/m4/md4.m4, gl/m4/multiarch.m4,
63 gl/m4/off_t.m4, gl/m4/ssize_t.m4, gl/m4/stdalign.m4,
64 gl/m4/stdbool.m4, gl/m4/stddef_h.m4, gl/m4/stdint.m4,
65 gl/m4/string_h.m4, gl/m4/strverscmp.m4, gl/m4/sys_types_h.m4,
66 gl/m4/unistd_h.m4, gl/m4/valgrind-tests.m4, gl/m4/warn-on-use.m4,
67 gl/m4/warnings.m4, gl/m4/wchar_h.m4, gl/m4/wchar_t.m4,
68 gl/m4/wint_t.m4, gl/m4/zzgnulib.m4, gl/md4.c, gl/md4.h,
69 gl/stdalign.in.h, gl/stdbool.in.h, gl/stddef.in.h, gl/stdint.in.h,
70 gl/string.in.h, gl/strverscmp.c, gl/sys_types.in.h,
71 gl/tests/Makefile.am, gl/tests/arg-nonnull.h, gl/tests/c++defs.h,
72 gl/tests/dummy.c, gl/tests/init.sh, gl/tests/intprops.h,
73 gl/tests/inttypes.in.h, gl/tests/macros.h, gl/tests/signature.h,
74 gl/tests/test-byteswap.c, gl/tests/test-des.c,
75 gl/tests/test-init.sh, gl/tests/test-intprops.c,
76 gl/tests/test-inttypes.c, gl/tests/test-limits-h.c,
77 gl/tests/test-md4.c, gl/tests/test-stdalign.c,
78 gl/tests/test-stdbool.c, gl/tests/test-stddef.c,
79 gl/tests/test-stdint.c, gl/tests/test-string.c,
80 gl/tests/test-strverscmp.c, gl/tests/test-sys_types.c,
81 gl/tests/test-unistd.c, gl/tests/test-update-copyright.sh,
82 gl/tests/test-vc-list-files-cvs.sh,
83 gl/tests/test-vc-list-files-git.sh, gl/tests/test-verify-try.c,
84 gl/tests/test-verify.c, gl/tests/test-wchar.c, gl/tests/verify.h,
85 gl/tests/warn-on-use.h, gl/tests/wchar.in.h, gl/unistd.in.h,
86 gl/warn-on-use.h, maint.mk: Update gnulib files.
87
88 2019-07-20 Simon Josefsson <simon@josefsson.org>
89
90 * .clcopying, AUTHORS, ChangeLog, Makefile.am, NEWS, README,
91 THANKS, cfg.mk, libntlm.pc.in, libntlm4win.mk, smbencrypt.c,
92 smbutil.c, test_ntlm.c: Update copyright years.
93
94 2019-07-20 Simon Josefsson <simon@josefsson.org>
95
96 * build-aux/update-copyright, gl/Makefile.am,
97 gl/m4/gnulib-cache.m4, gl/m4/gnulib-comp.m4, gl/tests/Makefile.am,
98 gl/tests/test-update-copyright.sh: Add update-copyright gnulib
99 module.
100
101 2019-07-20 Simon Josefsson <simon@josefsson.org>
102
103 * GNUmakefile, build-aux/useless-if-before-free,
104 build-aux/vc-list-files, gl/Makefile.am, gl/arg-nonnull.h,
105 gl/byteswap.in.h, gl/c++defs.h, gl/cdefs.h, gl/check-version.c,
106 gl/check-version.h, gl/des.c, gl/des.h, gl/libc-config.h,
107 gl/limits.in.h, gl/m4/00gnulib.m4, gl/m4/__inline.m4,
108 gl/m4/absolute-header.m4, gl/m4/autobuild.m4, gl/m4/byteswap.m4,
109 gl/m4/extensions.m4, gl/m4/extern-inline.m4, gl/m4/gnulib-cache.m4,
110 gl/m4/gnulib-common.m4, gl/m4/gnulib-comp.m4, gl/m4/gnulib-tool.m4,
111 gl/m4/include_next.m4, gl/m4/inline.m4, gl/m4/inttypes-pri.m4,
112 gl/m4/inttypes.m4, gl/m4/limits-h.m4, gl/m4/longlong.m4,
113 gl/m4/manywarnings-c++.m4, gl/m4/manywarnings.m4, gl/m4/md4.m4,
114 gl/m4/multiarch.m4, gl/m4/off_t.m4, gl/m4/ssize_t.m4,
115 gl/m4/stdalign.m4, gl/m4/stdbool.m4, gl/m4/stddef_h.m4,
116 gl/m4/stdint.m4, gl/m4/string_h.m4, gl/m4/strverscmp.m4,
117 gl/m4/sys_types_h.m4, gl/m4/unistd_h.m4, gl/m4/valgrind-tests.m4,
118 gl/m4/warn-on-use.m4, gl/m4/warnings.m4, gl/m4/wchar_h.m4,
119 gl/m4/wchar_t.m4, gl/m4/wint_t.m4, gl/md4.c, gl/md4.h,
120 gl/stdalign.in.h, gl/stdbool.in.h, gl/stddef.in.h, gl/stdint.in.h,
121 gl/string.in.h, gl/strverscmp.c, gl/sys_types.in.h,
122 gl/tests/Makefile.am, gl/tests/arg-nonnull.h, gl/tests/c++defs.h,
123 gl/tests/dummy.c, gl/tests/init.sh, gl/tests/intprops.h,
124 gl/tests/inttypes.in.h, gl/tests/macros.h, gl/tests/signature.h,
125 gl/tests/test-byteswap.c, gl/tests/test-des.c,
126 gl/tests/test-init.sh, gl/tests/test-intprops.c,
127 gl/tests/test-inttypes.c, gl/tests/test-limits-h.c,
128 gl/tests/test-md4.c, gl/tests/test-stdalign.c,
129 gl/tests/test-stdbool.c, gl/tests/test-stddef.c,
130 gl/tests/test-stdint.c, gl/tests/test-string.c,
131 gl/tests/test-strverscmp.c, gl/tests/test-sys_types.c,
132 gl/tests/test-unistd.c, gl/tests/test-vc-list-files-cvs.sh,
133 gl/tests/test-vc-list-files-git.sh, gl/tests/test-verify-try.c,
134 gl/tests/test-verify.c, gl/tests/test-wchar.c, gl/tests/verify.h,
135 gl/tests/warn-on-use.h, gl/tests/wchar.in.h, gl/unistd.in.h,
136 gl/warn-on-use.h, maint.mk: Update gnulib files.
137
138 2019-07-20 Simon Josefsson <simon@josefsson.org>
139
140 * configure.ac: Bump AC_PREREQ for gnulib.
141
142 2018-08-24 Simon Josefsson <simon@josefsson.org>
143
144 * NEWS, configure.ac: Bump versions.
145
146 2018-08-24 Simon Josefsson <simon@josefsson.org>
147
148 * .gitignore: Ignore more.
149
150 2018-08-24 Simon Josefsson <simon@josefsson.org>
151
152 * ChangeLog: Generated.
153
0154 2018-08-24 Simon Josefsson <simon@josefsson.org>
1155
2156 * NEWS: Version 1.5.
17361890 88403e851f297b227df9ca509fbabb7b
17371891
17381892 ----------------------------------------------------------------------
1739 Copyright 2002-2018 Simon Josefsson
1893 Copyright 2002-2020 Simon Josefsson
17401894 Copying and distribution of this file, with or without modification,
17411895 are permitted in any medium without royalty provided the copyright
17421896 notice and this notice are preserved.
44 # It is necessary if you want to build targets usually of interest
55 # only to the maintainer.
66
7 # Copyright (C) 2001, 2003, 2006-2018 Free Software Foundation, Inc.
7 # Copyright (C) 2001, 2003, 2006-2020 Free Software Foundation, Inc.
88
99 # This program is free software: you can redistribute it and/or modify
1010 # it under the terms of the GNU General Public License as published by
+169
-171
INSTALL less more
00 Installation Instructions
11 *************************
22
3 Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
4 Inc.
3 Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
4 Foundation, Inc.
55
66 Copying and distribution of this file, with or without modification,
77 are permitted in any medium without royalty provided the copyright
1111 Basic Installation
1212 ==================
1313
14 Briefly, the shell command `./configure && make && make install'
14 Briefly, the shell command './configure && make && make install'
1515 should configure, build, and install this package. The following
16 more-detailed instructions are generic; see the `README' file for
16 more-detailed instructions are generic; see the 'README' file for
1717 instructions specific to this package. Some packages provide this
18 `INSTALL' file but do not implement all of the features documented
18 'INSTALL' file but do not implement all of the features documented
1919 below. The lack of an optional feature in a given package is not
2020 necessarily a bug. More recommendations for GNU packages can be found
2121 in *note Makefile Conventions: (standards)Makefile Conventions.
2222
23 The `configure' shell script attempts to guess correct values for
23 The 'configure' shell script attempts to guess correct values for
2424 various system-dependent variables used during compilation. It uses
25 those values to create a `Makefile' in each directory of the package.
26 It may also create one or more `.h' files containing system-dependent
27 definitions. Finally, it creates a shell script `config.status' that
25 those values to create a 'Makefile' in each directory of the package.
26 It may also create one or more '.h' files containing system-dependent
27 definitions. Finally, it creates a shell script 'config.status' that
2828 you can run in the future to recreate the current configuration, and a
29 file `config.log' containing compiler output (useful mainly for
30 debugging `configure').
31
32 It can also use an optional file (typically called `config.cache'
33 and enabled with `--cache-file=config.cache' or simply `-C') that saves
34 the results of its tests to speed up reconfiguring. Caching is
35 disabled by default to prevent problems with accidental use of stale
36 cache files.
29 file 'config.log' containing compiler output (useful mainly for
30 debugging 'configure').
31
32 It can also use an optional file (typically called 'config.cache' and
33 enabled with '--cache-file=config.cache' or simply '-C') that saves the
34 results of its tests to speed up reconfiguring. Caching is disabled by
35 default to prevent problems with accidental use of stale cache files.
3736
3837 If you need to do unusual things to compile the package, please try
39 to figure out how `configure' could check whether to do them, and mail
40 diffs or instructions to the address given in the `README' so they can
38 to figure out how 'configure' could check whether to do them, and mail
39 diffs or instructions to the address given in the 'README' so they can
4140 be considered for the next release. If you are using the cache, and at
42 some point `config.cache' contains results you don't want to keep, you
41 some point 'config.cache' contains results you don't want to keep, you
4342 may remove or edit it.
4443
45 The file `configure.ac' (or `configure.in') is used to create
46 `configure' by a program called `autoconf'. You need `configure.ac' if
47 you want to change it or regenerate `configure' using a newer version
48 of `autoconf'.
44 The file 'configure.ac' (or 'configure.in') is used to create
45 'configure' by a program called 'autoconf'. You need 'configure.ac' if
46 you want to change it or regenerate 'configure' using a newer version of
47 'autoconf'.
4948
5049 The simplest way to compile this package is:
5150
52 1. `cd' to the directory containing the package's source code and type
53 `./configure' to configure the package for your system.
54
55 Running `configure' might take a while. While running, it prints
51 1. 'cd' to the directory containing the package's source code and type
52 './configure' to configure the package for your system.
53
54 Running 'configure' might take a while. While running, it prints
5655 some messages telling which features it is checking for.
5756
58 2. Type `make' to compile the package.
59
60 3. Optionally, type `make check' to run any self-tests that come with
57 2. Type 'make' to compile the package.
58
59 3. Optionally, type 'make check' to run any self-tests that come with
6160 the package, generally using the just-built uninstalled binaries.
6261
63 4. Type `make install' to install the programs and any data files and
62 4. Type 'make install' to install the programs and any data files and
6463 documentation. When installing into a prefix owned by root, it is
6564 recommended that the package be configured and built as a regular
66 user, and only the `make install' phase executed with root
65 user, and only the 'make install' phase executed with root
6766 privileges.
6867
69 5. Optionally, type `make installcheck' to repeat any self-tests, but
68 5. Optionally, type 'make installcheck' to repeat any self-tests, but
7069 this time using the binaries in their final installed location.
7170 This target does not install anything. Running this target as a
72 regular user, particularly if the prior `make install' required
71 regular user, particularly if the prior 'make install' required
7372 root privileges, verifies that the installation completed
7473 correctly.
7574
7675 6. You can remove the program binaries and object files from the
77 source code directory by typing `make clean'. To also remove the
78 files that `configure' created (so you can compile the package for
79 a different kind of computer), type `make distclean'. There is
80 also a `make maintainer-clean' target, but that is intended mainly
76 source code directory by typing 'make clean'. To also remove the
77 files that 'configure' created (so you can compile the package for
78 a different kind of computer), type 'make distclean'. There is
79 also a 'make maintainer-clean' target, but that is intended mainly
8180 for the package's developers. If you use it, you may have to get
8281 all sorts of other programs in order to regenerate files that came
8382 with the distribution.
8483
85 7. Often, you can also type `make uninstall' to remove the installed
84 7. Often, you can also type 'make uninstall' to remove the installed
8685 files again. In practice, not all packages have tested that
8786 uninstallation works correctly, even though it is required by the
8887 GNU Coding Standards.
8988
90 8. Some packages, particularly those that use Automake, provide `make
89 8. Some packages, particularly those that use Automake, provide 'make
9190 distcheck', which can by used by developers to test that all other
92 targets like `make install' and `make uninstall' work correctly.
91 targets like 'make install' and 'make uninstall' work correctly.
9392 This target is generally not run by end users.
9493
9594 Compilers and Options
9695 =====================
9796
9897 Some systems require unusual options for compilation or linking that
99 the `configure' script does not know about. Run `./configure --help'
98 the 'configure' script does not know about. Run './configure --help'
10099 for details on some of the pertinent environment variables.
101100
102 You can give `configure' initial values for configuration parameters
103 by setting variables in the command line or in the environment. Here
104 is an example:
101 You can give 'configure' initial values for configuration parameters
102 by setting variables in the command line or in the environment. Here is
103 an example:
105104
106105 ./configure CC=c99 CFLAGS=-g LIBS=-lposix
107106
112111
113112 You can compile the package for more than one kind of computer at the
114113 same time, by placing the object files for each architecture in their
115 own directory. To do this, you can use GNU `make'. `cd' to the
114 own directory. To do this, you can use GNU 'make'. 'cd' to the
116115 directory where you want the object files and executables to go and run
117 the `configure' script. `configure' automatically checks for the
118 source code in the directory that `configure' is in and in `..'. This
119 is known as a "VPATH" build.
120
121 With a non-GNU `make', it is safer to compile the package for one
116 the 'configure' script. 'configure' automatically checks for the source
117 code in the directory that 'configure' is in and in '..'. This is known
118 as a "VPATH" build.
119
120 With a non-GNU 'make', it is safer to compile the package for one
122121 architecture at a time in the source code directory. After you have
123 installed the package for one architecture, use `make distclean' before
122 installed the package for one architecture, use 'make distclean' before
124123 reconfiguring for another architecture.
125124
126125 On MacOS X 10.5 and later systems, you can create libraries and
127126 executables that work on multiple system types--known as "fat" or
128 "universal" binaries--by specifying multiple `-arch' options to the
129 compiler but only a single `-arch' option to the preprocessor. Like
127 "universal" binaries--by specifying multiple '-arch' options to the
128 compiler but only a single '-arch' option to the preprocessor. Like
130129 this:
131130
132131 ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135134
136135 This is not guaranteed to produce working output in all cases, you
137136 may have to build one architecture at a time and combine the results
138 using the `lipo' tool if you have problems.
137 using the 'lipo' tool if you have problems.
139138
140139 Installation Names
141140 ==================
142141
143 By default, `make install' installs the package's commands under
144 `/usr/local/bin', include files under `/usr/local/include', etc. You
145 can specify an installation prefix other than `/usr/local' by giving
146 `configure' the option `--prefix=PREFIX', where PREFIX must be an
142 By default, 'make install' installs the package's commands under
143 '/usr/local/bin', include files under '/usr/local/include', etc. You
144 can specify an installation prefix other than '/usr/local' by giving
145 'configure' the option '--prefix=PREFIX', where PREFIX must be an
147146 absolute file name.
148147
149148 You can specify separate installation prefixes for
150149 architecture-specific files and architecture-independent files. If you
151 pass the option `--exec-prefix=PREFIX' to `configure', the package uses
150 pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
152151 PREFIX as the prefix for installing programs and libraries.
153152 Documentation and other data files still use the regular prefix.
154153
155154 In addition, if you use an unusual directory layout you can give
156 options like `--bindir=DIR' to specify different values for particular
157 kinds of files. Run `configure --help' for a list of the directories
158 you can set and what kinds of files go in them. In general, the
159 default for these options is expressed in terms of `${prefix}', so that
160 specifying just `--prefix' will affect all of the other directory
155 options like '--bindir=DIR' to specify different values for particular
156 kinds of files. Run 'configure --help' for a list of the directories
157 you can set and what kinds of files go in them. In general, the default
158 for these options is expressed in terms of '${prefix}', so that
159 specifying just '--prefix' will affect all of the other directory
161160 specifications that were not explicitly provided.
162161
163162 The most portable way to affect installation locations is to pass the
164 correct locations to `configure'; however, many packages provide one or
163 correct locations to 'configure'; however, many packages provide one or
165164 both of the following shortcuts of passing variable assignments to the
166 `make install' command line to change installation locations without
165 'make install' command line to change installation locations without
167166 having to reconfigure or recompile.
168167
169168 The first method involves providing an override variable for each
170 affected directory. For example, `make install
169 affected directory. For example, 'make install
171170 prefix=/alternate/directory' will choose an alternate location for all
172171 directory configuration variables that were expressed in terms of
173 `${prefix}'. Any directories that were specified during `configure',
174 but not in terms of `${prefix}', must each be overridden at install
175 time for the entire installation to be relocated. The approach of
176 makefile variable overrides for each directory variable is required by
177 the GNU Coding Standards, and ideally causes no recompilation.
178 However, some platforms have known limitations with the semantics of
179 shared libraries that end up requiring recompilation when using this
180 method, particularly noticeable in packages that use GNU Libtool.
181
182 The second method involves providing the `DESTDIR' variable. For
183 example, `make install DESTDIR=/alternate/directory' will prepend
184 `/alternate/directory' before all installation names. The approach of
185 `DESTDIR' overrides is not required by the GNU Coding Standards, and
172 '${prefix}'. Any directories that were specified during 'configure',
173 but not in terms of '${prefix}', must each be overridden at install time
174 for the entire installation to be relocated. The approach of makefile
175 variable overrides for each directory variable is required by the GNU
176 Coding Standards, and ideally causes no recompilation. However, some
177 platforms have known limitations with the semantics of shared libraries
178 that end up requiring recompilation when using this method, particularly
179 noticeable in packages that use GNU Libtool.
180
181 The second method involves providing the 'DESTDIR' variable. For
182 example, 'make install DESTDIR=/alternate/directory' will prepend
183 '/alternate/directory' before all installation names. The approach of
184 'DESTDIR' overrides is not required by the GNU Coding Standards, and
186185 does not work on platforms that have drive letters. On the other hand,
187186 it does better at avoiding recompilation issues, and works well even
188 when some directory options were not specified in terms of `${prefix}'
189 at `configure' time.
187 when some directory options were not specified in terms of '${prefix}'
188 at 'configure' time.
190189
191190 Optional Features
192191 =================
193192
194193 If the package supports it, you can cause programs to be installed
195 with an extra prefix or suffix on their names by giving `configure' the
196 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
197
198 Some packages pay attention to `--enable-FEATURE' options to
199 `configure', where FEATURE indicates an optional part of the package.
200 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
201 is something like `gnu-as' or `x' (for the X Window System). The
202 `README' should mention any `--enable-' and `--with-' options that the
194 with an extra prefix or suffix on their names by giving 'configure' the
195 option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
196
197 Some packages pay attention to '--enable-FEATURE' options to
198 'configure', where FEATURE indicates an optional part of the package.
199 They may also pay attention to '--with-PACKAGE' options, where PACKAGE
200 is something like 'gnu-as' or 'x' (for the X Window System). The
201 'README' should mention any '--enable-' and '--with-' options that the
203202 package recognizes.
204203
205 For packages that use the X Window System, `configure' can usually
204 For packages that use the X Window System, 'configure' can usually
206205 find the X include and library files automatically, but if it doesn't,
207 you can use the `configure' options `--x-includes=DIR' and
208 `--x-libraries=DIR' to specify their locations.
206 you can use the 'configure' options '--x-includes=DIR' and
207 '--x-libraries=DIR' to specify their locations.
209208
210209 Some packages offer the ability to configure how verbose the
211 execution of `make' will be. For these packages, running `./configure
210 execution of 'make' will be. For these packages, running './configure
212211 --enable-silent-rules' sets the default to minimal output, which can be
213 overridden with `make V=1'; while running `./configure
212 overridden with 'make V=1'; while running './configure
214213 --disable-silent-rules' sets the default to verbose, which can be
215 overridden with `make V=0'.
214 overridden with 'make V=0'.
216215
217216 Particular systems
218217 ==================
219218
220 On HP-UX, the default C compiler is not ANSI C compatible. If GNU
221 CC is not installed, it is recommended to use the following options in
219 On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
220 is not installed, it is recommended to use the following options in
222221 order to use an ANSI C compiler:
223222
224223 ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
225224
226225 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
227226
228 HP-UX `make' updates targets which have the same time stamps as
229 their prerequisites, which makes it generally unusable when shipped
230 generated files such as `configure' are involved. Use GNU `make'
231 instead.
227 HP-UX 'make' updates targets which have the same time stamps as their
228 prerequisites, which makes it generally unusable when shipped generated
229 files such as 'configure' are involved. Use GNU 'make' instead.
232230
233231 On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
234 parse its `<wchar.h>' header file. The option `-nodtk' can be used as
235 a workaround. If GNU CC is not installed, it is therefore recommended
236 to try
232 parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
233 workaround. If GNU CC is not installed, it is therefore recommended to
234 try
237235
238236 ./configure CC="cc"
239237
241239
242240 ./configure CC="cc -nodtk"
243241
244 On Solaris, don't put `/usr/ucb' early in your `PATH'. This
242 On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
245243 directory contains several dysfunctional programs; working variants of
246 these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
247 in your `PATH', put it _after_ `/usr/bin'.
248
249 On Haiku, software installed for all users goes in `/boot/common',
250 not `/usr/local'. It is recommended to use the following options:
244 these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
245 in your 'PATH', put it _after_ '/usr/bin'.
246
247 On Haiku, software installed for all users goes in '/boot/common',
248 not '/usr/local'. It is recommended to use the following options:
251249
252250 ./configure --prefix=/boot/common
253251
254252 Specifying the System Type
255253 ==========================
256254
257 There may be some features `configure' cannot figure out
255 There may be some features 'configure' cannot figure out
258256 automatically, but needs to determine by the type of machine the package
259257 will run on. Usually, assuming the package is built to be run on the
260 _same_ architectures, `configure' can figure that out, but if it prints
258 _same_ architectures, 'configure' can figure that out, but if it prints
261259 a message saying it cannot guess the machine type, give it the
262 `--build=TYPE' option. TYPE can either be a short name for the system
263 type, such as `sun4', or a canonical name which has the form:
260 '--build=TYPE' option. TYPE can either be a short name for the system
261 type, such as 'sun4', or a canonical name which has the form:
264262
265263 CPU-COMPANY-SYSTEM
266264
269267 OS
270268 KERNEL-OS
271269
272 See the file `config.sub' for the possible values of each field. If
273 `config.sub' isn't included in this package, then this package doesn't
270 See the file 'config.sub' for the possible values of each field. If
271 'config.sub' isn't included in this package, then this package doesn't
274272 need to know the machine type.
275273
276274 If you are _building_ compiler tools for cross-compiling, you should
277 use the option `--target=TYPE' to select the type of system they will
275 use the option '--target=TYPE' to select the type of system they will
278276 produce code for.
279277
280278 If you want to _use_ a cross compiler, that generates code for a
281279 platform different from the build platform, you should specify the
282280 "host" platform (i.e., that on which the generated programs will
283 eventually be run) with `--host=TYPE'.
281 eventually be run) with '--host=TYPE'.
284282
285283 Sharing Defaults
286284 ================
287285
288 If you want to set default values for `configure' scripts to share,
289 you can create a site shell script called `config.site' that gives
290 default values for variables like `CC', `cache_file', and `prefix'.
291 `configure' looks for `PREFIX/share/config.site' if it exists, then
292 `PREFIX/etc/config.site' if it exists. Or, you can set the
293 `CONFIG_SITE' environment variable to the location of the site script.
294 A warning: not all `configure' scripts look for a site script.
286 If you want to set default values for 'configure' scripts to share,
287 you can create a site shell script called 'config.site' that gives
288 default values for variables like 'CC', 'cache_file', and 'prefix'.
289 'configure' looks for 'PREFIX/share/config.site' if it exists, then
290 'PREFIX/etc/config.site' if it exists. Or, you can set the
291 'CONFIG_SITE' environment variable to the location of the site script.
292 A warning: not all 'configure' scripts look for a site script.
295293
296294 Defining Variables
297295 ==================
298296
299297 Variables not defined in a site shell script can be set in the
300 environment passed to `configure'. However, some packages may run
298 environment passed to 'configure'. However, some packages may run
301299 configure again during the build, and the customized values of these
302300 variables may be lost. In order to avoid this problem, you should set
303 them in the `configure' command line, using `VAR=value'. For example:
301 them in the 'configure' command line, using 'VAR=value'. For example:
304302
305303 ./configure CC=/usr/local2/bin/gcc
306304
307 causes the specified `gcc' to be used as the C compiler (unless it is
305 causes the specified 'gcc' to be used as the C compiler (unless it is
308306 overridden in the site shell script).
309307
310 Unfortunately, this technique does not work for `CONFIG_SHELL' due to
311 an Autoconf limitation. Until the limitation is lifted, you can use
312 this workaround:
308 Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
309 Autoconf limitation. Until the limitation is lifted, you can use this
310 workaround:
313311
314312 CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
315313
316 `configure' Invocation
314 'configure' Invocation
317315 ======================
318316
319 `configure' recognizes the following options to control how it
317 'configure' recognizes the following options to control how it
320318 operates.
321319
322 `--help'
323 `-h'
324 Print a summary of all of the options to `configure', and exit.
325
326 `--help=short'
327 `--help=recursive'
320 '--help'
321 '-h'
322 Print a summary of all of the options to 'configure', and exit.
323
324 '--help=short'
325 '--help=recursive'
328326 Print a summary of the options unique to this package's
329 `configure', and exit. The `short' variant lists options used
330 only in the top level, while the `recursive' variant lists options
331 also present in any nested packages.
332
333 `--version'
334 `-V'
335 Print the version of Autoconf used to generate the `configure'
327 'configure', and exit. The 'short' variant lists options used only
328 in the top level, while the 'recursive' variant lists options also
329 present in any nested packages.
330
331 '--version'
332 '-V'
333 Print the version of Autoconf used to generate the 'configure'
336334 script, and exit.
337335
338 `--cache-file=FILE'
336 '--cache-file=FILE'
339337 Enable the cache: use and save the results of the tests in FILE,
340 traditionally `config.cache'. FILE defaults to `/dev/null' to
338 traditionally 'config.cache'. FILE defaults to '/dev/null' to
341339 disable caching.
342340
343 `--config-cache'
344 `-C'
345 Alias for `--cache-file=config.cache'.
346
347 `--quiet'
348 `--silent'
349 `-q'
341 '--config-cache'
342 '-C'
343 Alias for '--cache-file=config.cache'.
344
345 '--quiet'
346 '--silent'
347 '-q'
350348 Do not print messages saying which checks are being made. To
351 suppress all normal output, redirect it to `/dev/null' (any error
349 suppress all normal output, redirect it to '/dev/null' (any error
352350 messages will still be shown).
353351
354 `--srcdir=DIR'
352 '--srcdir=DIR'
355353 Look for the package's source code in directory DIR. Usually
356 `configure' can determine that directory automatically.
357
358 `--prefix=DIR'
359 Use DIR as the installation prefix. *note Installation Names::
360 for more details, including other options available for fine-tuning
361 the installation locations.
362
363 `--no-create'
364 `-n'
354 'configure' can determine that directory automatically.
355
356 '--prefix=DIR'
357 Use DIR as the installation prefix. *note Installation Names:: for
358 more details, including other options available for fine-tuning the
359 installation locations.
360
361 '--no-create'
362 '-n'
365363 Run the configure checks, but stop before creating any output
366364 files.
367365
368 `configure' also accepts some other, not widely useful, options. Run
369 `configure --help' for more details.
366 'configure' also accepts some other, not widely useful, options. Run
367 'configure --help' for more details.
00 ## Process this file with automake to produce Makefile.in
1 # Copyright (C) 2002-2018 Simon Josefsson.
1 # Copyright (C) 2002-2020 Simon Josefsson.
22 #
33 # This file is part of Libntlm.
44 #
4444
4545 # test
4646
47 TESTS = test_ntlm
47 TESTS = test_ntlm test_CVE-2019-17455
4848 check_PROGRAMS = $(TESTS)
4949 LDADD = libntlm_impl.la gl/libgnu.la
5050 CLEANFILES = test.out
5151 test_ntlm_LDFLAGS = -no-install
5252
53 TESTS_ENVIRONMENT = $(VALGRIND)
53 LOG_COMPILER = $(VALGRIND)
0 # Makefile.in generated by automake 1.15 from Makefile.am.
0 # Makefile.in generated by automake 1.16.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2018 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
1313
1414 @SET_MAKE@
1515
16 # Copyright (C) 2002-2018 Simon Josefsson.
16 # Copyright (C) 2002-2020 Simon Josefsson.
1717 #
1818 # This file is part of Libntlm.
1919 #
108108 POST_UNINSTALL = :
109109 build_triplet = @build@
110110 host_triplet = @host@
111 TESTS = test_ntlm$(EXEEXT)
111 TESTS = test_ntlm$(EXEEXT) test_CVE-2019-17455$(EXEEXT)
112112 check_PROGRAMS = $(am__EXEEXT_1)
113113 subdir = .
114114 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
115115 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \
116 $(top_srcdir)/gl/m4/__inline.m4 \
116117 $(top_srcdir)/gl/m4/absolute-header.m4 \
117118 $(top_srcdir)/gl/m4/autobuild.m4 \
118119 $(top_srcdir)/gl/m4/byteswap.m4 \
125126 $(top_srcdir)/gl/m4/inttypes-pri.m4 \
126127 $(top_srcdir)/gl/m4/inttypes.m4 \
127128 $(top_srcdir)/gl/m4/limits-h.m4 \
128 $(top_srcdir)/gl/m4/longlong.m4 \
129129 $(top_srcdir)/gl/m4/manywarnings.m4 $(top_srcdir)/gl/m4/md4.m4 \
130130 $(top_srcdir)/gl/m4/multiarch.m4 $(top_srcdir)/gl/m4/off_t.m4 \
131131 $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdalign.m4 \
138138 $(top_srcdir)/gl/m4/warn-on-use.m4 \
139139 $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \
140140 $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wint_t.m4 \
141 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
142 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
143 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
141 $(top_srcdir)/gl/m4/zzgnulib.m4 $(top_srcdir)/m4/libtool.m4 \
142 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
143 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
144 $(top_srcdir)/configure.ac
144145 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
145146 $(ACLOCAL_M4)
146147 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
151152 CONFIG_HEADER = config.h
152153 CONFIG_CLEAN_FILES = libntlm.pc libntlm.spec ntlm.h
153154 CONFIG_CLEAN_VPATH_FILES =
155 am__EXEEXT_1 = test_ntlm$(EXEEXT) test_CVE-2019-17455$(EXEEXT)
154156 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
155157 am__vpath_adj = case $$p in \
156158 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
194196 libntlm_impl_la_LIBADD =
195197 am_libntlm_impl_la_OBJECTS = smbutil.lo smbencrypt.lo
196198 libntlm_impl_la_OBJECTS = $(am_libntlm_impl_la_OBJECTS)
197 am__EXEEXT_1 = test_ntlm$(EXEEXT)
199 test_CVE_2019_17455_SOURCES = test_CVE-2019-17455.c
200 test_CVE_2019_17455_OBJECTS = test_CVE-2019-17455.$(OBJEXT)
201 test_CVE_2019_17455_LDADD = $(LDADD)
202 test_CVE_2019_17455_DEPENDENCIES = libntlm_impl.la gl/libgnu.la
198203 test_ntlm_SOURCES = test_ntlm.c
199204 test_ntlm_OBJECTS = test_ntlm.$(OBJEXT)
200205 test_ntlm_LDADD = $(LDADD)
216221 am__v_at_1 =
217222 DEFAULT_INCLUDES = -I.@am__isrc@
218223 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
219 am__depfiles_maybe = depfiles
224 am__maybe_remake_depfiles = depfiles
225 am__depfiles_remade = ./$(DEPDIR)/smbencrypt.Plo \
226 ./$(DEPDIR)/smbutil.Plo ./$(DEPDIR)/test_CVE-2019-17455.Po \
227 ./$(DEPDIR)/test_ntlm.Po
220228 am__mv = mv -f
221229 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
222230 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
236244 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
237245 am__v_CCLD_0 = @echo " CCLD " $@;
238246 am__v_CCLD_1 =
239 SOURCES = $(libntlm_la_SOURCES) $(libntlm_impl_la_SOURCES) test_ntlm.c
247 SOURCES = $(libntlm_la_SOURCES) $(libntlm_impl_la_SOURCES) \
248 test_CVE-2019-17455.c test_ntlm.c
240249 DIST_SOURCES = $(libntlm_la_SOURCES) $(libntlm_impl_la_SOURCES) \
241 test_ntlm.c
250 test_CVE-2019-17455.c test_ntlm.c
242251 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
243252 ctags-recursive dvi-recursive html-recursive info-recursive \
244253 install-data-recursive install-dvi-recursive \
261270 $(RECURSIVE_CLEAN_TARGETS) \
262271 $(am__extra_recursive_targets)
263272 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
264 cscope check recheck distdir dist dist-all distcheck
273 cscope check recheck distdir distdir-am dist dist-all \
274 distcheck
265275 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
266276 $(LISP)config.h.in
267277 # Read a list of newline-separated strings from the standard input,
551561 EGREP = @EGREP@
552562 EXEEXT = @EXEEXT@
553563 FGREP = @FGREP@
564 GNULIB_ACCESS = @GNULIB_ACCESS@
554565 GNULIB_BTOWC = @GNULIB_BTOWC@
555566 GNULIB_CHDIR = @GNULIB_CHDIR@
556567 GNULIB_CHOWN = @GNULIB_CHOWN@
557568 GNULIB_CLOSE = @GNULIB_CLOSE@
569 GNULIB_COPY_FILE_RANGE = @GNULIB_COPY_FILE_RANGE@
558570 GNULIB_DUP = @GNULIB_DUP@
559571 GNULIB_DUP2 = @GNULIB_DUP2@
560572 GNULIB_DUP3 = @GNULIB_DUP3@
576588 GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
577589 GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
578590 GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
591 GNULIB_GETOPT_POSIX = @GNULIB_GETOPT_POSIX@
579592 GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
580593 GNULIB_GETPASS = @GNULIB_GETPASS@
581594 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
688701 HAVE_BTOWC = @HAVE_BTOWC@
689702 HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
690703 HAVE_CHOWN = @HAVE_CHOWN@
704 HAVE_COPY_FILE_RANGE = @HAVE_COPY_FILE_RANGE@
691705 HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
692706 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
693707 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
739753 HAVE_LCHOWN = @HAVE_LCHOWN@
740754 HAVE_LINK = @HAVE_LINK@
741755 HAVE_LINKAT = @HAVE_LINKAT@
742 HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
743756 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
744757 HAVE_MBRLEN = @HAVE_MBRLEN@
745758 HAVE_MBRTOWC = @HAVE_MBRTOWC@
778791 HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
779792 HAVE_UNISTD_H = @HAVE_UNISTD_H@
780793 HAVE_UNLINKAT = @HAVE_UNLINKAT@
781 HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
782794 HAVE_USLEEP = @HAVE_USLEEP@
783795 HAVE_WCHAR_H = @HAVE_WCHAR_H@
784796 HAVE_WCHAR_T = @HAVE_WCHAR_T@
878890 PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
879891 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
880892 RANLIB = @RANLIB@
893 REPLACE_ACCESS = @REPLACE_ACCESS@
881894 REPLACE_BTOWC = @REPLACE_BTOWC@
882895 REPLACE_CHOWN = @REPLACE_CHOWN@
883896 REPLACE_CLOSE = @REPLACE_CLOSE@
939952 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
940953 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
941954 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
955 REPLACE_WCSTOK = @REPLACE_WCSTOK@
942956 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
943957 REPLACE_WCTOB = @REPLACE_WCTOB@
944958 REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
10431057 LDADD = libntlm_impl.la gl/libgnu.la
10441058 CLEANFILES = test.out
10451059 test_ntlm_LDFLAGS = -no-install
1046 TESTS_ENVIRONMENT = $(VALGRIND)
1060 LOG_COMPILER = $(VALGRIND)
10471061 all: config.h
10481062 $(MAKE) $(AM_MAKEFLAGS) all-recursive
10491063
10701084 echo ' $(SHELL) ./config.status'; \
10711085 $(SHELL) ./config.status;; \
10721086 *) \
1073 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
1074 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
1087 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
1088 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
10751089 esac;
10761090
10771091 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
11031117 cd $(top_builddir) && $(SHELL) ./config.status $@
11041118 ntlm.h: $(top_builddir)/config.status $(srcdir)/ntlm.h.in
11051119 cd $(top_builddir) && $(SHELL) ./config.status $@
1120
1121 clean-checkPROGRAMS:
1122 @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
1123 echo " rm -f" $$list; \
1124 rm -f $$list || exit $$?; \
1125 test -n "$(EXEEXT)" || exit 0; \
1126 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
1127 echo " rm -f" $$list; \
1128 rm -f $$list
11061129
11071130 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
11081131 @$(NORMAL_INSTALL)
11561179 libntlm_impl.la: $(libntlm_impl_la_OBJECTS) $(libntlm_impl_la_DEPENDENCIES) $(EXTRA_libntlm_impl_la_DEPENDENCIES)
11571180 $(AM_V_CCLD)$(LINK) $(libntlm_impl_la_OBJECTS) $(libntlm_impl_la_LIBADD) $(LIBS)
11581181
1159 clean-checkPROGRAMS:
1160 @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
1161 echo " rm -f" $$list; \
1162 rm -f $$list || exit $$?; \
1163 test -n "$(EXEEXT)" || exit 0; \
1164 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
1165 echo " rm -f" $$list; \
1166 rm -f $$list
1182 test_CVE-2019-17455$(EXEEXT): $(test_CVE_2019_17455_OBJECTS) $(test_CVE_2019_17455_DEPENDENCIES) $(EXTRA_test_CVE_2019_17455_DEPENDENCIES)
1183 @rm -f test_CVE-2019-17455$(EXEEXT)
1184 $(AM_V_CCLD)$(LINK) $(test_CVE_2019_17455_OBJECTS) $(test_CVE_2019_17455_LDADD) $(LIBS)
11671185
11681186 test_ntlm$(EXEEXT): $(test_ntlm_OBJECTS) $(test_ntlm_DEPENDENCIES) $(EXTRA_test_ntlm_DEPENDENCIES)
11691187 @rm -f test_ntlm$(EXEEXT)
11751193 distclean-compile:
11761194 -rm -f *.tab.c
11771195
1178 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smbencrypt.Plo@am__quote@
1179 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smbutil.Plo@am__quote@
1180 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ntlm.Po@am__quote@
1196 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smbencrypt.Plo@am__quote@ # am--include-marker
1197 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smbutil.Plo@am__quote@ # am--include-marker
1198 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_CVE-2019-17455.Po@am__quote@ # am--include-marker
1199 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ntlm.Po@am__quote@ # am--include-marker
1200
1201 $(am__depfiles_remade):
1202 @$(MKDIR_P) $(@D)
1203 @echo '# dummy' >$@-t && $(am__mv) $@-t $@
1204
1205 am--depfiles: $(am__depfiles_remade)
11811206
11821207 .c.o:
11831208 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
14771502 fi; \
14781503 $$success || exit 1
14791504
1480 check-TESTS:
1505 check-TESTS: $(check_PROGRAMS)
14811506 @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
14821507 @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
14831508 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
15051530 --log-file $$b.log --trs-file $$b.trs \
15061531 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
15071532 "$$tst" $(AM_TESTS_FD_REDIRECT)
1533 test_CVE-2019-17455.log: test_CVE-2019-17455$(EXEEXT)
1534 @p='test_CVE-2019-17455$(EXEEXT)'; \
1535 b='test_CVE-2019-17455'; \
1536 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
1537 --log-file $$b.log --trs-file $$b.trs \
1538 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1539 "$$tst" $(AM_TESTS_FD_REDIRECT)
15081540 .test.log:
15091541 @p='$<'; \
15101542 $(am__set_b); \
15201552 @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
15211553 @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
15221554
1523 distdir: $(DISTFILES)
1555 distdir: $(BUILT_SOURCES)
1556 $(MAKE) $(AM_MAKEFLAGS) distdir-am
1557
1558 distdir-am: $(DISTFILES)
15241559 @case `sed 15q $(srcdir)/NEWS` in \
15251560 *"$(VERSION)"*) : ;; \
15261561 *) \
15911626 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
15921627 || chmod -R a+r "$(distdir)"
15931628 dist-gzip: distdir
1594 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
1629 tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
15951630 $(am__post_remove_distdir)
15961631
15971632 dist-bzip2: distdir
16171652 @echo WARNING: "Support for shar distribution archives is" \
16181653 "deprecated." >&2
16191654 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
1620 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
1655 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
16211656 $(am__post_remove_distdir)
16221657
16231658 dist-zip: distdir
16351670 distcheck: dist
16361671 case '$(DIST_ARCHIVES)' in \
16371672 *.tar.gz*) \
1638 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
1673 eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
16391674 *.tar.bz2*) \
16401675 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
16411676 *.tar.lz*) \
16451680 *.tar.Z*) \
16461681 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
16471682 *.shar.gz*) \
1648 GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
1683 eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
16491684 *.zip*) \
16501685 unzip $(distdir).zip ;;\
16511686 esac
17651800
17661801 distclean: distclean-recursive
17671802 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
1768 -rm -rf ./$(DEPDIR)
1803 -rm -f ./$(DEPDIR)/smbencrypt.Plo
1804 -rm -f ./$(DEPDIR)/smbutil.Plo
1805 -rm -f ./$(DEPDIR)/test_CVE-2019-17455.Po
1806 -rm -f ./$(DEPDIR)/test_ntlm.Po
17691807 -rm -f Makefile
17701808 distclean-am: clean-am distclean-compile distclean-generic \
17711809 distclean-hdr distclean-libtool distclean-tags
18131851 maintainer-clean: maintainer-clean-recursive
18141852 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
18151853 -rm -rf $(top_srcdir)/autom4te.cache
1816 -rm -rf ./$(DEPDIR)
1854 -rm -f ./$(DEPDIR)/smbencrypt.Plo
1855 -rm -f ./$(DEPDIR)/smbutil.Plo
1856 -rm -f ./$(DEPDIR)/test_CVE-2019-17455.Po
1857 -rm -f ./$(DEPDIR)/test_ntlm.Po
18171858 -rm -f Makefile
18181859 maintainer-clean-am: distclean-am maintainer-clean-generic
18191860
18361877 .MAKE: $(am__recursive_targets) all check-am install-am install-strip
18371878
18381879 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
1839 am--refresh check check-TESTS check-am clean \
1880 am--depfiles am--refresh check check-TESTS check-am clean \
18401881 clean-checkPROGRAMS clean-cscope clean-generic \
18411882 clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
18421883 cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
00 Libntlm NEWS -- history of user-visible changes. -*- outline -*-
1 Copyright (C) 2002-2018 Simon Josefsson
1 Copyright (C) 2002-2020 Simon Josefsson
22 Copyright (C) 1999 Grant Edwards
33 See the end for copying conditions.
4
5 * Version 1.6 (released 2020-04-19)
6
7 ** Fix buffer overflow in buildSmbNtlmAuth* function. CVE-2019-17455.
8 Reported by Kirin in <https://gitlab.com/jas/libntlm/-/issues/2> and
9 patch provided by Cedric Buissart. See newly introduced regression
10 check test_CVE-2019-17455.c for test of a vulnerable library.
11
12 ** API and ABI modifications.
13 No changes since last version.
414
515 * Version 1.5 (released 2018-08-24)
616
00 Libntlm README -- important introductory notes
1 Copyright (C) 2002-2018 Simon Josefsson
1 Copyright (C) 2002-2020 Simon Josefsson
22 Copyright (C) 1999 Grant Edwards
33 See the end for copying conditions.
44
00 Libntlm THANKS -- acknowledgements
1 Copyright (C) 2002-2018 Simon Josefsson
1 Copyright (C) 2002-2020 Simon Josefsson
22 See the end for copying conditions.
33
44 Much of the code was originally written by Andrew Tridgell for the
1414 Pavel Fedin <fedin@matek.ru>
1515 Andrej Kacian <ticho@gentoo.org>
1616 Romain GEISSLER <romain.geissler@amadeus.com>
17 Kirin
18 Cedric Buissart
1719
1820 ----------------------------------------------------------------------
1921 Copying and distribution of this file, with or without modification,
0 # generated automatically by aclocal 1.15 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
0 # generated automatically by aclocal 1.16.1 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
33
44 # This file is free software; the Free Software Foundation
55 # gives unlimited permission to copy and/or distribute it,
1919 If you have problems, you may need to regenerate the build system entirely.
2020 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
2121
22 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
22 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
2323 #
2424 # This file is free software; the Free Software Foundation
2525 # gives unlimited permission to copy and/or distribute it,
3131 # generated from the m4 files accompanying Automake X.Y.
3232 # (This private macro should not be called outside this file.)
3333 AC_DEFUN([AM_AUTOMAKE_VERSION],
34 [am__api_version='1.15'
34 [am__api_version='1.16'
3535 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3636 dnl require some minimum version. Point them to the right macro.
37 m4_if([$1], [1.15], [],
37 m4_if([$1], [1.16.1], [],
3838 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3939 ])
4040
5050 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
5151 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
5252 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53 [AM_AUTOMAKE_VERSION([1.15])dnl
53 [AM_AUTOMAKE_VERSION([1.16.1])dnl
5454 m4_ifndef([AC_AUTOCONF_VERSION],
5555 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
5656 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
5757
58 # Copyright (C) 2011-2014 Free Software Foundation, Inc.
58 # Copyright (C) 2011-2018 Free Software Foundation, Inc.
5959 #
6060 # This file is free software; the Free Software Foundation
6161 # gives unlimited permission to copy and/or distribute it,
117117
118118 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
119119
120 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
120 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
121121 #
122122 # This file is free software; the Free Software Foundation
123123 # gives unlimited permission to copy and/or distribute it,
169169
170170 # AM_CONDITIONAL -*- Autoconf -*-
171171
172 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
172 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
173173 #
174174 # This file is free software; the Free Software Foundation
175175 # gives unlimited permission to copy and/or distribute it,
200200 Usually this means the macro was only invoked conditionally.]])
201201 fi])])
202202
203 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
203 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
204204 #
205205 # This file is free software; the Free Software Foundation
206206 # gives unlimited permission to copy and/or distribute it,
391391
392392 # Generate code to set up dependency tracking. -*- Autoconf -*-
393393
394 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
395 #
396 # This file is free software; the Free Software Foundation
397 # gives unlimited permission to copy and/or distribute it,
398 # with or without modifications, as long as this notice is preserved.
399
394 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
395 #
396 # This file is free software; the Free Software Foundation
397 # gives unlimited permission to copy and/or distribute it,
398 # with or without modifications, as long as this notice is preserved.
400399
401400 # _AM_OUTPUT_DEPENDENCY_COMMANDS
402401 # ------------------------------
405404 # Older Autoconf quotes --file arguments for eval, but not when files
406405 # are listed without --file. Let's play safe and only enable the eval
407406 # if we detect the quoting.
408 case $CONFIG_FILES in
409 *\'*) eval set x "$CONFIG_FILES" ;;
410 *) set x $CONFIG_FILES ;;
411 esac
407 # TODO: see whether this extra hack can be removed once we start
408 # requiring Autoconf 2.70 or later.
409 AS_CASE([$CONFIG_FILES],
410 [*\'*], [eval set x "$CONFIG_FILES"],
411 [*], [set x $CONFIG_FILES])
412412 shift
413 for mf
413 # Used to flag and report bootstrapping failures.
414 am_rc=0
415 for am_mf
414416 do
415417 # Strip MF so we end up with the name of the file.
416 mf=`echo "$mf" | sed -e 's/:.*$//'`
417 # Check whether this is an Automake generated Makefile or not.
418 # We used to match only the files named 'Makefile.in', but
419 # some people rename them; so instead we look at the file content.
420 # Grep'ing the first line is not enough: some people post-process
421 # each Makefile.in and add a new line on top of each file to say so.
422 # Grep'ing the whole file is not good either: AIX grep has a line
418 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
419 # Check whether this is an Automake generated Makefile which includes
420 # dependency-tracking related rules and includes.
421 # Grep'ing the whole file directly is not great: AIX grep has a line
423422 # limit of 2048, but all sed's we know have understand at least 4000.
424 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
425 dirpart=`AS_DIRNAME("$mf")`
426 else
427 continue
428 fi
429 # Extract the definition of DEPDIR, am__include, and am__quote
430 # from the Makefile without running 'make'.
431 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
432 test -z "$DEPDIR" && continue
433 am__include=`sed -n 's/^am__include = //p' < "$mf"`
434 test -z "$am__include" && continue
435 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
436 # Find all dependency output files, they are included files with
437 # $(DEPDIR) in their names. We invoke sed twice because it is the
438 # simplest approach to changing $(DEPDIR) to its actual value in the
439 # expansion.
440 for file in `sed -n "
441 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
442 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
443 # Make sure the directory exists.
444 test -f "$dirpart/$file" && continue
445 fdir=`AS_DIRNAME(["$file"])`
446 AS_MKDIR_P([$dirpart/$fdir])
447 # echo "creating $dirpart/$file"
448 echo '# dummy' > "$dirpart/$file"
449 done
423 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
424 || continue
425 am_dirpart=`AS_DIRNAME(["$am_mf"])`
426 am_filepart=`AS_BASENAME(["$am_mf"])`
427 AM_RUN_LOG([cd "$am_dirpart" \
428 && sed -e '/# am--include-marker/d' "$am_filepart" \
429 | $MAKE -f - am--depfiles]) || am_rc=$?
450430 done
431 if test $am_rc -ne 0; then
432 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
433 for automatic dependency tracking. Try re-running configure with the
434 '--disable-dependency-tracking' option to at least be able to build
435 the package (albeit without support for automatic dependency tracking).])
436 fi
437 AS_UNSET([am_dirpart])
438 AS_UNSET([am_filepart])
439 AS_UNSET([am_mf])
440 AS_UNSET([am_rc])
441 rm -f conftest-deps.mk
451442 }
452443 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
453444
456447 # -----------------------------
457448 # This macro should only be invoked once -- use via AC_REQUIRE.
458449 #
459 # This code is only required when automatic dependency tracking
460 # is enabled. FIXME. This creates each '.P' file that we will
461 # need in order to bootstrap the dependency handling code.
450 # This code is only required when automatic dependency tracking is enabled.
451 # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
452 # order to bootstrap the dependency handling code.
462453 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
463454 [AC_CONFIG_COMMANDS([depfiles],
464455 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
465 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
466 ])
456 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
467457
468458 # Do all the work for Automake. -*- Autoconf -*-
469459
470 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
460 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
471461 #
472462 # This file is free software; the Free Software Foundation
473463 # gives unlimited permission to copy and/or distribute it,
554544 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
555545 # For better backward compatibility. To be removed once Automake 1.9.x
556546 # dies out for good. For more background, see:
557 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
558 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
547 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
548 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
559549 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
560550 # We need awk for the "check" target (and possibly the TAP driver). The
561551 # system "awk" is bad on some platforms.
622612 Aborting the configuration process, to ensure you take notice of the issue.
623613
624614 You can download and install GNU coreutils to get an 'rm' implementation
625 that behaves properly: <http://www.gnu.org/software/coreutils/>.
615 that behaves properly: <https://www.gnu.org/software/coreutils/>.
626616
627617 If you want to complete the configuration process using your problematic
628618 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
664654 done
665655 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
666656
667 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
657 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
668658 #
669659 # This file is free software; the Free Software Foundation
670660 # gives unlimited permission to copy and/or distribute it,
685675 fi
686676 AC_SUBST([install_sh])])
687677
688 # Copyright (C) 2003-2014 Free Software Foundation, Inc.
678 # Copyright (C) 2003-2018 Free Software Foundation, Inc.
689679 #
690680 # This file is free software; the Free Software Foundation
691681 # gives unlimited permission to copy and/or distribute it,
706696
707697 # Check to see how 'make' treats includes. -*- Autoconf -*-
708698
709 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
699 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
710700 #
711701 # This file is free software; the Free Software Foundation
712702 # gives unlimited permission to copy and/or distribute it,
714704
715705 # AM_MAKE_INCLUDE()
716706 # -----------------
717 # Check to see how make treats includes.
707 # Check whether make has an 'include' directive that can support all
708 # the idioms we need for our automatic dependency tracking code.
718709 AC_DEFUN([AM_MAKE_INCLUDE],
719 [am_make=${MAKE-make}
720 cat > confinc << 'END'
710 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
711 cat > confinc.mk << 'END'
721712 am__doit:
722 @echo this is the am__doit target
713 @echo this is the am__doit target >confinc.out
723714 .PHONY: am__doit
724715 END
725 # If we don't find an include directive, just comment out the code.
726 AC_MSG_CHECKING([for style of include used by $am_make])
727716 am__include="#"
728717 am__quote=
729 _am_result=none
730 # First try GNU make style include.
731 echo "include confinc" > confmf
732 # Ignore all kinds of additional output from 'make'.
733 case `$am_make -s -f confmf 2> /dev/null` in #(
734 *the\ am__doit\ target*)
735 am__include=include
736 am__quote=
737 _am_result=GNU
738 ;;
739 esac
740 # Now try BSD make style include.
741 if test "$am__include" = "#"; then
742 echo '.include "confinc"' > confmf
743 case `$am_make -s -f confmf 2> /dev/null` in #(
744 *the\ am__doit\ target*)
745 am__include=.include
746 am__quote="\""
747 _am_result=BSD
748 ;;
749 esac
750 fi
751 AC_SUBST([am__include])
752 AC_SUBST([am__quote])
753 AC_MSG_RESULT([$_am_result])
754 rm -f confinc confmf
755 ])
718 # BSD make does it like this.
719 echo '.include "confinc.mk" # ignored' > confmf.BSD
720 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
721 echo 'include confinc.mk # ignored' > confmf.GNU
722 _am_result=no
723 for s in GNU BSD; do
724 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
725 AS_CASE([$?:`cat confinc.out 2>/dev/null`],
726 ['0:this is the am__doit target'],
727 [AS_CASE([$s],
728 [BSD], [am__include='.include' am__quote='"'],
729 [am__include='include' am__quote=''])])
730 if test "$am__include" != "#"; then
731 _am_result="yes ($s style)"
732 break
733 fi
734 done
735 rm -f confinc.* confmf.*
736 AC_MSG_RESULT([${_am_result}])
737 AC_SUBST([am__include])])
738 AC_SUBST([am__quote])])
756739
757740 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
758741
759 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
742 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
760743 #
761744 # This file is free software; the Free Software Foundation
762745 # gives unlimited permission to copy and/or distribute it,
797780 # Obsolete and "removed" macros, that must however still report explicit
798781 # error messages when used, to smooth transition.
799782 #
800 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
783 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
801784 #
802785 # This file is free software; the Free Software Foundation
803786 # gives unlimited permission to copy and/or distribute it,
824807
825808 # Helper functions for option handling. -*- Autoconf -*-
826809
827 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
810 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
828811 #
829812 # This file is free software; the Free Software Foundation
830813 # gives unlimited permission to copy and/or distribute it,
853836 AC_DEFUN([_AM_IF_OPTION],
854837 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
855838
856 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
839 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
857840 #
858841 # This file is free software; the Free Software Foundation
859842 # gives unlimited permission to copy and/or distribute it,
900883 # For backward compatibility.
901884 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
902885
903 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
886 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
904887 #
905888 # This file is free software; the Free Software Foundation
906889 # gives unlimited permission to copy and/or distribute it,
919902
920903 # Check to make sure that the build environment is sane. -*- Autoconf -*-
921904
922 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
905 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
923906 #
924907 # This file is free software; the Free Software Foundation
925908 # gives unlimited permission to copy and/or distribute it,
1000983 rm -f conftest.file
1001984 ])
1002985
1003 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
986 # Copyright (C) 2009-2018 Free Software Foundation, Inc.
1004987 #
1005988 # This file is free software; the Free Software Foundation
1006989 # gives unlimited permission to copy and/or distribute it,
10601043 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10611044 ])
10621045
1063 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
1046 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
10641047 #
10651048 # This file is free software; the Free Software Foundation
10661049 # gives unlimited permission to copy and/or distribute it,
10881071 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10891072 AC_SUBST([INSTALL_STRIP_PROGRAM])])
10901073
1091 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
1074 # Copyright (C) 2006-2018 Free Software Foundation, Inc.
10921075 #
10931076 # This file is free software; the Free Software Foundation
10941077 # gives unlimited permission to copy and/or distribute it,
11071090
11081091 # Check how to create a tarball. -*- Autoconf -*-
11091092
1110 # Copyright (C) 2004-2014 Free Software Foundation, Inc.
1093 # Copyright (C) 2004-2018 Free Software Foundation, Inc.
11111094 #
11121095 # This file is free software; the Free Software Foundation
11131096 # gives unlimited permission to copy and/or distribute it,
12391222 ]) # _AM_PROG_TAR
12401223
12411224 m4_include([gl/m4/00gnulib.m4])
1225 m4_include([gl/m4/__inline.m4])
12421226 m4_include([gl/m4/absolute-header.m4])
12431227 m4_include([gl/m4/autobuild.m4])
12441228 m4_include([gl/m4/byteswap.m4])
12511235 m4_include([gl/m4/inttypes-pri.m4])
12521236 m4_include([gl/m4/inttypes.m4])
12531237 m4_include([gl/m4/limits-h.m4])
1254 m4_include([gl/m4/longlong.m4])
12551238 m4_include([gl/m4/manywarnings.m4])
12561239 m4_include([gl/m4/md4.m4])
12571240 m4_include([gl/m4/multiarch.m4])
12711254 m4_include([gl/m4/wchar_h.m4])
12721255 m4_include([gl/m4/wchar_t.m4])
12731256 m4_include([gl/m4/wint_t.m4])
1257 m4_include([gl/m4/zzgnulib.m4])
12741258 m4_include([m4/libtool.m4])
12751259 m4_include([m4/ltoptions.m4])
12761260 m4_include([m4/ltsugar.m4])
33 me=ar-lib
44 scriptversion=2012-03-01.08; # UTC
55
6 # Copyright (C) 2010-2014 Free Software Foundation, Inc.
6 # Copyright (C) 2010-2018 Free Software Foundation, Inc.
77 # Written by Peter Rosin <peda@lysator.liu.se>.
88 #
99 # This program is free software; you can redistribute it and/or modify
1717 # GNU General Public License for more details.
1818 #
1919 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 # along with this program. If not, see <https://www.gnu.org/licenses/>.
2121
2222 # As a special exception to the GNU General Public License, if you
2323 # distribute this file as part of a program that contains a
00 #! /bin/sh
11 # Wrapper for compilers which do not understand '-c -o'.
22
3 scriptversion=2012-10-14.11; # UTC
4
5 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
3 scriptversion=2018-03-07.03; # UTC
4
5 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
66 # Written by Tom Tromey <tromey@cygnus.com>.
77 #
88 # This program is free software; you can redistribute it and/or modify
1616 # GNU General Public License for more details.
1717 #
1818 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # along with this program. If not, see <https://www.gnu.org/licenses/>.
2020
2121 # As a special exception to the GNU General Public License, if you
2222 # distribute this file as part of a program that contains a
254254 echo "compile $scriptversion"
255255 exit $?
256256 ;;
257 cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
257 cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
258 icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
258259 func_cl_wrapper "$@" # Doesn't return...
259260 ;;
260261 esac
338339 # Local Variables:
339340 # mode: shell-script
340341 # sh-indentation: 2
341 # eval: (add-hook 'write-file-hooks 'time-stamp)
342 # eval: (add-hook 'before-save-hook 'time-stamp)
342343 # time-stamp-start: "scriptversion="
343344 # time-stamp-format: "%:y-%02m-%02d.%02H"
344 # time-stamp-time-zone: "UTC"
345 # time-stamp-time-zone: "UTC0"
345346 # time-stamp-end: "; # UTC"
346347 # End:
00 #! /bin/sh
11 # Attempt to guess a canonical system name.
2 # Copyright 1992-2016 Free Software Foundation, Inc.
3
4 timestamp='2016-10-02'
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-02-24'
55
66 # This file is free software; you can redistribute it and/or modify it
77 # under the terms of the GNU General Public License as published by
1414 # General Public License for more details.
1515 #
1616 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
17 # along with this program; if not, see <https://www.gnu.org/licenses/>.
1818 #
1919 # As a special exception to the GNU General Public License, if you
2020 # distribute this file as part of a program that contains a
2626 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
2727 #
2828 # You can get the latest version of this script from:
29 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
29 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
3030 #
3131 # Please send patches to <config-patches@gnu.org>.
3232
3838
3939 Output the configuration name of the system \`$me' is run on.
4040
41 Operation modes:
41 Options:
4242 -h, --help print this help, then exit
4343 -t, --time-stamp print date of last modification, then exit
4444 -v, --version print version number, then exit
4949 GNU config.guess ($timestamp)
5050
5151 Originally written by Per Bothner.
52 Copyright 1992-2016 Free Software Foundation, Inc.
52 Copyright 1992-2018 Free Software Foundation, Inc.
5353
5454 This is free software; see the source for copying conditions. There is NO
5555 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
106106 dummy=$tmp/dummy ;
107107 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
108108 case $CC_FOR_BUILD,$HOST_CC,$CC in
109 ,,) echo "int x;" > $dummy.c ;
109 ,,) echo "int x;" > "$dummy.c" ;
110110 for c in cc gcc c89 c99 ; do
111 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
111 if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
112112 CC_FOR_BUILD="$c"; break ;
113113 fi ;
114114 done ;
131131 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
132132 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
133133
134 case "${UNAME_SYSTEM}" in
134 case "$UNAME_SYSTEM" in
135135 Linux|GNU|GNU/*)
136136 # If the system lacks a compiler, then just pick glibc.
137137 # We could probably try harder.
138138 LIBC=gnu
139139
140 eval $set_cc_for_build
141 cat <<-EOF > $dummy.c
140 eval "$set_cc_for_build"
141 cat <<-EOF > "$dummy.c"
142142 #include <features.h>
143143 #if defined(__UCLIBC__)
144144 LIBC=uclibc
148148 LIBC=gnu
149149 #endif
150150 EOF
151 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
151 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
152
153 # If ldd exists, use it to detect musl libc.
154 if command -v ldd >/dev/null && \
155 ldd --version 2>&1 | grep -q ^musl
156 then
157 LIBC=musl
158 fi
152159 ;;
153160 esac
154161
155162 # Note: order is significant - the case branches are not exclusive.
156163
157 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
164 case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
158165 *:NetBSD:*:*)
159166 # NetBSD (nbsd) targets should (where applicable) match one or
160167 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
168175 # portion of the name. We always set it to "unknown".
169176 sysctl="sysctl -n hw.machine_arch"
170177 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
171 /sbin/$sysctl 2>/dev/null || \
172 /usr/sbin/$sysctl 2>/dev/null || \
178 "/sbin/$sysctl" 2>/dev/null || \
179 "/usr/sbin/$sysctl" 2>/dev/null || \
173180 echo unknown)`
174 case "${UNAME_MACHINE_ARCH}" in
181 case "$UNAME_MACHINE_ARCH" in
175182 armeb) machine=armeb-unknown ;;
176183 arm*) machine=arm-unknown ;;
177184 sh3el) machine=shl-unknown ;;
178185 sh3eb) machine=sh-unknown ;;
179186 sh5el) machine=sh5le-unknown ;;
180187 earmv*)
181 arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
182 endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
183 machine=${arch}${endian}-unknown
188 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
189 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
190 machine="${arch}${endian}"-unknown
184191 ;;
185 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
192 *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
186193 esac
187194 # The Operating System including object format, if it has switched
188195 # to ELF recently (or will in the future) and ABI.
189 case "${UNAME_MACHINE_ARCH}" in
196 case "$UNAME_MACHINE_ARCH" in
190197 earm*)
191198 os=netbsdelf
192199 ;;
193200 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
194 eval $set_cc_for_build
201 eval "$set_cc_for_build"
195202 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
196203 | grep -q __ELF__
197204 then
207214 ;;
208215 esac
209216 # Determine ABI tags.
210 case "${UNAME_MACHINE_ARCH}" in
217 case "$UNAME_MACHINE_ARCH" in
211218 earm*)
212219 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
213 abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
220 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
214221 ;;
215222 esac
216223 # The OS release
218225 # thus, need a distinct triplet. However, they do not need
219226 # kernel version information, so it can be replaced with a
220227 # suitable tag, in the style of linux-gnu.
221 case "${UNAME_VERSION}" in
228 case "$UNAME_VERSION" in
222229 Debian*)
223230 release='-gnu'
224231 ;;
225232 *)
226 release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
233 release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
227234 ;;
228235 esac
229236 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
230237 # contains redundant information, the shorter form:
231238 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
232 echo "${machine}-${os}${release}${abi}"
239 echo "$machine-${os}${release}${abi}"
233240 exit ;;
234241 *:Bitrig:*:*)
235242 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
236 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
243 echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
237244 exit ;;
238245 *:OpenBSD:*:*)
239246 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
240 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
247 echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
241248 exit ;;
242249 *:LibertyBSD:*:*)
243250 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
244 echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
251 echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
252 exit ;;
253 *:MidnightBSD:*:*)
254 echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
245255 exit ;;
246256 *:ekkoBSD:*:*)
247 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
257 echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
248258 exit ;;
249259 *:SolidBSD:*:*)
250 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
260 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
251261 exit ;;
252262 macppc:MirBSD:*:*)
253 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
263 echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
254264 exit ;;
255265 *:MirBSD:*:*)
256 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
266 echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
257267 exit ;;
258268 *:Sortix:*:*)
259 echo ${UNAME_MACHINE}-unknown-sortix
260 exit ;;
269 echo "$UNAME_MACHINE"-unknown-sortix
270 exit ;;
271 *:Redox:*:*)
272 echo "$UNAME_MACHINE"-unknown-redox
273 exit ;;
274 mips:OSF1:*.*)
275 echo mips-dec-osf1
276 exit ;;
261277 alpha:OSF1:*:*)
262278 case $UNAME_RELEASE in
263279 *4.0)
309325 # A Tn.n version is a released field test version.
310326 # A Xn.n version is an unreleased experimental baselevel.
311327 # 1.2 uses "1.2" for uname -r.
312 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
328 echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
313329 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
314330 exitcode=$?
315331 trap '' 0
316332 exit $exitcode ;;
317 Alpha\ *:Windows_NT*:*)
318 # How do we know it's Interix rather than the generic POSIX subsystem?
319 # Should we change UNAME_MACHINE based on the output of uname instead
320 # of the specific Alpha model?
321 echo alpha-pc-interix
322 exit ;;
323 21064:Windows_NT:50:3)
324 echo alpha-dec-winnt3.5
325 exit ;;
326333 Amiga*:UNIX_System_V:4.0:*)
327334 echo m68k-unknown-sysv4
328335 exit ;;
329336 *:[Aa]miga[Oo][Ss]:*:*)
330 echo ${UNAME_MACHINE}-unknown-amigaos
337 echo "$UNAME_MACHINE"-unknown-amigaos
331338 exit ;;
332339 *:[Mm]orph[Oo][Ss]:*:*)
333 echo ${UNAME_MACHINE}-unknown-morphos
340 echo "$UNAME_MACHINE"-unknown-morphos
334341 exit ;;
335342 *:OS/390:*:*)
336343 echo i370-ibm-openedition
342349 echo powerpc-ibm-os400
343350 exit ;;
344351 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
345 echo arm-acorn-riscix${UNAME_RELEASE}
352 echo arm-acorn-riscix"$UNAME_RELEASE"
346353 exit ;;
347354 arm*:riscos:*:*|arm*:RISCOS:*:*)
348355 echo arm-unknown-riscos
369376 sparc) echo sparc-icl-nx7; exit ;;
370377 esac ;;
371378 s390x:SunOS:*:*)
372 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
379 echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
373380 exit ;;
374381 sun4H:SunOS:5.*:*)
375 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
382 echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
376383 exit ;;
377384 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
378 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
385 echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
379386 exit ;;
380387 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
381 echo i386-pc-auroraux${UNAME_RELEASE}
388 echo i386-pc-auroraux"$UNAME_RELEASE"
382389 exit ;;
383390 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
384 eval $set_cc_for_build
391 eval "$set_cc_for_build"
385392 SUN_ARCH=i386
386393 # If there is a compiler, see if it is configured for 64-bit objects.
387394 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
394401 SUN_ARCH=x86_64
395402 fi
396403 fi
397 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
404 echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
398405 exit ;;
399406 sun4*:SunOS:6*:*)
400407 # According to config.sub, this is the proper way to canonicalize
401408 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
402409 # it's likely to be more like Solaris than SunOS4.
403 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
410 echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
404411 exit ;;
405412 sun4*:SunOS:*:*)
406413 case "`/usr/bin/arch -k`" in
409416 ;;
410417 esac
411418 # Japanese Language versions have a version number like `4.1.3-JL'.
412 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
419 echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
413420 exit ;;
414421 sun3*:SunOS:*:*)
415 echo m68k-sun-sunos${UNAME_RELEASE}
422 echo m68k-sun-sunos"$UNAME_RELEASE"
416423 exit ;;
417424 sun*:*:4.2BSD:*)
418425 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
419 test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
426 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
420427 case "`/bin/arch`" in
421428 sun3)
422 echo m68k-sun-sunos${UNAME_RELEASE}
429 echo m68k-sun-sunos"$UNAME_RELEASE"
423430 ;;
424431 sun4)
425 echo sparc-sun-sunos${UNAME_RELEASE}
432 echo sparc-sun-sunos"$UNAME_RELEASE"
426433 ;;
427434 esac
428435 exit ;;
429436 aushp:SunOS:*:*)
430 echo sparc-auspex-sunos${UNAME_RELEASE}
437 echo sparc-auspex-sunos"$UNAME_RELEASE"
431438 exit ;;
432439 # The situation for MiNT is a little confusing. The machine name
433440 # can be virtually everything (everything which is not
438445 # MiNT. But MiNT is downward compatible to TOS, so this should
439446 # be no problem.
440447 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
441 echo m68k-atari-mint${UNAME_RELEASE}
448 echo m68k-atari-mint"$UNAME_RELEASE"
442449 exit ;;
443450 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
444 echo m68k-atari-mint${UNAME_RELEASE}
451 echo m68k-atari-mint"$UNAME_RELEASE"
445452 exit ;;
446453 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
447 echo m68k-atari-mint${UNAME_RELEASE}
454 echo m68k-atari-mint"$UNAME_RELEASE"
448455 exit ;;
449456 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
450 echo m68k-milan-mint${UNAME_RELEASE}
457 echo m68k-milan-mint"$UNAME_RELEASE"
451458 exit ;;
452459 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
453 echo m68k-hades-mint${UNAME_RELEASE}
460 echo m68k-hades-mint"$UNAME_RELEASE"
454461 exit ;;
455462 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
456 echo m68k-unknown-mint${UNAME_RELEASE}
463 echo m68k-unknown-mint"$UNAME_RELEASE"
457464 exit ;;
458465 m68k:machten:*:*)
459 echo m68k-apple-machten${UNAME_RELEASE}
466 echo m68k-apple-machten"$UNAME_RELEASE"
460467 exit ;;
461468 powerpc:machten:*:*)
462 echo powerpc-apple-machten${UNAME_RELEASE}
469 echo powerpc-apple-machten"$UNAME_RELEASE"
463470 exit ;;
464471 RISC*:Mach:*:*)
465472 echo mips-dec-mach_bsd4.3
466473 exit ;;
467474 RISC*:ULTRIX:*:*)
468 echo mips-dec-ultrix${UNAME_RELEASE}
475 echo mips-dec-ultrix"$UNAME_RELEASE"
469476 exit ;;
470477 VAX*:ULTRIX*:*:*)
471 echo vax-dec-ultrix${UNAME_RELEASE}
478 echo vax-dec-ultrix"$UNAME_RELEASE"
472479 exit ;;
473480 2020:CLIX:*:* | 2430:CLIX:*:*)
474 echo clipper-intergraph-clix${UNAME_RELEASE}
481 echo clipper-intergraph-clix"$UNAME_RELEASE"
475482 exit ;;
476483 mips:*:*:UMIPS | mips:*:*:RISCos)
477 eval $set_cc_for_build
478 sed 's/^ //' << EOF >$dummy.c
484 eval "$set_cc_for_build"
485 sed 's/^ //' << EOF > "$dummy.c"
479486 #ifdef __cplusplus
480487 #include <stdio.h> /* for printf() prototype */
481488 int main (int argc, char *argv[]) {
484491 #endif
485492 #if defined (host_mips) && defined (MIPSEB)
486493 #if defined (SYSTYPE_SYSV)
487 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
494 printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
488495 #endif
489496 #if defined (SYSTYPE_SVR4)
490 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
497 printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
491498 #endif
492499 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
493 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
500 printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
494501 #endif
495502 #endif
496503 exit (-1);
497504 }
498505 EOF
499 $CC_FOR_BUILD -o $dummy $dummy.c &&
500 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
501 SYSTEM_NAME=`$dummy $dummyarg` &&
506 $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
507 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
508 SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
502509 { echo "$SYSTEM_NAME"; exit; }
503 echo mips-mips-riscos${UNAME_RELEASE}
510 echo mips-mips-riscos"$UNAME_RELEASE"
504511 exit ;;
505512 Motorola:PowerMAX_OS:*:*)
506513 echo powerpc-motorola-powermax
526533 AViiON:dgux:*:*)
527534 # DG/UX returns AViiON for all architectures
528535 UNAME_PROCESSOR=`/usr/bin/uname -p`
529 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
536 if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
530537 then
531 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
532 [ ${TARGET_BINARY_INTERFACE}x = x ]
538 if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
539 [ "$TARGET_BINARY_INTERFACE"x = x ]
533540 then
534 echo m88k-dg-dgux${UNAME_RELEASE}
541 echo m88k-dg-dgux"$UNAME_RELEASE"
535542 else
536 echo m88k-dg-dguxbcs${UNAME_RELEASE}
543 echo m88k-dg-dguxbcs"$UNAME_RELEASE"
537544 fi
538545 else
539 echo i586-dg-dgux${UNAME_RELEASE}
546 echo i586-dg-dgux"$UNAME_RELEASE"
540547 fi
541548 exit ;;
542549 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
553560 echo m68k-tektronix-bsd
554561 exit ;;
555562 *:IRIX*:*:*)
556 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
563 echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
557564 exit ;;
558565 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
559566 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
565572 if [ -x /usr/bin/oslevel ] ; then
566573 IBM_REV=`/usr/bin/oslevel`
567574 else
568 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
569 fi
570 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
575 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
576 fi
577 echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
571578 exit ;;
572579 *:AIX:2:3)
573580 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
574 eval $set_cc_for_build
575 sed 's/^ //' << EOF >$dummy.c
581 eval "$set_cc_for_build"
582 sed 's/^ //' << EOF > "$dummy.c"
576583 #include <sys/systemcfg.h>
577584
578585 main()
583590 exit(0);
584591 }
585592 EOF
586 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
593 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
587594 then
588595 echo "$SYSTEM_NAME"
589596 else
597604 exit ;;
598605 *:AIX:*:[4567])
599606 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
600 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
607 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
601608 IBM_ARCH=rs6000
602609 else
603610 IBM_ARCH=powerpc
606613 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
607614 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
608615 else
609 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
610 fi
611 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
616 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
617 fi
618 echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
612619 exit ;;
613620 *:AIX:*:*)
614621 echo rs6000-ibm-aix
615622 exit ;;
616 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
623 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
617624 echo romp-ibm-bsd4.4
618625 exit ;;
619626 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
620 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
627 echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
621628 exit ;; # report: romp-ibm BSD 4.3
622629 *:BOSX:*:*)
623630 echo rs6000-bull-bosx
632639 echo m68k-hp-bsd4.4
633640 exit ;;
634641 9000/[34678]??:HP-UX:*:*)
635 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
636 case "${UNAME_MACHINE}" in
637 9000/31? ) HP_ARCH=m68000 ;;
638 9000/[34]?? ) HP_ARCH=m68k ;;
642 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
643 case "$UNAME_MACHINE" in
644 9000/31?) HP_ARCH=m68000 ;;
645 9000/[34]??) HP_ARCH=m68k ;;
639646 9000/[678][0-9][0-9])
640647 if [ -x /usr/bin/getconf ]; then
641648 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
642649 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
643 case "${sc_cpu_version}" in
650 case "$sc_cpu_version" in
644651 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
645652 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
646653 532) # CPU_PA_RISC2_0
647 case "${sc_kernel_bits}" in
654 case "$sc_kernel_bits" in
648655 32) HP_ARCH=hppa2.0n ;;
649656 64) HP_ARCH=hppa2.0w ;;
650657 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
651658 esac ;;
652659 esac
653660 fi
654 if [ "${HP_ARCH}" = "" ]; then
655 eval $set_cc_for_build
656 sed 's/^ //' << EOF >$dummy.c
661 if [ "$HP_ARCH" = "" ]; then
662 eval "$set_cc_for_build"
663 sed 's/^ //' << EOF > "$dummy.c"
657664
658665 #define _HPUX_SOURCE
659666 #include <stdlib.h>
686693 exit (0);
687694 }
688695 EOF
689 (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
696 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
690697 test -z "$HP_ARCH" && HP_ARCH=hppa
691698 fi ;;
692699 esac
693 if [ ${HP_ARCH} = hppa2.0w ]
700 if [ "$HP_ARCH" = hppa2.0w ]
694701 then
695 eval $set_cc_for_build
702 eval "$set_cc_for_build"
696703
697704 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
698705 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
711718 HP_ARCH=hppa64
712719 fi
713720 fi
714 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
721 echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
715722 exit ;;
716723 ia64:HP-UX:*:*)
717 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
718 echo ia64-hp-hpux${HPUX_REV}
724 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
725 echo ia64-hp-hpux"$HPUX_REV"
719726 exit ;;
720727 3050*:HI-UX:*:*)
721 eval $set_cc_for_build
722 sed 's/^ //' << EOF >$dummy.c
728 eval "$set_cc_for_build"
729 sed 's/^ //' << EOF > "$dummy.c"
723730 #include <unistd.h>
724731 int
725732 main ()
744751 exit (0);
745752 }
746753 EOF
747 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
754 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
748755 { echo "$SYSTEM_NAME"; exit; }
749756 echo unknown-hitachi-hiuxwe2
750757 exit ;;
751 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
758 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
752759 echo hppa1.1-hp-bsd
753760 exit ;;
754761 9000/8??:4.3bsd:*:*)
757764 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
758765 echo hppa1.0-hp-mpeix
759766 exit ;;
760 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
767 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
761768 echo hppa1.1-hp-osf
762769 exit ;;
763770 hp8??:OSF1:*:*)
765772 exit ;;
766773 i*86:OSF1:*:*)
767774 if [ -x /usr/sbin/sysversion ] ; then
768 echo ${UNAME_MACHINE}-unknown-osf1mk
775 echo "$UNAME_MACHINE"-unknown-osf1mk
769776 else
770 echo ${UNAME_MACHINE}-unknown-osf1
777 echo "$UNAME_MACHINE"-unknown-osf1
771778 fi
772779 exit ;;
773780 parisc*:Lites*:*:*)
792799 echo c4-convex-bsd
793800 exit ;;
794801 CRAY*Y-MP:*:*:*)
795 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
802 echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
796803 exit ;;
797804 CRAY*[A-Z]90:*:*:*)
798 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
805 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
799806 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
800807 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
801808 -e 's/\.[^.]*$/.X/'
802809 exit ;;
803810 CRAY*TS:*:*:*)
804 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
811 echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
805812 exit ;;
806813 CRAY*T3E:*:*:*)
807 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
814 echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
808815 exit ;;
809816 CRAY*SV1:*:*:*)
810 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
817 echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
811818 exit ;;
812819 *:UNICOS/mp:*:*)
813 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
820 echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
814821 exit ;;
815822 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
816823 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
817824 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
818 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
825 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
819826 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
820827 exit ;;
821828 5000:UNIX_System_V:4.*:*)
822829 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
823 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
830 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
824831 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
825832 exit ;;
826833 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
827 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
834 echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
828835 exit ;;
829836 sparc*:BSD/OS:*:*)
830 echo sparc-unknown-bsdi${UNAME_RELEASE}
837 echo sparc-unknown-bsdi"$UNAME_RELEASE"
831838 exit ;;
832839 *:BSD/OS:*:*)
833 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
840 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
834841 exit ;;
835842 *:FreeBSD:*:*)
836843 UNAME_PROCESSOR=`/usr/bin/uname -p`
837 case ${UNAME_PROCESSOR} in
844 case "$UNAME_PROCESSOR" in
838845 amd64)
839 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
840 *)
841 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
846 UNAME_PROCESSOR=x86_64 ;;
847 i386)
848 UNAME_PROCESSOR=i586 ;;
842849 esac
850 echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
843851 exit ;;
844852 i*:CYGWIN*:*)
845 echo ${UNAME_MACHINE}-pc-cygwin
853 echo "$UNAME_MACHINE"-pc-cygwin
846854 exit ;;
847855 *:MINGW64*:*)
848 echo ${UNAME_MACHINE}-pc-mingw64
856 echo "$UNAME_MACHINE"-pc-mingw64
849857 exit ;;
850858 *:MINGW*:*)
851 echo ${UNAME_MACHINE}-pc-mingw32
859 echo "$UNAME_MACHINE"-pc-mingw32
852860 exit ;;
853861 *:MSYS*:*)
854 echo ${UNAME_MACHINE}-pc-msys
855 exit ;;
856 i*:windows32*:*)
857 # uname -m includes "-pc" on this system.
858 echo ${UNAME_MACHINE}-mingw32
862 echo "$UNAME_MACHINE"-pc-msys
859863 exit ;;
860864 i*:PW*:*)
861 echo ${UNAME_MACHINE}-pc-pw32
865 echo "$UNAME_MACHINE"-pc-pw32
862866 exit ;;
863867 *:Interix*:*)
864 case ${UNAME_MACHINE} in
868 case "$UNAME_MACHINE" in
865869 x86)
866 echo i586-pc-interix${UNAME_RELEASE}
870 echo i586-pc-interix"$UNAME_RELEASE"
867871 exit ;;
868872 authenticamd | genuineintel | EM64T)
869 echo x86_64-unknown-interix${UNAME_RELEASE}
873 echo x86_64-unknown-interix"$UNAME_RELEASE"
870874 exit ;;
871875 IA64)
872 echo ia64-unknown-interix${UNAME_RELEASE}
876 echo ia64-unknown-interix"$UNAME_RELEASE"
873877 exit ;;
874878 esac ;;
875 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
876 echo i${UNAME_MACHINE}-pc-mks
877 exit ;;
878 8664:Windows_NT:*)
879 echo x86_64-pc-mks
880 exit ;;
881 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
882 # How do we know it's Interix rather than the generic POSIX subsystem?
883 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
884 # UNAME_MACHINE based on the output of uname instead of i386?
885 echo i586-pc-interix
886 exit ;;
887879 i*:UWIN*:*)
888 echo ${UNAME_MACHINE}-pc-uwin
880 echo "$UNAME_MACHINE"-pc-uwin
889881 exit ;;
890882 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
891883 echo x86_64-unknown-cygwin
892884 exit ;;
893 p*:CYGWIN*:*)
894 echo powerpcle-unknown-cygwin
895 exit ;;
896885 prep*:SunOS:5.*:*)
897 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
886 echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
898887 exit ;;
899888 *:GNU:*:*)
900889 # the GNU system
901 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
890 echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
902891 exit ;;
903892 *:GNU/*:*:*)
904893 # other systems with GNU libc and userland
905 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
894 echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
906895 exit ;;
907896 i*86:Minix:*:*)
908 echo ${UNAME_MACHINE}-pc-minix
897 echo "$UNAME_MACHINE"-pc-minix
909898 exit ;;
910899 aarch64:Linux:*:*)
911 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
900 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
912901 exit ;;
913902 aarch64_be:Linux:*:*)
914903 UNAME_MACHINE=aarch64_be
915 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
904 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
916905 exit ;;
917906 alpha:Linux:*:*)
918907 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
926915 esac
927916 objdump --private-headers /bin/sh | grep -q ld.so.1
928917 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
929 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
918 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
930919 exit ;;
931920 arc:Linux:*:* | arceb:Linux:*:*)
932 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
921 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
933922 exit ;;
934923 arm*:Linux:*:*)
935 eval $set_cc_for_build
924 eval "$set_cc_for_build"
936925 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
937926 | grep -q __ARM_EABI__
938927 then
939 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
928 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
940929 else
941930 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
942931 | grep -q __ARM_PCS_VFP
943932 then
944 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
933 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
945934 else
946 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
935 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
947936 fi
948937 fi
949938 exit ;;
950939 avr32*:Linux:*:*)
951 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
940 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
952941 exit ;;
953942 cris:Linux:*:*)
954 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
943 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
955944 exit ;;
956945 crisv32:Linux:*:*)
957 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
946 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
958947 exit ;;
959948 e2k:Linux:*:*)
960 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
949 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
961950 exit ;;
962951 frv:Linux:*:*)
963 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
952 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
964953 exit ;;
965954 hexagon:Linux:*:*)
966 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
955 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
967956 exit ;;
968957 i*86:Linux:*:*)
969 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
958 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
970959 exit ;;
971960 ia64:Linux:*:*)
972 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
961 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
973962 exit ;;
974963 k1om:Linux:*:*)
975 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
964 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
976965 exit ;;
977966 m32r*:Linux:*:*)
978 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
967 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
979968 exit ;;
980969 m68*:Linux:*:*)
981 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
970 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
982971 exit ;;
983972 mips:Linux:*:* | mips64:Linux:*:*)
984 eval $set_cc_for_build
985 sed 's/^ //' << EOF >$dummy.c
973 eval "$set_cc_for_build"
974 sed 's/^ //' << EOF > "$dummy.c"
986975 #undef CPU
987976 #undef ${UNAME_MACHINE}
988977 #undef ${UNAME_MACHINE}el
996985 #endif
997986 #endif
998987 EOF
999 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
1000 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
988 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
989 test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
1001990 ;;
1002991 mips64el:Linux:*:*)
1003 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
992 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1004993 exit ;;
1005994 openrisc*:Linux:*:*)
1006 echo or1k-unknown-linux-${LIBC}
995 echo or1k-unknown-linux-"$LIBC"
1007996 exit ;;
1008997 or32:Linux:*:* | or1k*:Linux:*:*)
1009 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
998 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1010999 exit ;;
10111000 padre:Linux:*:*)
1012 echo sparc-unknown-linux-${LIBC}
1001 echo sparc-unknown-linux-"$LIBC"
10131002 exit ;;
10141003 parisc64:Linux:*:* | hppa64:Linux:*:*)
1015 echo hppa64-unknown-linux-${LIBC}
1004 echo hppa64-unknown-linux-"$LIBC"
10161005 exit ;;
10171006 parisc:Linux:*:* | hppa:Linux:*:*)
10181007 # Look for CPU level
10191008 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1020 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
1021 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
1022 *) echo hppa-unknown-linux-${LIBC} ;;
1009 PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
1010 PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
1011 *) echo hppa-unknown-linux-"$LIBC" ;;
10231012 esac
10241013 exit ;;
10251014 ppc64:Linux:*:*)
1026 echo powerpc64-unknown-linux-${LIBC}
1015 echo powerpc64-unknown-linux-"$LIBC"
10271016 exit ;;
10281017 ppc:Linux:*:*)
1029 echo powerpc-unknown-linux-${LIBC}
1018 echo powerpc-unknown-linux-"$LIBC"
10301019 exit ;;
10311020 ppc64le:Linux:*:*)
1032 echo powerpc64le-unknown-linux-${LIBC}
1021 echo powerpc64le-unknown-linux-"$LIBC"
10331022 exit ;;
10341023 ppcle:Linux:*:*)
1035 echo powerpcle-unknown-linux-${LIBC}
1024 echo powerpcle-unknown-linux-"$LIBC"
10361025 exit ;;
10371026 riscv32:Linux:*:* | riscv64:Linux:*:*)
1038 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1027 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10391028 exit ;;
10401029 s390:Linux:*:* | s390x:Linux:*:*)
1041 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
1030 echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
10421031 exit ;;
10431032 sh64*:Linux:*:*)
1044 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1033 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10451034 exit ;;
10461035 sh*:Linux:*:*)
1047 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1036 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10481037 exit ;;
10491038 sparc:Linux:*:* | sparc64:Linux:*:*)
1050 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1039 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10511040 exit ;;
10521041 tile*:Linux:*:*)
1053 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1042 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10541043 exit ;;
10551044 vax:Linux:*:*)
1056 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1045 echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
10571046 exit ;;
10581047 x86_64:Linux:*:*)
1059 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
1048 if objdump -f /bin/sh | grep -q elf32-x86-64; then
1049 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32
1050 else
1051 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
1052 fi
10601053 exit ;;
10611054 xtensa*:Linux:*:*)
1062 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1055 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10631056 exit ;;
10641057 i*86:DYNIX/ptx:4*:*)
10651058 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
10731066 # I am not positive that other SVR4 systems won't match this,
10741067 # I just have to hope. -- rms.
10751068 # Use sysv4.2uw... so that sysv4* matches it.
1076 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1069 echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
10771070 exit ;;
10781071 i*86:OS/2:*:*)
10791072 # If we were able to find `uname', then EMX Unix compatibility
10801073 # is probably installed.
1081 echo ${UNAME_MACHINE}-pc-os2-emx
1074 echo "$UNAME_MACHINE"-pc-os2-emx
10821075 exit ;;
10831076 i*86:XTS-300:*:STOP)
1084 echo ${UNAME_MACHINE}-unknown-stop
1077 echo "$UNAME_MACHINE"-unknown-stop
10851078 exit ;;
10861079 i*86:atheos:*:*)
1087 echo ${UNAME_MACHINE}-unknown-atheos
1080 echo "$UNAME_MACHINE"-unknown-atheos
10881081 exit ;;
10891082 i*86:syllable:*:*)
1090 echo ${UNAME_MACHINE}-pc-syllable
1083 echo "$UNAME_MACHINE"-pc-syllable
10911084 exit ;;
10921085 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1093 echo i386-unknown-lynxos${UNAME_RELEASE}
1086 echo i386-unknown-lynxos"$UNAME_RELEASE"
10941087 exit ;;
10951088 i*86:*DOS:*:*)
1096 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1097 exit ;;
1098 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1099 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1089 echo "$UNAME_MACHINE"-pc-msdosdjgpp
1090 exit ;;
1091 i*86:*:4.*:*)
1092 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
11001093 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1101 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1094 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
11021095 else
1103 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1096 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
11041097 fi
11051098 exit ;;
11061099 i*86:*:5:[678]*)
11101103 *Pentium) UNAME_MACHINE=i586 ;;
11111104 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
11121105 esac
1113 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1106 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
11141107 exit ;;
11151108 i*86:*:3.2:*)
11161109 if test -f /usr/options/cb.name; then
11171110 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1118 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1111 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
11191112 elif /bin/uname -X 2>/dev/null >/dev/null ; then
11201113 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
11211114 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
11251118 && UNAME_MACHINE=i686
11261119 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
11271120 && UNAME_MACHINE=i686
1128 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1121 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
11291122 else
1130 echo ${UNAME_MACHINE}-pc-sysv32
1123 echo "$UNAME_MACHINE"-pc-sysv32
11311124 fi
11321125 exit ;;
11331126 pc:*:*:*)
11471140 exit ;;
11481141 i860:*:4.*:*) # i860-SVR4
11491142 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1150 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1143 echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
11511144 else # Add other i860-SVR4 vendors below as they are discovered.
1152 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1145 echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
11531146 fi
11541147 exit ;;
11551148 mini*:CTIX:SYS*5:*)
11691162 test -r /etc/.relid \
11701163 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
11711164 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1172 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1165 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
11731166 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1174 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1167 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
11751168 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
11761169 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
11771170 && { echo i486-ncr-sysv4; exit; } ;;
11801173 test -r /etc/.relid \
11811174 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
11821175 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1183 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1176 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
11841177 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1185 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1178 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
11861179 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1187 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1180 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
11881181 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1189 echo m68k-unknown-lynxos${UNAME_RELEASE}
1182 echo m68k-unknown-lynxos"$UNAME_RELEASE"
11901183 exit ;;
11911184 mc68030:UNIX_System_V:4.*:*)
11921185 echo m68k-atari-sysv4
11931186 exit ;;
11941187 TSUNAMI:LynxOS:2.*:*)
1195 echo sparc-unknown-lynxos${UNAME_RELEASE}
1188 echo sparc-unknown-lynxos"$UNAME_RELEASE"
11961189 exit ;;
11971190 rs6000:LynxOS:2.*:*)
1198 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1191 echo rs6000-unknown-lynxos"$UNAME_RELEASE"
11991192 exit ;;
12001193 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1201 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1194 echo powerpc-unknown-lynxos"$UNAME_RELEASE"
12021195 exit ;;
12031196 SM[BE]S:UNIX_SV:*:*)
1204 echo mips-dde-sysv${UNAME_RELEASE}
1197 echo mips-dde-sysv"$UNAME_RELEASE"
12051198 exit ;;
12061199 RM*:ReliantUNIX-*:*:*)
12071200 echo mips-sni-sysv4
12121205 *:SINIX-*:*:*)
12131206 if uname -p 2>/dev/null >/dev/null ; then
12141207 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1215 echo ${UNAME_MACHINE}-sni-sysv4
1208 echo "$UNAME_MACHINE"-sni-sysv4
12161209 else
12171210 echo ns32k-sni-sysv
12181211 fi
12321225 exit ;;
12331226 i*86:VOS:*:*)
12341227 # From Paul.Green@stratus.com.
1235 echo ${UNAME_MACHINE}-stratus-vos
1228 echo "$UNAME_MACHINE"-stratus-vos
12361229 exit ;;
12371230 *:VOS:*:*)
12381231 # From Paul.Green@stratus.com.
12391232 echo hppa1.1-stratus-vos
12401233 exit ;;
12411234 mc68*:A/UX:*:*)
1242 echo m68k-apple-aux${UNAME_RELEASE}
1235 echo m68k-apple-aux"$UNAME_RELEASE"
12431236 exit ;;
12441237 news*:NEWS-OS:6*:*)
12451238 echo mips-sony-newsos6
12461239 exit ;;
12471240 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
12481241 if [ -d /usr/nec ]; then
1249 echo mips-nec-sysv${UNAME_RELEASE}
1242 echo mips-nec-sysv"$UNAME_RELEASE"
12501243 else
1251 echo mips-unknown-sysv${UNAME_RELEASE}
1244 echo mips-unknown-sysv"$UNAME_RELEASE"
12521245 fi
12531246 exit ;;
12541247 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
12671260 echo x86_64-unknown-haiku
12681261 exit ;;
12691262 SX-4:SUPER-UX:*:*)
1270 echo sx4-nec-superux${UNAME_RELEASE}
1263 echo sx4-nec-superux"$UNAME_RELEASE"
12711264 exit ;;
12721265 SX-5:SUPER-UX:*:*)
1273 echo sx5-nec-superux${UNAME_RELEASE}
1266 echo sx5-nec-superux"$UNAME_RELEASE"
12741267 exit ;;
12751268 SX-6:SUPER-UX:*:*)
1276 echo sx6-nec-superux${UNAME_RELEASE}
1269 echo sx6-nec-superux"$UNAME_RELEASE"
12771270 exit ;;
12781271 SX-7:SUPER-UX:*:*)
1279 echo sx7-nec-superux${UNAME_RELEASE}
1272 echo sx7-nec-superux"$UNAME_RELEASE"
12801273 exit ;;
12811274 SX-8:SUPER-UX:*:*)
1282 echo sx8-nec-superux${UNAME_RELEASE}
1275 echo sx8-nec-superux"$UNAME_RELEASE"
12831276 exit ;;
12841277 SX-8R:SUPER-UX:*:*)
1285 echo sx8r-nec-superux${UNAME_RELEASE}
1278 echo sx8r-nec-superux"$UNAME_RELEASE"
12861279 exit ;;
12871280 SX-ACE:SUPER-UX:*:*)
1288 echo sxace-nec-superux${UNAME_RELEASE}
1281 echo sxace-nec-superux"$UNAME_RELEASE"
12891282 exit ;;
12901283 Power*:Rhapsody:*:*)
1291 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1284 echo powerpc-apple-rhapsody"$UNAME_RELEASE"
12921285 exit ;;
12931286 *:Rhapsody:*:*)
1294 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1287 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
12951288 exit ;;
12961289 *:Darwin:*:*)
12971290 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1298 eval $set_cc_for_build
1291 eval "$set_cc_for_build"
12991292 if test "$UNAME_PROCESSOR" = unknown ; then
13001293 UNAME_PROCESSOR=powerpc
13011294 fi
1302 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1295 if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
13031296 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
13041297 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1305 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1306 grep IS_64BIT_ARCH >/dev/null
1298 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1299 grep IS_64BIT_ARCH >/dev/null
13071300 then
13081301 case $UNAME_PROCESSOR in
13091302 i386) UNAME_PROCESSOR=x86_64 ;;
13101303 powerpc) UNAME_PROCESSOR=powerpc64 ;;
13111304 esac
1305 fi
1306 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1307 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1308 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1309 grep IS_PPC >/dev/null
1310 then
1311 UNAME_PROCESSOR=powerpc
13121312 fi
13131313 fi
13141314 elif test "$UNAME_PROCESSOR" = i386 ; then
13201320 # that Apple uses in portable devices.
13211321 UNAME_PROCESSOR=x86_64
13221322 fi
1323 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1323 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
13241324 exit ;;
13251325 *:procnto*:*:* | *:QNX:[0123456789]*:*)
13261326 UNAME_PROCESSOR=`uname -p`
13281328 UNAME_PROCESSOR=i386
13291329 UNAME_MACHINE=pc
13301330 fi
1331 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1331 echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
13321332 exit ;;
13331333 *:QNX:*:4*)
13341334 echo i386-pc-qnx
13351335 exit ;;
1336 NEO-?:NONSTOP_KERNEL:*:*)
1337 echo neo-tandem-nsk${UNAME_RELEASE}
1336 NEO-*:NONSTOP_KERNEL:*:*)
1337 echo neo-tandem-nsk"$UNAME_RELEASE"
13381338 exit ;;
13391339 NSE-*:NONSTOP_KERNEL:*:*)
1340 echo nse-tandem-nsk${UNAME_RELEASE}
1341 exit ;;
1342 NSR-?:NONSTOP_KERNEL:*:*)
1343 echo nsr-tandem-nsk${UNAME_RELEASE}
1340 echo nse-tandem-nsk"$UNAME_RELEASE"
1341 exit ;;
1342 NSR-*:NONSTOP_KERNEL:*:*)
1343 echo nsr-tandem-nsk"$UNAME_RELEASE"
1344 exit ;;
1345 NSV-*:NONSTOP_KERNEL:*:*)
1346 echo nsv-tandem-nsk"$UNAME_RELEASE"
1347 exit ;;
1348 NSX-*:NONSTOP_KERNEL:*:*)
1349 echo nsx-tandem-nsk"$UNAME_RELEASE"
13441350 exit ;;
13451351 *:NonStop-UX:*:*)
13461352 echo mips-compaq-nonstopux
13491355 echo bs2000-siemens-sysv
13501356 exit ;;
13511357 DS/*:UNIX_System_V:*:*)
1352 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1358 echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
13531359 exit ;;
13541360 *:Plan9:*:*)
13551361 # "uname -m" is not consistent, so use $cputype instead. 386
13601366 else
13611367 UNAME_MACHINE="$cputype"
13621368 fi
1363 echo ${UNAME_MACHINE}-unknown-plan9
1369 echo "$UNAME_MACHINE"-unknown-plan9
13641370 exit ;;
13651371 *:TOPS-10:*:*)
13661372 echo pdp10-unknown-tops10
13811387 echo pdp10-unknown-its
13821388 exit ;;
13831389 SEI:*:*:SEIUX)
1384 echo mips-sei-seiux${UNAME_RELEASE}
1390 echo mips-sei-seiux"$UNAME_RELEASE"
13851391 exit ;;
13861392 *:DragonFly:*:*)
1387 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1393 echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
13881394 exit ;;
13891395 *:*VMS:*:*)
13901396 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1391 case "${UNAME_MACHINE}" in
1397 case "$UNAME_MACHINE" in
13921398 A*) echo alpha-dec-vms ; exit ;;
13931399 I*) echo ia64-dec-vms ; exit ;;
13941400 V*) echo vax-dec-vms ; exit ;;
13971403 echo i386-pc-xenix
13981404 exit ;;
13991405 i*86:skyos:*:*)
1400 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
1406 echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
14011407 exit ;;
14021408 i*86:rdos:*:*)
1403 echo ${UNAME_MACHINE}-pc-rdos
1409 echo "$UNAME_MACHINE"-pc-rdos
14041410 exit ;;
14051411 i*86:AROS:*:*)
1406 echo ${UNAME_MACHINE}-pc-aros
1412 echo "$UNAME_MACHINE"-pc-aros
14071413 exit ;;
14081414 x86_64:VMkernel:*:*)
1409 echo ${UNAME_MACHINE}-unknown-esx
1415 echo "$UNAME_MACHINE"-unknown-esx
14101416 exit ;;
14111417 amd64:Isilon\ OneFS:*:*)
14121418 echo x86_64-unknown-onefs
14131419 exit ;;
14141420 esac
14151421
1422 echo "$0: unable to guess system type" >&2
1423
1424 case "$UNAME_MACHINE:$UNAME_SYSTEM" in
1425 mips:Linux | mips64:Linux)
1426 # If we got here on MIPS GNU/Linux, output extra information.
1427 cat >&2 <<EOF
1428
1429 NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
1430 the system type. Please install a C compiler and try again.
1431 EOF
1432 ;;
1433 esac
1434
14161435 cat >&2 <<EOF
1417 $0: unable to guess system type
14181436
14191437 This script (version $timestamp), has failed to recognize the
1420 operating system you are using. If your script is old, overwrite
1421 config.guess and config.sub with the latest versions from:
1422
1423 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1438 operating system you are using. If your script is old, overwrite *all*
1439 copies of config.guess and config.sub with the latest versions from:
1440
1441 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
14241442 and
1425 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1443 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
14261444
14271445 If $0 has already been updated, send the following data and any
14281446 information you think might be pertinent to config-patches@gnu.org to
14451463 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
14461464 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
14471465
1448 UNAME_MACHINE = ${UNAME_MACHINE}
1449 UNAME_RELEASE = ${UNAME_RELEASE}
1450 UNAME_SYSTEM = ${UNAME_SYSTEM}
1451 UNAME_VERSION = ${UNAME_VERSION}
1466 UNAME_MACHINE = "$UNAME_MACHINE"
1467 UNAME_RELEASE = "$UNAME_RELEASE"
1468 UNAME_SYSTEM = "$UNAME_SYSTEM"
1469 UNAME_VERSION = "$UNAME_VERSION"
14521470 EOF
14531471
14541472 exit 1
14551473
14561474 # Local variables:
1457 # eval: (add-hook 'write-file-hooks 'time-stamp)
1475 # eval: (add-hook 'write-file-functions 'time-stamp)
14581476 # time-stamp-start: "timestamp='"
14591477 # time-stamp-format: "%:y-%02m-%02d"
14601478 # time-stamp-end: "'"
00 #! /bin/sh
11 # Configuration validation subroutine script.
2 # Copyright 1992-2016 Free Software Foundation, Inc.
3
4 timestamp='2016-11-04'
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-02-22'
55
66 # This file is free software; you can redistribute it and/or modify it
77 # under the terms of the GNU General Public License as published by
1414 # General Public License for more details.
1515 #
1616 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
17 # along with this program; if not, see <https://www.gnu.org/licenses/>.
1818 #
1919 # As a special exception to the GNU General Public License, if you
2020 # distribute this file as part of a program that contains a
3232 # Otherwise, we print the canonical config type on stdout and succeed.
3333
3434 # You can get the latest version of this script from:
35 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
35 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
3636
3737 # This file is supposed to be the same for all GNU packages
3838 # and recognize all the CPU types, system types and aliases
5656
5757 Canonicalize a configuration name.
5858
59 Operation modes:
59 Options:
6060 -h, --help print this help, then exit
6161 -t, --time-stamp print date of last modification, then exit
6262 -v, --version print version number, then exit
6666 version="\
6767 GNU config.sub ($timestamp)
6868
69 Copyright 1992-2016 Free Software Foundation, Inc.
69 Copyright 1992-2018 Free Software Foundation, Inc.
7070
7171 This is free software; see the source for copying conditions. There is NO
7272 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
9393
9494 *local*)
9595 # First pass through any local machine types.
96 echo $1
96 echo "$1"
9797 exit ;;
9898
9999 * )
111111
112112 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
113113 # Here we must recognize all the valid KERNEL-OS combinations.
114 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
114 maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
115115 case $maybe_os in
116116 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
117117 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
119119 kopensolaris*-gnu* | cloudabi*-eabi* | \
120120 storm-chaos* | os2-emx* | rtmk-nova*)
121121 os=-$maybe_os
122 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
122 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
123123 ;;
124124 android-linux)
125125 os=-linux-android
126 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
126 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
127127 ;;
128128 *)
129 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
130 if [ $basic_machine != $1 ]
131 then os=`echo $1 | sed 's/.*-/-/'`
129 basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
130 if [ "$basic_machine" != "$1" ]
131 then os=`echo "$1" | sed 's/.*-/-/'`
132132 else os=; fi
133133 ;;
134134 esac
177177 ;;
178178 -sco6)
179179 os=-sco5v6
180 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
180 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
181181 ;;
182182 -sco5)
183183 os=-sco3.2v5
184 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
184 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
185185 ;;
186186 -sco4)
187187 os=-sco3.2v4
188 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
188 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
189189 ;;
190190 -sco3.2.[4-9]*)
191191 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
192 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
192 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
193193 ;;
194194 -sco3.2v[4-9]*)
195195 # Don't forget version if it is 3.2v4 or newer.
196 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
196 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
197197 ;;
198198 -sco5v6*)
199199 # Don't forget version if it is 3.2v4 or newer.
200 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
200 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
201201 ;;
202202 -sco*)
203203 os=-sco3.2v2
204 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
204 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
205205 ;;
206206 -udk*)
207 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
207 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
208208 ;;
209209 -isc)
210210 os=-isc2.2
211 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
211 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
212212 ;;
213213 -clix*)
214214 basic_machine=clipper-intergraph
215215 ;;
216216 -isc*)
217 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
217 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
218218 ;;
219219 -lynx*178)
220220 os=-lynxos178
226226 os=-lynxos
227227 ;;
228228 -ptx*)
229 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
230 ;;
231 -windowsnt*)
232 os=`echo $os | sed -e 's/windowsnt/winnt/'`
229 basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
233230 ;;
234231 -psos*)
235232 os=-psos
262259 | fido | fr30 | frv | ft32 \
263260 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
264261 | hexagon \
265 | i370 | i860 | i960 | ia64 \
262 | i370 | i860 | i960 | ia16 | ia64 \
266263 | ip2k | iq2000 \
267264 | k1om \
268265 | le32 | le64 \
298295 | nios | nios2 | nios2eb | nios2el \
299296 | ns16k | ns32k \
300297 | open8 | or1k | or1knd | or32 \
301 | pdp10 | pdp11 | pj | pjl \
298 | pdp10 | pj | pjl \
302299 | powerpc | powerpc64 | powerpc64le | powerpcle \
303300 | pru \
304301 | pyramid \
314311 | ubicom32 \
315312 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
316313 | visium \
317 | we32k \
314 | wasm32 \
318315 | x86 | xc16x | xstormy16 | xtensa \
319316 | z8k | z80)
320317 basic_machine=$basic_machine-unknown
335332 basic_machine=$basic_machine-unknown
336333 os=-none
337334 ;;
338 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
335 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
339336 ;;
340337 ms1)
341338 basic_machine=mt-unknown
364361 ;;
365362 # Object if more than one company name word.
366363 *-*-*)
367 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
364 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
368365 exit 1
369366 ;;
370367 # Recognize the basic CPU types with company name.
387384 | h8300-* | h8500-* \
388385 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
389386 | hexagon-* \
390 | i*86-* | i860-* | i960-* | ia64-* \
387 | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
391388 | ip2k-* | iq2000-* \
392389 | k1om-* \
393390 | le32-* | le64-* \
445442 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
446443 | vax-* \
447444 | visium-* \
445 | wasm32-* \
448446 | we32k-* \
449447 | x86-* | x86_64-* | xc16x-* | xps100-* \
450448 | xstormy16-* | xtensa*-* \
458456 # Recognize the various machine names and aliases which stand
459457 # for a CPU type and a company and sometimes even an OS.
460458 386bsd)
461 basic_machine=i386-unknown
459 basic_machine=i386-pc
462460 os=-bsd
463461 ;;
464462 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
492490 basic_machine=x86_64-pc
493491 ;;
494492 amd64-*)
495 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
493 basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
496494 ;;
497495 amdahl)
498496 basic_machine=580-amdahl
537535 os=-linux
538536 ;;
539537 blackfin-*)
540 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
538 basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
541539 os=-linux
542540 ;;
543541 bluegene*)
545543 os=-cnk
546544 ;;
547545 c54x-*)
548 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
546 basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
549547 ;;
550548 c55x-*)
551 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
549 basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
552550 ;;
553551 c6x-*)
554 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
552 basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
555553 ;;
556554 c90)
557555 basic_machine=c90-cray
640638 basic_machine=rs6000-bull
641639 os=-bosx
642640 ;;
643 dpx2* | dpx2*-bull)
641 dpx2*)
644642 basic_machine=m68k-bull
645643 os=-sysv3
646644 ;;
649647 os=$os"spe"
650648 ;;
651649 e500v[12]-*)
652 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
650 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
653651 os=$os"spe"
654652 ;;
655653 ebmon29k)
741739 hp9k8[0-9][0-9] | hp8[0-9][0-9])
742740 basic_machine=hppa1.0-hp
743741 ;;
744 hppa-next)
745 os=-nextstep3
746 ;;
747742 hppaosf)
748743 basic_machine=hppa1.1-hp
749744 os=-osf
756751 basic_machine=i370-ibm
757752 ;;
758753 i*86v32)
759 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
754 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
760755 os=-sysv32
761756 ;;
762757 i*86v4*)
763 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
758 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
764759 os=-sysv4
765760 ;;
766761 i*86v)
767 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
762 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
768763 os=-sysv
769764 ;;
770765 i*86sol2)
771 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
766 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
772767 os=-solaris2
773768 ;;
774769 i386mach)
775770 basic_machine=i386-mach
776771 os=-mach
777772 ;;
778 i386-vsta | vsta)
773 vsta)
779774 basic_machine=i386-unknown
780775 os=-vsta
781776 ;;
794789 os=-sysv
795790 ;;
796791 leon-*|leon[3-9]-*)
797 basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
792 basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
798793 ;;
799794 m68knommu)
800795 basic_machine=m68k-unknown
801796 os=-linux
802797 ;;
803798 m68knommu-*)
804 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
799 basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
805800 os=-linux
806 ;;
807 m88k-omron*)
808 basic_machine=m88k-omron
809801 ;;
810802 magnum | m3230)
811803 basic_machine=mips-mips
838830 os=-mint
839831 ;;
840832 mips3*-*)
841 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
833 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
842834 ;;
843835 mips3*)
844 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
836 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
845837 ;;
846838 monitor)
847839 basic_machine=m68k-rom68k
860852 os=-msdos
861853 ;;
862854 ms1-*)
863 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
855 basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
864856 ;;
865857 msys)
866858 basic_machine=i686-pc
902894 basic_machine=v70-nec
903895 os=-sysv
904896 ;;
905 next | m*-next )
897 next | m*-next)
906898 basic_machine=m68k-next
907899 case $os in
908900 -nextstep* )
947939 nsr-tandem)
948940 basic_machine=nsr-tandem
949941 ;;
942 nsv-tandem)
943 basic_machine=nsv-tandem
944 ;;
945 nsx-tandem)
946 basic_machine=nsx-tandem
947 ;;
950948 op50n-* | op60c-*)
951949 basic_machine=hppa1.1-oki
952950 os=-proelf
979977 os=-linux
980978 ;;
981979 parisc-*)
982 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
980 basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
983981 os=-linux
984982 ;;
985983 pbd)
995993 basic_machine=i386-pc
996994 ;;
997995 pc98-*)
998 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
996 basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
999997 ;;
1000998 pentium | p5 | k5 | k6 | nexgen | viac3)
1001999 basic_machine=i586-pc
10101008 basic_machine=i786-pc
10111009 ;;
10121010 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1013 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
1011 basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10141012 ;;
10151013 pentiumpro-* | p6-* | 6x86-* | athlon-*)
1016 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1014 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10171015 ;;
10181016 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1019 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1017 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10201018 ;;
10211019 pentium4-*)
1022 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
1020 basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10231021 ;;
10241022 pn)
10251023 basic_machine=pn-gould
10291027 ppc | ppcbe) basic_machine=powerpc-unknown
10301028 ;;
10311029 ppc-* | ppcbe-*)
1032 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1030 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10331031 ;;
10341032 ppcle | powerpclittle)
10351033 basic_machine=powerpcle-unknown
10361034 ;;
10371035 ppcle-* | powerpclittle-*)
1038 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1036 basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10391037 ;;
10401038 ppc64) basic_machine=powerpc64-unknown
10411039 ;;
1042 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1040 ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10431041 ;;
10441042 ppc64le | powerpc64little)
10451043 basic_machine=powerpc64le-unknown
10461044 ;;
10471045 ppc64le-* | powerpc64little-*)
1048 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1046 basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10491047 ;;
10501048 ps2)
10511049 basic_machine=i386-ibm
10991097 sequent)
11001098 basic_machine=i386-sequent
11011099 ;;
1102 sh)
1103 basic_machine=sh-hitachi
1104 os=-hms
1105 ;;
11061100 sh5el)
11071101 basic_machine=sh5le-unknown
11081102 ;;
1109 sh64)
1110 basic_machine=sh64-unknown
1111 ;;
1112 sparclite-wrs | simso-wrs)
1103 simso-wrs)
11131104 basic_machine=sparclite-wrs
11141105 os=-vxworks
11151106 ;;
11281119 os=-sysv4
11291120 ;;
11301121 strongarm-* | thumb-*)
1131 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1122 basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
11321123 ;;
11331124 sun2)
11341125 basic_machine=m68000-sun
12501241 basic_machine=hppa1.1-winbond
12511242 os=-proelf
12521243 ;;
1244 x64)
1245 basic_machine=x86_64-pc
1246 ;;
12531247 xbox)
12541248 basic_machine=i686-pc
12551249 os=-mingw32
12581252 basic_machine=xps100-honeywell
12591253 ;;
12601254 xscale-* | xscalee[bl]-*)
1261 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1255 basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
12621256 ;;
12631257 ymp)
12641258 basic_machine=ymp-cray
12651259 os=-unicos
1266 ;;
1267 z8k-*-coff)
1268 basic_machine=z8k-unknown
1269 os=-sim
1270 ;;
1271 z80-*-coff)
1272 basic_machine=z80-unknown
1273 os=-sim
12741260 ;;
12751261 none)
12761262 basic_machine=none-none
13001286 vax)
13011287 basic_machine=vax-dec
13021288 ;;
1303 pdp10)
1304 # there are many clones, so DEC is not a safe bet
1305 basic_machine=pdp10-unknown
1306 ;;
13071289 pdp11)
13081290 basic_machine=pdp11-dec
13091291 ;;
13131295 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
13141296 basic_machine=sh-unknown
13151297 ;;
1316 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1317 basic_machine=sparc-sun
1318 ;;
13191298 cydra)
13201299 basic_machine=cydra-cydrome
13211300 ;;
13351314 # Make sure to match an already-canonicalized machine name.
13361315 ;;
13371316 *)
1338 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1317 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
13391318 exit 1
13401319 ;;
13411320 esac
13431322 # Here we canonicalize certain aliases for manufacturers.
13441323 case $basic_machine in
13451324 *-digital*)
1346 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1325 basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
13471326 ;;
13481327 *-commodore*)
1349 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1328 basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
13501329 ;;
13511330 *)
13521331 ;;
13571336 if [ x"$os" != x"" ]
13581337 then
13591338 case $os in
1360 # First match some system type aliases
1361 # that might get confused with valid system types.
1339 # First match some system type aliases that might get confused
1340 # with valid system types.
13621341 # -solaris* is a basic system type, with this one exception.
13631342 -auroraux)
13641343 os=-auroraux
13691348 -solaris)
13701349 os=-solaris2
13711350 ;;
1372 -svr4*)
1373 os=-sysv4
1374 ;;
13751351 -unixware*)
13761352 os=-sysv4.2uw
13771353 ;;
13781354 -gnu/linux*)
13791355 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
13801356 ;;
1381 # First accept the basic system types.
1357 # es1800 is here to avoid being matched by es* (a different OS)
1358 -es1800*)
1359 os=-ose
1360 ;;
1361 # Now accept the basic system types.
13821362 # The portable systems comes first.
1383 # Each alternative MUST END IN A *, to match a version number.
1363 # Each alternative MUST end in a * to match a version number.
13841364 # -sysv* is not here because it comes later, after sysvr4.
13851365 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
13861366 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
13901370 | -aos* | -aros* | -cloudabi* | -sortix* \
13911371 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
13921372 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1393 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1373 | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
13941374 | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
13951375 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
13961376 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
13971377 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
13981378 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1399 | -chorusos* | -chorusrdb* | -cegcc* \
1379 | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
14001380 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
14011381 | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
14021382 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
14031383 | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1404 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1384 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
14051385 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
14061386 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
14071387 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1408 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1388 | -morphos* | -superux* | -rtmk* | -windiss* \
14091389 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
14101390 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
1411 | -onefs* | -tirtos* | -phoenix* | -fuchsia*)
1391 | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
1392 | -midnightbsd*)
14121393 # Remember, each alternative MUST END IN *, to match a version number.
14131394 ;;
14141395 -qnx*)
14251406 -nto*)
14261407 os=`echo $os | sed -e 's|nto|nto-qnx|'`
14271408 ;;
1428 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1429 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1409 -sim | -xray | -os68k* | -v88r* \
1410 | -windows* | -osx | -abug | -netware* | -os9* \
14301411 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
14311412 ;;
14321413 -mac*)
1433 os=`echo $os | sed -e 's|mac|macos|'`
1414 os=`echo "$os" | sed -e 's|mac|macos|'`
14341415 ;;
14351416 -linux-dietlibc)
14361417 os=-linux-dietlibc
14391420 os=`echo $os | sed -e 's|linux|linux-gnu|'`
14401421 ;;
14411422 -sunos5*)
1442 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1423 os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
14431424 ;;
14441425 -sunos6*)
1445 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1426 os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
14461427 ;;
14471428 -opened*)
14481429 os=-openedition
14531434 -wince*)
14541435 os=-wince
14551436 ;;
1456 -osfrose*)
1457 os=-osfrose
1458 ;;
1459 -osf*)
1460 os=-osf
1461 ;;
14621437 -utek*)
14631438 os=-bsd
14641439 ;;
14831458 -nova*)
14841459 os=-rtmk-nova
14851460 ;;
1486 -ns2 )
1461 -ns2)
14871462 os=-nextstep2
14881463 ;;
14891464 -nsk*)
15051480 -oss*)
15061481 os=-sysv3
15071482 ;;
1508 -svr4)
1483 -svr4*)
15091484 os=-sysv4
15101485 ;;
15111486 -svr3)
15201495 -ose*)
15211496 os=-ose
15221497 ;;
1523 -es1800*)
1524 os=-ose
1525 ;;
1526 -xenix)
1527 os=-xenix
1528 ;;
15291498 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
15301499 os=-mint
15311500 ;;
1532 -aros*)
1533 os=-aros
1534 ;;
15351501 -zvmoe)
15361502 os=-zvmoe
15371503 ;;
15381504 -dicos*)
15391505 os=-dicos
1506 ;;
1507 -pikeos*)
1508 # Until real need of OS specific support for
1509 # particular features comes up, bare metal
1510 # configurations are quite functional.
1511 case $basic_machine in
1512 arm*)
1513 os=-eabi
1514 ;;
1515 *)
1516 os=-elf
1517 ;;
1518 esac
15401519 ;;
15411520 -nacl*)
15421521 ;;
15471526 *)
15481527 # Get rid of the `-' at the beginning of $os.
15491528 os=`echo $os | sed 's/[^-]*-//'`
1550 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1529 echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
15511530 exit 1
15521531 ;;
15531532 esac
16371616 sparc-* | *-sun)
16381617 os=-sunos4.1.1
16391618 ;;
1619 pru-*)
1620 os=-elf
1621 ;;
16401622 *-be)
16411623 os=-beos
16421624 ;;
1643 *-haiku)
1644 os=-haiku
1645 ;;
16461625 *-ibm)
16471626 os=-aix
16481627 ;;
16821661 m88k-omron*)
16831662 os=-luna
16841663 ;;
1685 *-next )
1664 *-next)
16861665 os=-nextstep
16871666 ;;
16881667 *-sequent)
16961675 ;;
16971676 i370-*)
16981677 os=-mvs
1699 ;;
1700 *-next)
1701 os=-nextstep3
17021678 ;;
17031679 *-gould)
17041680 os=-sysv
18091785 vendor=stratus
18101786 ;;
18111787 esac
1812 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1788 basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
18131789 ;;
18141790 esac
18151791
1816 echo $basic_machine$os
1792 echo "$basic_machine$os"
18171793 exit
18181794
18191795 # Local variables:
1820 # eval: (add-hook 'write-file-hooks 'time-stamp)
1796 # eval: (add-hook 'write-file-functions 'time-stamp)
18211797 # time-stamp-start: "timestamp='"
18221798 # time-stamp-format: "%:y-%02m-%02d"
18231799 # time-stamp-end: "'"
00 #! /bin/sh
11 # depcomp - compile a program generating dependencies as side-effects
22
3 scriptversion=2013-05-30.07; # UTC
4
5 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
3 scriptversion=2018-03-07.03; # UTC
4
5 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
66
77 # This program is free software; you can redistribute it and/or modify
88 # it under the terms of the GNU General Public License as published by
1515 # GNU General Public License for more details.
1616
1717 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # along with this program. If not, see <https://www.gnu.org/licenses/>.
1919
2020 # As a special exception to the GNU General Public License, if you
2121 # distribute this file as part of a program that contains a
782782 # Local Variables:
783783 # mode: shell-script
784784 # sh-indentation: 2
785 # eval: (add-hook 'write-file-hooks 'time-stamp)
785 # eval: (add-hook 'before-save-hook 'time-stamp)
786786 # time-stamp-start: "scriptversion="
787787 # time-stamp-format: "%:y-%02m-%02d.%02H"
788 # time-stamp-time-zone: "UTC"
788 # time-stamp-time-zone: "UTC0"
789789 # time-stamp-end: "; # UTC"
790790 # End:
00 #!/bin/sh
11 # install - install a program, script, or datafile
22
3 scriptversion=2014-09-12.12; # UTC
3 scriptversion=2018-03-11.20; # UTC
44
55 # This originates from X11R5 (mit/util/scripts/install.sh), which was
66 # later released in X11R6 (xc/config/util/install.sh) with the
270270 fi
271271 dst=$dst_arg
272272
273 # If destination is a directory, append the input filename; won't work
274 # if double slashes aren't ignored.
273 # If destination is a directory, append the input filename.
275274 if test -d "$dst"; then
276275 if test "$is_target_a_directory" = never; then
277276 echo "$0: $dst_arg: Is a directory" >&2
278277 exit 1
279278 fi
280279 dstdir=$dst
281 dst=$dstdir/`basename "$src"`
280 dstbase=`basename "$src"`
281 case $dst in
282 */) dst=$dst$dstbase;;
283 *) dst=$dst/$dstbase;;
284 esac
282285 dstdir_status=0
283286 else
284287 dstdir=`dirname "$dst"`
286289 dstdir_status=$?
287290 fi
288291 fi
292
293 case $dstdir in
294 */) dstdirslash=$dstdir;;
295 *) dstdirslash=$dstdir/;;
296 esac
289297
290298 obsolete_mkdir_used=false
291299
323331 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
324332 ;;
325333 *)
326 # $RANDOM is not portable (e.g. dash); use it when possible to
327 # lower collision chance
334 # Note that $RANDOM variable is not portable (e.g. dash); Use it
335 # here however when possible just to lower collision chance.
328336 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
337
329338 trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
330339
331 # As "mkdir -p" follows symlinks and we work in /tmp possibly; so
332 # create the $tmpdir first (and fail if unsuccessful) to make sure
333 # that nobody tries to guess the $tmpdir name.
340 # Because "mkdir -p" follows existing symlinks and we likely work
341 # directly in world-writeable /tmp, make sure that the '$tmpdir'
342 # directory is successfully created first before we actually test
343 # 'mkdir -p' feature.
334344 if (umask $mkdir_umask &&
335345 $mkdirprog $mkdir_mode "$tmpdir" &&
336346 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
433443 else
434444
435445 # Make a couple of temp file names in the proper directory.
436 dsttmp=$dstdir/_inst.$$_
437 rmtmp=$dstdir/_rm.$$_
446 dsttmp=${dstdirslash}_inst.$$_
447 rmtmp=${dstdirslash}_rm.$$_
438448
439449 # Trap to clean up those temp files at exit.
440450 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
499509 done
500510
501511 # Local variables:
502 # eval: (add-hook 'write-file-hooks 'time-stamp)
512 # eval: (add-hook 'before-save-hook 'time-stamp)
503513 # time-stamp-start: "scriptversion="
504514 # time-stamp-format: "%:y-%02m-%02d.%02H"
505 # time-stamp-time-zone: "UTC"
515 # time-stamp-time-zone: "UTC0"
506516 # time-stamp-end: "; # UTC"
507517 # End:
3030
3131 PROGRAM=libtool
3232 PACKAGE=libtool
33 VERSION="2.4.6 Debian-2.4.6-2"
33 VERSION="2.4.6 Debian-2.4.6-9"
3434 package_revision=2.4.6
3535
3636
13691369 #! /bin/sh
13701370
13711371 # Set a version string for this script.
1372 scriptversion=2014-01-07.03; # UTC
1372 scriptversion=2015-10-07.11; # UTC
13731373
13741374 # A portable, pluggable option parser for Bourne shell.
13751375 # Written by Gary V. Vaughan, 2010
15291529 {
15301530 $debug_cmd
15311531
1532 _G_rc_run_hooks=false
1533
15321534 case " $hookable_fns " in
15331535 *" $1 "*) ;;
15341536 *) func_fatal_error "'$1' does not support hook funcions.n" ;;
15371539 eval _G_hook_fns=\$$1_hooks; shift
15381540
15391541 for _G_hook in $_G_hook_fns; do
1540 eval $_G_hook '"$@"'
1541
1542 # store returned options list back into positional
1543 # parameters for next 'cmd' execution.
1544 eval _G_hook_result=\$${_G_hook}_result
1545 eval set dummy "$_G_hook_result"; shift
1542 if eval $_G_hook '"$@"'; then
1543 # store returned options list back into positional
1544 # parameters for next 'cmd' execution.
1545 eval _G_hook_result=\$${_G_hook}_result
1546 eval set dummy "$_G_hook_result"; shift
1547 _G_rc_run_hooks=:
1548 fi
15461549 done
15471550
1548 func_quote_for_eval ${1+"$@"}
1549 func_run_hooks_result=$func_quote_for_eval_result
1551 $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
15501552 }
15511553
15521554
15561558 ## --------------- ##
15571559
15581560 # In order to add your own option parsing hooks, you must accept the
1559 # full positional parameter list in your hook function, remove any
1560 # options that you action, and then pass back the remaining unprocessed
1561 # full positional parameter list in your hook function, you may remove/edit
1562 # any options that you action, and then pass back the remaining unprocessed
15611563 # options in '<hooked_function_name>_result', escaped suitably for
1562 # 'eval'. Like this:
1564 # 'eval'. In this case you also must return $EXIT_SUCCESS to let the
1565 # hook's caller know that it should pay attention to
1566 # '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that
1567 # arguments are left untouched by the hook and therefore caller will ignore the
1568 # result variable.
1569 #
1570 # Like this:
15631571 #
15641572 # my_options_prep ()
15651573 # {
15691577 # usage_message=$usage_message'
15701578 # -s, --silent don'\''t print informational messages
15711579 # '
1572 #
1573 # func_quote_for_eval ${1+"$@"}
1574 # my_options_prep_result=$func_quote_for_eval_result
1580 # # No change in '$@' (ignored completely by this hook). There is
1581 # # no need to do the equivalent (but slower) action:
1582 # # func_quote_for_eval ${1+"$@"}
1583 # # my_options_prep_result=$func_quote_for_eval_result
1584 # false
15751585 # }
15761586 # func_add_hook func_options_prep my_options_prep
15771587 #
15801590 # {
15811591 # $debug_cmd
15821592 #
1593 # args_changed=false
1594 #
15831595 # # Note that for efficiency, we parse as many options as we can
15841596 # # recognise in a loop before passing the remainder back to the
15851597 # # caller on the first unrecognised argument we encounter.
15861598 # while test $# -gt 0; do
15871599 # opt=$1; shift
15881600 # case $opt in
1589 # --silent|-s) opt_silent=: ;;
1601 # --silent|-s) opt_silent=:
1602 # args_changed=:
1603 # ;;
15901604 # # Separate non-argument short options:
15911605 # -s*) func_split_short_opt "$_G_opt"
15921606 # set dummy "$func_split_short_opt_name" \
15931607 # "-$func_split_short_opt_arg" ${1+"$@"}
15941608 # shift
1609 # args_changed=:
15951610 # ;;
1596 # *) set dummy "$_G_opt" "$*"; shift; break ;;
1611 # *) # Make sure the first unrecognised option "$_G_opt"
1612 # # is added back to "$@", we could need that later
1613 # # if $args_changed is true.
1614 # set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
15971615 # esac
15981616 # done
15991617 #
1600 # func_quote_for_eval ${1+"$@"}
1601 # my_silent_option_result=$func_quote_for_eval_result
1618 # if $args_changed; then
1619 # func_quote_for_eval ${1+"$@"}
1620 # my_silent_option_result=$func_quote_for_eval_result
1621 # fi
1622 #
1623 # $args_changed
16021624 # }
16031625 # func_add_hook func_parse_options my_silent_option
16041626 #
16101632 # $opt_silent && $opt_verbose && func_fatal_help "\
16111633 # '--silent' and '--verbose' options are mutually exclusive."
16121634 #
1613 # func_quote_for_eval ${1+"$@"}
1614 # my_option_validation_result=$func_quote_for_eval_result
1635 # false
16151636 # }
16161637 # func_add_hook func_validate_options my_option_validation
16171638 #
1618 # You'll alse need to manually amend $usage_message to reflect the extra
1639 # You'll also need to manually amend $usage_message to reflect the extra
16191640 # options you parse. It's preferable to append if you can, so that
16201641 # multiple option parsing hooks can be added safely.
1642
1643
1644 # func_options_finish [ARG]...
1645 # ----------------------------
1646 # Finishing the option parse loop (call 'func_options' hooks ATM).
1647 func_options_finish ()
1648 {
1649 $debug_cmd
1650
1651 _G_func_options_finish_exit=false
1652 if func_run_hooks func_options ${1+"$@"}; then
1653 func_options_finish_result=$func_run_hooks_result
1654 _G_func_options_finish_exit=:
1655 fi
1656
1657 $_G_func_options_finish_exit
1658 }
16211659
16221660
16231661 # func_options [ARG]...
16291667 {
16301668 $debug_cmd
16311669
1632 func_options_prep ${1+"$@"}
1633 eval func_parse_options \
1634 ${func_options_prep_result+"$func_options_prep_result"}
1635 eval func_validate_options \
1636 ${func_parse_options_result+"$func_parse_options_result"}
1637
1638 eval func_run_hooks func_options \
1639 ${func_validate_options_result+"$func_validate_options_result"}
1640
1641 # save modified positional parameters for caller
1642 func_options_result=$func_run_hooks_result
1670 _G_rc_options=false
1671
1672 for my_func in options_prep parse_options validate_options options_finish
1673 do
1674 if eval func_$my_func '${1+"$@"}'; then
1675 eval _G_res_var='$'"func_${my_func}_result"
1676 eval set dummy "$_G_res_var" ; shift
1677 _G_rc_options=:
1678 fi
1679 done
1680
1681 # Save modified positional parameters for caller. As a top-level
1682 # options-parser function we always need to set the 'func_options_result'
1683 # variable (regardless the $_G_rc_options value).
1684 if $_G_rc_options; then
1685 func_options_result=$_G_res_var
1686 else
1687 func_quote_for_eval ${1+"$@"}
1688 func_options_result=$func_quote_for_eval_result
1689 fi
1690
1691 $_G_rc_options
16431692 }
16441693
16451694
16481697 # All initialisations required before starting the option parse loop.
16491698 # Note that when calling hook functions, we pass through the list of
16501699 # positional parameters. If a hook function modifies that list, and
1651 # needs to propogate that back to rest of this script, then the complete
1700 # needs to propagate that back to rest of this script, then the complete
16521701 # modified list must be put in 'func_run_hooks_result' before
1653 # returning.
1702 # returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
16541703 func_hookable func_options_prep
16551704 func_options_prep ()
16561705 {
16601709 opt_verbose=false
16611710 opt_warning_types=
16621711
1663 func_run_hooks func_options_prep ${1+"$@"}
1664
1665 # save modified positional parameters for caller
1666 func_options_prep_result=$func_run_hooks_result
1712 _G_rc_options_prep=false
1713 if func_run_hooks func_options_prep ${1+"$@"}; then
1714 _G_rc_options_prep=:
1715 # save modified positional parameters for caller
1716 func_options_prep_result=$func_run_hooks_result
1717 fi
1718
1719 $_G_rc_options_prep
16671720 }
16681721
16691722
16771730
16781731 func_parse_options_result=
16791732
1733 _G_rc_parse_options=false
16801734 # this just eases exit handling
16811735 while test $# -gt 0; do
16821736 # Defer to hook functions for initial option parsing, so they
16831737 # get priority in the event of reusing an option name.
1684 func_run_hooks func_parse_options ${1+"$@"}
1685
1686 # Adjust func_parse_options positional parameters to match
1687 eval set dummy "$func_run_hooks_result"; shift
1738 if func_run_hooks func_parse_options ${1+"$@"}; then
1739 eval set dummy "$func_run_hooks_result"; shift
1740 _G_rc_parse_options=:
1741 fi
16881742
16891743 # Break out of the loop if we already parsed every option.
16901744 test $# -gt 0 || break
16911745
1746 _G_match_parse_options=:
16921747 _G_opt=$1
16931748 shift
16941749 case $_G_opt in
17031758 ;;
17041759
17051760 --warnings|--warning|-W)
1706 test $# = 0 && func_missing_arg $_G_opt && break
1761 if test $# = 0 && func_missing_arg $_G_opt; then
1762 _G_rc_parse_options=:
1763 break
1764 fi
17071765 case " $warning_categories $1" in
17081766 *" $1 "*)
17091767 # trailing space prevents matching last $1 above
17561814 shift
17571815 ;;
17581816
1759 --) break ;;
1817 --) _G_rc_parse_options=: ; break ;;
17601818 -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
1761 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
1819 *) set dummy "$_G_opt" ${1+"$@"}; shift
1820 _G_match_parse_options=false
1821 break
1822 ;;
17621823 esac
1824
1825 $_G_match_parse_options && _G_rc_parse_options=:
17631826 done
17641827
1765 # save modified positional parameters for caller
1766 func_quote_for_eval ${1+"$@"}
1767 func_parse_options_result=$func_quote_for_eval_result
1828
1829 if $_G_rc_parse_options; then
1830 # save modified positional parameters for caller
1831 func_quote_for_eval ${1+"$@"}
1832 func_parse_options_result=$func_quote_for_eval_result
1833 fi
1834
1835 $_G_rc_parse_options
17681836 }
17691837
17701838
17771845 {
17781846 $debug_cmd
17791847
1848 _G_rc_validate_options=false
1849
17801850 # Display all warnings if -W was not given.
17811851 test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
17821852
1783 func_run_hooks func_validate_options ${1+"$@"}
1853 if func_run_hooks func_validate_options ${1+"$@"}; then
1854 # save modified positional parameters for caller
1855 func_validate_options_result=$func_run_hooks_result
1856 _G_rc_validate_options=:
1857 fi
17841858
17851859 # Bail if the options were screwed!
17861860 $exit_cmd $EXIT_FAILURE
17871861
1788 # save modified positional parameters for caller
1789 func_validate_options_result=$func_run_hooks_result
1862 $_G_rc_validate_options
17901863 }
17911864
17921865
20672140 compiler: $LTCC
20682141 compiler flags: $LTCFLAGS
20692142 linker: $LD (gnu? $with_gnu_ld)
2070 version: $progname $scriptversion Debian-2.4.6-2
2143 version: $progname $scriptversion Debian-2.4.6-9
20712144 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
20722145 autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
20732146
22692342 nonopt=
22702343 preserve_args=
22712344
2345 _G_rc_lt_options_prep=:
2346
22722347 # Shorthand for --mode=foo, only valid as the first argument
22732348 case $1 in
22742349 clean|clea|cle|cl)
22922367 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
22932368 shift; set dummy --mode uninstall ${1+"$@"}; shift
22942369 ;;
2370 *)
2371 _G_rc_lt_options_prep=false
2372 ;;
22952373 esac
22962374
2297 # Pass back the list of options.
2298 func_quote_for_eval ${1+"$@"}
2299 libtool_options_prep_result=$func_quote_for_eval_result
2375 if $_G_rc_lt_options_prep; then
2376 # Pass back the list of options.
2377 func_quote_for_eval ${1+"$@"}
2378 libtool_options_prep_result=$func_quote_for_eval_result
2379 fi
2380
2381 $_G_rc_lt_options_prep
23002382 }
23012383 func_add_hook func_options_prep libtool_options_prep
23022384
23082390 {
23092391 $debug_cmd
23102392
2393 _G_rc_lt_parse_options=false
2394
23112395 # Perform our own loop to consume as many options as possible in
23122396 # each iteration.
23132397 while test $# -gt 0; do
2398 _G_match_lt_parse_options=:
23142399 _G_opt=$1
23152400 shift
23162401 case $_G_opt in
23852470 func_append preserve_args " $_G_opt"
23862471 ;;
23872472
2388 # An option not handled by this hook function:
2389 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
2473 # An option not handled by this hook function:
2474 *) set dummy "$_G_opt" ${1+"$@"} ; shift
2475 _G_match_lt_parse_options=false
2476 break
2477 ;;
23902478 esac
2479 $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
23912480 done
23922481
2393
2394 # save modified positional parameters for caller
2395 func_quote_for_eval ${1+"$@"}
2396 libtool_parse_options_result=$func_quote_for_eval_result
2482 if $_G_rc_lt_parse_options; then
2483 # save modified positional parameters for caller
2484 func_quote_for_eval ${1+"$@"}
2485 libtool_parse_options_result=$func_quote_for_eval_result
2486 fi
2487
2488 $_G_rc_lt_parse_options
23972489 }
23982490 func_add_hook func_parse_options libtool_parse_options
23992491
72747366 # -specs=* GCC specs files
72757367 # -stdlib=* select c++ std lib with clang
72767368 # -fsanitize=* Clang/GCC memory and address sanitizer
7369 # -fuse-ld=* Linker select flags for GCC
72777370 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
72787371 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
72797372 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
7280 -specs=*|-fsanitize=*)
7373 -specs=*|-fsanitize=*|-fuse-ld=*)
72817374 func_quote_for_eval "$arg"
72827375 arg=$func_quote_for_eval_result
72837376 func_append compile_command " $arg"
00 #! /bin/sh
11 # Common wrapper for a few potentially missing GNU programs.
22
3 scriptversion=2013-10-28.13; # UTC
4
5 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
3 scriptversion=2018-03-07.03; # UTC
4
5 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
66 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
77
88 # This program is free software; you can redistribute it and/or modify
1616 # GNU General Public License for more details.
1717
1818 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # along with this program. If not, see <https://www.gnu.org/licenses/>.
2020
2121 # As a special exception to the GNU General Public License, if you
2222 # distribute this file as part of a program that contains a
100100 exit $st
101101 fi
102102
103 perl_URL=http://www.perl.org/
104 flex_URL=http://flex.sourceforge.net/
105 gnu_software_URL=http://www.gnu.org/software
103 perl_URL=https://www.perl.org/
104 flex_URL=https://github.com/westes/flex
105 gnu_software_URL=https://www.gnu.org/software
106106
107107 program_details ()
108108 {
206206 exit $st
207207
208208 # Local variables:
209 # eval: (add-hook 'write-file-hooks 'time-stamp)
209 # eval: (add-hook 'before-save-hook 'time-stamp)
210210 # time-stamp-start: "scriptversion="
211211 # time-stamp-format: "%:y-%02m-%02d.%02H"
212 # time-stamp-time-zone: "UTC"
212 # time-stamp-time-zone: "UTC0"
213213 # time-stamp-end: "; # UTC"
214214 # End:
00 #! /bin/sh
11 # test-driver - basic testsuite driver script.
22
3 scriptversion=2013-07-13.22; # UTC
3 scriptversion=2018-03-07.03; # UTC
44
5 # Copyright (C) 2011-2014 Free Software Foundation, Inc.
5 # Copyright (C) 2011-2018 Free Software Foundation, Inc.
66 #
77 # This program is free software; you can redistribute it and/or modify
88 # it under the terms of the GNU General Public License as published by
1515 # GNU General Public License for more details.
1616 #
1717 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # along with this program. If not, see <https://www.gnu.org/licenses/>.
1919
2020 # As a special exception to the GNU General Public License, if you
2121 # distribute this file as part of a program that contains a
139139 # Local Variables:
140140 # mode: shell-script
141141 # sh-indentation: 2
142 # eval: (add-hook 'write-file-hooks 'time-stamp)
142 # eval: (add-hook 'before-save-hook 'time-stamp)
143143 # time-stamp-start: "scriptversion="
144144 # time-stamp-format: "%:y-%02m-%02d.%02H"
145 # time-stamp-time-zone: "UTC"
145 # time-stamp-time-zone: "UTC0"
146146 # time-stamp-end: "; # UTC"
147147 # End:
0 #!/bin/sh
1 #! -*-perl-*-
2
3 # Update an FSF copyright year list to include the current year.
4
5 # Copyright (C) 2009-2020 Free Software Foundation, Inc.
6 #
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3, or (at your option)
10 # any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <https://www.gnu.org/licenses/>.
19 #
20 # Written by Jim Meyering and Joel E. Denny
21
22 # This script updates an FSF copyright year list to include the current year.
23 # Usage: update-copyright [FILE...]
24 #
25 # The arguments to this script should be names of files that contain
26 # copyright statements to be updated. The copyright holder's name
27 # defaults to "Free Software Foundation, Inc." but may be changed to
28 # any other name by using the "UPDATE_COPYRIGHT_HOLDER" environment
29 # variable.
30 #
31 # For example, you might wish to use the update-copyright target rule
32 # in maint.mk from gnulib's maintainer-makefile module.
33 #
34 # Iff a copyright statement is recognized in a file and the final
35 # year is not the current year, then the statement is updated for the
36 # new year and it is reformatted to:
37 #
38 # 1. Fit within 72 columns.
39 # 2. Convert 2-digit years to 4-digit years by prepending "19".
40 # 3. Expand copyright year intervals. (See "Environment variables"
41 # below.)
42 #
43 # A warning is printed for every file for which no copyright
44 # statement is recognized.
45 #
46 # Each file's copyright statement must be formatted correctly in
47 # order to be recognized. For example, each of these is fine:
48 #
49 # Copyright @copyright{} 1990-2005, 2007-2009 Free Software
50 # Foundation, Inc.
51 #
52 # # Copyright (C) 1990-2005, 2007-2009 Free Software
53 # # Foundation, Inc.
54 #
55 # /*
56 # * Copyright &copy; 90,2005,2007-2009
57 # * Free Software Foundation, Inc.
58 # */
59 #
60 # However, the following format is not recognized because the line
61 # prefix changes after the first line:
62 #
63 # ## Copyright (C) 1990-2005, 2007-2009 Free Software
64 # # Foundation, Inc.
65 #
66 # However, any correctly formatted copyright statement following
67 # a non-matching copyright statements would be recognized.
68 #
69 # The exact conditions that a file's copyright statement must meet
70 # to be recognized are:
71 #
72 # 1. It is the first copyright statement that meets all of the
73 # following conditions. Subsequent copyright statements are
74 # ignored.
75 # 2. Its format is "Copyright (C)", then a list of copyright years,
76 # and then the name of the copyright holder.
77 # 3. The "(C)" takes one of the following forms or is omitted
78 # entirely:
79 #
80 # A. (C)
81 # B. (c)
82 # C. @copyright{}
83 # D. &copy;
84 # E. ©
85 #
86 # 4. The "Copyright" appears at the beginning of a line, except that it
87 # may be prefixed by any sequence (e.g., a comment) of no more than
88 # 5 characters -- including white space.
89 # 5. Iff such a prefix is present, the same prefix appears at the
90 # beginning of each remaining line within the FSF copyright
91 # statement. There is one exception in order to support C-style
92 # comments: if the first line's prefix contains nothing but
93 # whitespace surrounding a "/*", then the prefix for all subsequent
94 # lines is the same as the first line's prefix except with each of
95 # "/" and possibly "*" replaced by a " ". The replacement of "*"
96 # by " " is consistent throughout all subsequent lines.
97 # 6. Blank lines, even if preceded by the prefix, do not appear
98 # within the FSF copyright statement.
99 # 7. Each copyright year is 2 or 4 digits, and years are separated by
100 # commas, "-", or "--". Whitespace may appear after commas.
101 #
102 # Environment variables:
103 #
104 # 1. If UPDATE_COPYRIGHT_FORCE=1, a recognized FSF copyright statement
105 # is reformatted even if it does not need updating for the new
106 # year. If unset or set to 0, only updated FSF copyright
107 # statements are reformatted.
108 # 2. If UPDATE_COPYRIGHT_USE_INTERVALS=1, every series of consecutive
109 # copyright years (such as 90, 1991, 1992-2007, 2008) in a
110 # reformatted FSF copyright statement is collapsed to a single
111 # interval (such as 1990-2008). If unset or set to 0, all existing
112 # copyright year intervals in a reformatted FSF copyright statement
113 # are expanded instead.
114 # If UPDATE_COPYRIGHT_USE_INTERVALS=2, convert a sequence with gaps
115 # to the minimal containing range. For example, convert
116 # 2000, 2004-2007, 2009 to 2000-2009.
117 # 3. For testing purposes, you can set the assumed current year in
118 # UPDATE_COPYRIGHT_YEAR.
119 # 4. The default maximum line length for a copyright line is 72.
120 # Set UPDATE_COPYRIGHT_MAX_LINE_LENGTH to use a different length.
121 # 5. Set UPDATE_COPYRIGHT_HOLDER if the copyright holder is other
122 # than "Free Software Foundation, Inc.".
123
124 # This is a prologue that allows to run a perl script as an executable
125 # on systems that are compliant to a POSIX version before POSIX:2017.
126 # On such systems, the usual invocation of an executable through execlp()
127 # or execvp() fails with ENOEXEC if it is a script that does not start
128 # with a #! line. The script interpreter mentioned in the #! line has
129 # to be /bin/sh, because on GuixSD systems that is the only program that
130 # has a fixed file name. The second line is essential for perl and is
131 # also useful for editing this file in Emacs. The next two lines below
132 # are valid code in both sh and perl. When executed by sh, they re-execute
133 # the script through the perl program found in $PATH. The '-x' option
134 # is essential as well; without it, perl would re-execute the script
135 # through /bin/sh. When executed by perl, the next two lines are a no-op.
136 eval 'exec perl -wSx -0777 -pi "$0" "$@"'
137 if 0;
138
139 my $VERSION = '2020-04-04.15:07'; # UTC
140 # The definition above must lie within the first 8 lines in order
141 # for the Emacs time-stamp write hook (at end) to update it.
142 # If you change this file with Emacs, please let the write hook
143 # do its job. Otherwise, update this string manually.
144
145 use strict;
146 use warnings;
147
148 my $copyright_re = 'Copyright';
149 my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|&copy;|©)';
150 my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER};
151 $holder ||= 'Free Software Foundation, Inc.';
152 my $prefix_max = 5;
153 my $margin = $ENV{UPDATE_COPYRIGHT_MAX_LINE_LENGTH};
154 !$margin || $margin !~ m/^\d+$/
155 and $margin = 72;
156
157 my $tab_width = 8;
158
159 my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
160 if (!$this_year || $this_year !~ m/^\d{4}$/)
161 {
162 my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ());
163 $this_year = $year + 1900;
164 }
165
166 # Unless the file consistently uses "\r\n" as the EOL, use "\n" instead.
167 my $eol = /(?:^|[^\r])\n/ ? "\n" : "\r\n";
168
169 my $leading;
170 my $prefix;
171 my $ws_re;
172 my $stmt_re;
173 while (/(^|\n)(.{0,$prefix_max})$copyright_re/g)
174 {
175 $leading = "$1$2";
176 $prefix = $2;
177 if ($prefix =~ /^(\s*\/)\*(\s*)$/)
178 {
179 $prefix =~ s,/, ,;
180 my $prefix_ws = $prefix;
181 $prefix_ws =~ s/\*/ /; # Only whitespace.
182 if (/\G(?:[^*\n]|\*[^\/\n])*\*?\n$prefix_ws/)
183 {
184 $prefix = $prefix_ws;
185 }
186 }
187 $ws_re = '[ \t\r\f]'; # \s without \n
188 $ws_re =
189 "(?:$ws_re*(?:$ws_re|\\n" . quotemeta($prefix) . ")$ws_re*)";
190 my $holder_re = $holder;
191 $holder_re =~ s/\s/$ws_re/g;
192 my $stmt_remainder_re =
193 "(?:$ws_re$circle_c_re)?"
194 . "$ws_re(?:(?:\\d\\d)?\\d\\d(?:,$ws_re?|--?))*"
195 . "((?:\\d\\d)?\\d\\d)$ws_re$holder_re";
196 if (/\G$stmt_remainder_re/)
197 {
198 $stmt_re =
199 quotemeta($leading) . "($copyright_re$stmt_remainder_re)";
200 last;
201 }
202 }
203 if (defined $stmt_re)
204 {
205 /$stmt_re/ or die; # Should never die.
206 my $stmt = $1;
207 my $final_year_orig = $2;
208
209 # Handle two-digit year numbers like "98" and "99".
210 my $final_year = $final_year_orig;
211 $final_year <= 99
212 and $final_year += 1900;
213
214 if ($final_year != $this_year)
215 {
216 # Update the year.
217 $stmt =~ s/\b$final_year_orig\b/$final_year, $this_year/;
218 }
219 if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'})
220 {
221 # Normalize all whitespace including newline-prefix sequences.
222 $stmt =~ s/$ws_re/ /g;
223
224 # Put spaces after commas.
225 $stmt =~ s/, ?/, /g;
226
227 # Convert 2-digit to 4-digit years.
228 $stmt =~ s/(\b\d\d\b)/19$1/g;
229
230 # Make the use of intervals consistent.
231 if (!$ENV{UPDATE_COPYRIGHT_USE_INTERVALS})
232 {
233 $stmt =~ s/(\d{4})--?(\d{4})/join(', ', $1..$2)/eg;
234 }
235 else
236 {
237 my $ndash = $ARGV =~ /\.tex(i(nfo)?)?$/ ? "--" : "-";
238
239 $stmt =~
240 s/
241 (\d{4})
242 (?:
243 (,\ |--?)
244 ((??{
245 if ($2 ne ', ') { '\d{4}'; }
246 elsif (!$3) { $1 + 1; }
247 else { $3 + 1; }
248 }))
249 )+
250 /$1$ndash$3/gx;
251
252 # When it's 2, emit a single range encompassing all year numbers.
253 $ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2
254 and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1$ndash$2/;
255 }
256
257 # Format within margin.
258 my $stmt_wrapped;
259 my $text_margin = $margin - length($prefix);
260 if ($prefix =~ /^(\t+)/)
261 {
262 $text_margin -= length($1) * ($tab_width - 1);
263 }
264 while (length $stmt)
265 {
266 if (($stmt =~ s/^(.{1,$text_margin})(?: |$)//)
267 || ($stmt =~ s/^([\S]+)(?: |$)//))
268 {
269 my $line = $1;
270 $stmt_wrapped .= $stmt_wrapped ? "$eol$prefix" : $leading;
271 $stmt_wrapped .= $line;
272 }
273 else
274 {
275 # Should be unreachable, but we don't want an infinite
276 # loop if it can be reached.
277 die;
278 }
279 }
280
281 # Replace the old copyright statement.
282 s/$stmt_re/$stmt_wrapped/;
283 }
284 }
285 else
286 {
287 print STDERR "$ARGV: warning: copyright statement not found\n";
288 }
289
290 # Hey Emacs!
291 # Local variables:
292 # coding: utf-8
293 # mode: perl
294 # indent-tabs-mode: nil
295 # eval: (add-hook 'before-save-hook 'time-stamp)
296 # time-stamp-line-limit: 200
297 # time-stamp-start: "my $VERSION = '"
298 # time-stamp-format: "%:y-%02m-%02d.%02H:%02M"
299 # time-stamp-time-zone: "UTC0"
300 # time-stamp-end: "'; # UTC"
301 # End:
0 eval '(exit $?0)' && eval 'exec perl -wST "$0" "$@"'
1 & eval 'exec perl -wST "$0" $argv:q'
2 if 0;
0 #!/bin/sh
1 #! -*-perl-*-
2
33 # Detect instances of "if (p) free (p);".
44 # Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces.
55
6 my $VERSION = '2018-03-07 03:47'; # UTC
6 # Copyright (C) 2008-2020 Free Software Foundation, Inc.
7 #
8 # This program is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <https://www.gnu.org/licenses/>.
20 #
21 # Written by Jim Meyering
22
23 # This is a prologue that allows to run a perl script as an executable
24 # on systems that are compliant to a POSIX version before POSIX:2017.
25 # On such systems, the usual invocation of an executable through execlp()
26 # or execvp() fails with ENOEXEC if it is a script that does not start
27 # with a #! line. The script interpreter mentioned in the #! line has
28 # to be /bin/sh, because on GuixSD systems that is the only program that
29 # has a fixed file name. The second line is essential for perl and is
30 # also useful for editing this file in Emacs. The next two lines below
31 # are valid code in both sh and perl. When executed by sh, they re-execute
32 # the script through the perl program found in $PATH. The '-x' option
33 # is essential as well; without it, perl would re-execute the script
34 # through /bin/sh. When executed by perl, the next two lines are a no-op.
35 eval 'exec perl -wSx "$0" "$@"'
36 if 0;
37
38 my $VERSION = '2020-04-04 15:07'; # UTC
739 # The definition above must lie within the first 8 lines in order
840 # for the Emacs time-stamp write hook (at end) to update it.
941 # If you change this file with Emacs, please let the write hook
1042 # do its job. Otherwise, update this string manually.
11
12 # Copyright (C) 2008-2018 Free Software Foundation, Inc.
13
14 # This program is free software: you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation, either version 3 of the License, or
17 # (at your option) any later version.
18
19 # This program is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
23
24 # You should have received a copy of the GNU General Public License
25 # along with this program. If not, see <https://www.gnu.org/licenses/>.
26
27 # Written by Jim Meyering
2843
2944 use strict;
3045 use warnings;
202217 ## mode: perl
203218 ## indent-tabs-mode: nil
204219 ## eval: (add-hook 'before-save-hook 'time-stamp)
220 ## time-stamp-line-limit: 50
205221 ## time-stamp-start: "my $VERSION = '"
206222 ## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
207223 ## time-stamp-time-zone: "UTC0"
33 # Print a version string.
44 scriptversion=2018-03-07.03; # UTC
55
6 # Copyright (C) 2006-2018 Free Software Foundation, Inc.
6 # Copyright (C) 2006-2020 Free Software Foundation, Inc.
77
88 # This program is free software: you can redistribute it and/or modify
99 # it under the terms of the GNU General Public License as published by
2424 # list the version-controlled files in that directory.
2525
2626 # If there's an argument, it must be a single, "."-relative directory name.
27 # cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/
27 # cvsu is part of the cvsutils package: https://www.red-bean.com/cvsutils/
2828
2929 postprocess=
3030 case $1 in
0 # Copyright (C) 2006-2018 Simon Josefsson.
0 # Copyright (C) 2006-2020 Simon Josefsson.
11 #
22 # This file is part of Libntlm.
33 #
102102
103103 /* Define to 1 if the system has the type `_Bool'. */
104104 #undef HAVE__BOOL
105
106 /* Define to 1 if the compiler supports the keyword '__inline'. */
107 #undef HAVE___INLINE
105108
106109 /* Define to the sub-directory where libtool stores uninstalled libraries. */
107110 #undef LT_OBJDIR
248251 #undef _NETBSD_SOURCE
249252
250253 /* The _Noreturn keyword of C11. */
251 #if ! (defined _Noreturn \
252 || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
253 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
254 || 0x5110 <= __SUNPRO_C)
254 #ifndef _Noreturn
255 # if (defined __cplusplus \
256 && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
257 || (defined _MSC_VER && 1900 <= _MSC_VER)) \
258 && 0)
259 /* [[noreturn]] is not practically usable, because with it the syntax
260 extern _Noreturn void func (...);
261 would not be valid; such a declaration would only be valid with 'extern'
262 and '_Noreturn' swapped, or without the 'extern' keyword. However, some
263 AIX system header files and several gnulib header files use precisely
264 this syntax with 'extern'. */
265 # define _Noreturn [[noreturn]]
266 # elif ((!defined __cplusplus || defined __clang__) \
267 && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
268 || 4 < __GNUC__ + (7 <= __GNUC_MINOR__) \
269 || (defined __apple_build_version__ \
270 ? 6000000 <= __apple_build_version__ \
271 : 3 < __clang_major__ + (5 <= __clang_minor__))))
272 /* _Noreturn works as-is. */
273 # elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
255274 # define _Noreturn __attribute__ ((__noreturn__))
256 # elif defined _MSC_VER && 1200 <= _MSC_VER
275 # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
257276 # define _Noreturn __declspec (noreturn)
258277 # else
259278 # define _Noreturn
276295
277296 /* Define to 1 if the system <stdint.h> predates C++11. */
278297 #undef __STDC_LIMIT_MACROS
298
299 /* The _GL_ASYNC_SAFE marker should be attached to functions that are
300 signal handlers (for signals other than SIGABRT, SIGPIPE) or can be
301 invoked from such signal handlers. Such functions have some restrictions:
302 * All functions that it calls should be marked _GL_ASYNC_SAFE as well,
303 or should be listed as async-signal-safe in POSIX
304 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04>
305 section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in
306 particular, are NOT async-signal-safe.
307 * All memory locations (variables and struct fields) that these functions
308 access must be marked 'volatile'. This holds for both read and write
309 accesses. Otherwise the compiler might optimize away stores to and
310 reads from such locations that occur in the program, depending on its
311 data flow analysis. For example, when the program contains a loop
312 that is intended to inspect a variable set from within a signal handler
313 while (!signal_occurred)
314 ;
315 the compiler is allowed to transform this into an endless loop if the
316 variable 'signal_occurred' is not declared 'volatile'.
317 Additionally, recall that:
318 * A signal handler should not modify errno (except if it is a handler
319 for a fatal signal and ends by raising the same signal again, thus
320 provoking the termination of the process). If it invokes a function
321 that may clobber errno, it needs to save and restore the value of
322 errno. */
323 #define _GL_ASYNC_SAFE
324
279325
280326 /* Rename to public API name. */
281327 #undef check_version
304350 https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
305351
306352 DragonFly; see
307 http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
353 http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log
308354
309355 FreeBSD; see:
310356 https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
410456 nothing if this is not supported. Do not define if restrict is
411457 supported directly. */
412458 #undef restrict
413 /* Work around a bug in Sun C++: it does not support _Restrict or
414 __restrict__, even though the corresponding Sun C compiler ends up with
415 "#define restrict _Restrict" or "#define restrict __restrict__" in the
416 previous line. Perhaps some future version of Sun C++ will work with
417 restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
418 #if defined __SUNPRO_CC && !defined __RESTRICT
459 /* Work around a bug in older versions of Sun C++, which did not
460 #define __restrict__ or support _Restrict or __restrict__
461 even though the corresponding Sun C compiler ended up with
462 "#define restrict _Restrict" or "#define restrict __restrict__"
463 in the previous line. This workaround can be removed once
464 we assume Oracle Developer Studio 12.5 (2016) or later. */
465 #if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__
419466 # define _Restrict
420467 # define __restrict__
421468 #endif
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for libntlm 1.5.
2 # Generated by GNU Autoconf 2.69 for libntlm 1.6.
33 #
44 # Report bugs to <libntlm@nongnu.org>.
55 #
589589 # Identity of this package.
590590 PACKAGE_NAME='libntlm'
591591 PACKAGE_TARNAME='libntlm'
592 PACKAGE_VERSION='1.5'
593 PACKAGE_STRING='libntlm 1.5'
592 PACKAGE_VERSION='1.6'
593 PACKAGE_STRING='libntlm 1.6'
594594 PACKAGE_BUGREPORT='libntlm@nongnu.org'
595595 PACKAGE_URL=''
596596
648648 HAVE_FEATURES_H
649649 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
650650 NEXT_WCHAR_H
651 REPLACE_WCSTOK
651652 REPLACE_WCSFTIME
652653 REPLACE_WCSWIDTH
653654 REPLACE_WCWIDTH
803804 REPLACE_DUP
804805 REPLACE_CLOSE
805806 REPLACE_CHOWN
807 REPLACE_ACCESS
806808 HAVE_SYS_PARAM_H
807809 HAVE_OS_H
808810 HAVE_DECL_TTYNAME_R
847849 HAVE_EUIDACCESS
848850 HAVE_DUP3
849851 HAVE_DUP2
852 HAVE_COPY_FILE_RANGE
850853 HAVE_CHOWN
851854 GNULIB_WRITE
852855 GNULIB_USLEEP
877880 GNULIB_GETUSERSHELL
878881 GNULIB_GETPASS
879882 GNULIB_GETPAGESIZE
883 GNULIB_GETOPT_POSIX
880884 GNULIB_GETLOGIN_R
881885 GNULIB_GETLOGIN
882886 GNULIB_GETHOSTNAME
895899 GNULIB_DUP3
896900 GNULIB_DUP2
897901 GNULIB_DUP
902 GNULIB_COPY_FILE_RANGE
898903 GNULIB_CLOSE
899904 GNULIB_CHOWN
900905 GNULIB_CHDIR
906 GNULIB_ACCESS
901907 WINDOWS_STAT_INODES
902908 WINDOWS_64_BIT_OFF_T
903909 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
10041010 HAVE_SYS_TYPES_H
10051011 HAVE_INTTYPES_H
10061012 HAVE_WCHAR_H
1007 HAVE_UNSIGNED_LONG_LONG_INT
1008 HAVE_LONG_LONG_INT
10091013 GNULIB_OVERRIDES_WINT_T
10101014 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
10111015 NEXT_STDDEF_H
10771081 AMDEPBACKSLASH
10781082 AMDEP_FALSE
10791083 AMDEP_TRUE
1080 am__quote
10811084 am__include
10821085 DEPDIR
10831086 OBJEXT
11551158 PACKAGE_TARNAME
11561159 PACKAGE_NAME
11571160 PATH_SEPARATOR
1158 SHELL'
1161 SHELL
1162 am__quote'
11591163 ac_subst_files=''
11601164 ac_user_opts='
11611165 enable_option_checking
11691173 with_gnu_ld
11701174 with_sysroot
11711175 enable_libtool_lock
1176 enable_cross_guesses
11721177 enable_valgrind_tests
11731178 '
11741179 ac_precious_vars='build_alias
17311736 # Omit some internal or obsolete options to make the list less imposing.
17321737 # This message is too long to be a string in the A/UX 3.1 sh.
17331738 cat <<_ACEOF
1734 \`configure' configures libntlm 1.5 to adapt to many kinds of systems.
1739 \`configure' configures libntlm 1.6 to adapt to many kinds of systems.
17351740
17361741 Usage: $0 [OPTION]... [VAR=VALUE]...
17371742
18021807
18031808 if test -n "$ac_init_help"; then
18041809 case $ac_init_help in
1805 short | recursive ) echo "Configuration of libntlm 1.5:";;
1810 short | recursive ) echo "Configuration of libntlm 1.6:";;
18061811 esac
18071812 cat <<\_ACEOF
18081813
18211826 --enable-fast-install[=PKGS]
18221827 optimize for fast installation [default=yes]
18231828 --disable-libtool-lock avoid locking (might break parallel builds)
1829 --enable-cross-guesses={conservative|risky}
1830 specify policy for cross-compilation guesses
18241831 --disable-valgrind-tests
18251832 don't try to run self tests under valgrind
18261833
19141921 test -n "$ac_init_help" && exit $ac_status
19151922 if $ac_init_version; then
19161923 cat <<\_ACEOF
1917 libntlm configure 1.5
1924 libntlm configure 1.6
19181925 generated by GNU Autoconf 2.69
19191926
19201927 Copyright (C) 2012 Free Software Foundation, Inc.
25202527 This file contains any messages produced by compilers while
25212528 running configure, to aid debugging if configure makes a mistake.
25222529
2523 It was created by libntlm $as_me 1.5, which was
2530 It was created by libntlm $as_me 1.6, which was
25242531 generated by GNU Autoconf 2.69. Invocation command line was
25252532
25262533 $ $0 $@
29132920
29142921 LT_AGE=0
29152922
2916 LT_REVISION=20
2917
2918
2919 am__api_version='1.15'
2923 LT_REVISION=21
2924
2925
2926 am__api_version='1.16'
29202927
29212928 # Find a good install program. We prefer a C program (faster),
29222929 # so one script is as good as another. But avoid the broken or
34023409
34033410 # Define the identity of the package.
34043411 PACKAGE='libntlm'
3405 VERSION='1.5'
3412 VERSION='1.6'
34063413
34073414
34083415 cat >>confdefs.h <<_ACEOF
34323439
34333440 # For better backward compatibility. To be removed once Automake 1.9.x
34343441 # dies out for good. For more background, see:
3435 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3436 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3442 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3443 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
34373444 mkdir_p='$(MKDIR_P)'
34383445
34393446 # We need awk for the "check" target (and possibly the TAP driver). The
34843491 Aborting the configuration process, to ensure you take notice of the issue.
34853492
34863493 You can download and install GNU coreutils to get an 'rm' implementation
3487 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3494 that behaves properly: <https://www.gnu.org/software/coreutils/>.
34883495
34893496 If you want to complete the configuration process using your problematic
34903497 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
43474354 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43484355 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43494356
4357
4358
4359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
4360 $as_echo_n "checking whether the compiler is clang... " >&6; }
4361 if ${gl_cv_compiler_clang+:} false; then :
4362 $as_echo_n "(cached) " >&6
4363 else
4364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4365 /* end confdefs.h. */
4366
4367 #ifdef __clang__
4368 barfbarf
4369 #endif
4370
4371 int
4372 main ()
4373 {
4374
4375 ;
4376 return 0;
4377 }
4378
4379 _ACEOF
4380 if ac_fn_c_try_compile "$LINENO"; then :
4381 gl_cv_compiler_clang=no
4382 else
4383 gl_cv_compiler_clang=yes
4384 fi
4385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4386
4387 fi
4388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
4389 $as_echo "$gl_cv_compiler_clang" >&6; }
4390
4391
4392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
4393 $as_echo_n "checking for compiler option needed when checking for declarations... " >&6; }
4394 if ${gl_cv_compiler_check_decl_option+:} false; then :
4395 $as_echo_n "(cached) " >&6
4396 else
4397 if test $gl_cv_compiler_clang = yes; then
4398 save_ac_compile="$ac_compile"
4399 ac_compile="$ac_compile -Werror=implicit-function-declaration"
4400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4401 /* end confdefs.h. */
4402
4403 int
4404 main ()
4405 {
4406
4407 ;
4408 return 0;
4409 }
4410 _ACEOF
4411 if ac_fn_c_try_compile "$LINENO"; then :
4412 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
4413 else
4414 gl_cv_compiler_check_decl_option=none
4415 fi
4416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4417 ac_compile="$save_ac_compile"
4418 else
4419 gl_cv_compiler_check_decl_option=none
4420 fi
4421
4422 fi
4423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
4424 $as_echo "$gl_cv_compiler_check_decl_option" >&6; }
4425 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
4426 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
4427 else
4428 ac_compile_for_check_decl="$ac_compile"
4429 fi
4430
43504431 DEPDIR="${am__leading_dot}deps"
43514432
43524433 ac_config_commands="$ac_config_commands depfiles"
43534434
4354
4355 am_make=${MAKE-make}
4356 cat > confinc << 'END'
4435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
4436 $as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
4437 cat > confinc.mk << 'END'
43574438 am__doit:
4358 @echo this is the am__doit target
4439 @echo this is the am__doit target >confinc.out
43594440 .PHONY: am__doit
43604441 END
4361 # If we don't find an include directive, just comment out the code.
4362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4363 $as_echo_n "checking for style of include used by $am_make... " >&6; }
43644442 am__include="#"
43654443 am__quote=
4366 _am_result=none
4367 # First try GNU make style include.
4368 echo "include confinc" > confmf
4369 # Ignore all kinds of additional output from 'make'.
4370 case `$am_make -s -f confmf 2> /dev/null` in #(
4371 *the\ am__doit\ target*)
4372 am__include=include
4373 am__quote=
4374 _am_result=GNU
4375 ;;
4444 # BSD make does it like this.
4445 echo '.include "confinc.mk" # ignored' > confmf.BSD
4446 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
4447 echo 'include confinc.mk # ignored' > confmf.GNU
4448 _am_result=no
4449 for s in GNU BSD; do
4450 { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
4451 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
4452 ac_status=$?
4453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4454 (exit $ac_status); }
4455 case $?:`cat confinc.out 2>/dev/null` in #(
4456 '0:this is the am__doit target') :
4457 case $s in #(
4458 BSD) :
4459 am__include='.include' am__quote='"' ;; #(
4460 *) :
4461 am__include='include' am__quote='' ;;
4462 esac ;; #(
4463 *) :
4464 ;;
43764465 esac
4377 # Now try BSD make style include.
4378 if test "$am__include" = "#"; then
4379 echo '.include "confinc"' > confmf
4380 case `$am_make -s -f confmf 2> /dev/null` in #(
4381 *the\ am__doit\ target*)
4382 am__include=.include
4383 am__quote="\""
4384 _am_result=BSD
4385 ;;
4386 esac
4387 fi
4388
4389
4390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4391 $as_echo "$_am_result" >&6; }
4392 rm -f confinc confmf
4466 if test "$am__include" != "#"; then
4467 _am_result="yes ($s style)"
4468 break
4469 fi
4470 done
4471 rm -f confinc.* confmf.*
4472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
4473 $as_echo "${_am_result}" >&6; }
43934474
43944475 # Check whether --enable-dependency-tracking was given.
43954476 if test "${enable_dependency_tracking+set}" = set; then :
56155696 # Code from module inttypes:
56165697 # Code from module inttypes-incomplete:
56175698 # Code from module inttypes-tests:
5699 # Code from module libc-config:
56185700 # Code from module limits-h:
56195701 # Code from module limits-h-tests:
56205702 # Code from module maintainer-makefile:
56425724 # Code from module test-framework-sh-tests:
56435725 # Code from module unistd:
56445726 # Code from module unistd-tests:
5727 # Code from module update-copyright:
5728 # Code from module update-copyright-tests:
56455729 # Code from module useless-if-before-free:
56465730 # Code from module valgrind-tests:
56475731 # Code from module vc-list-files:
80918175 test $ac_status = 0; }; then
80928176 # Now try to grab the symbols.
80938177 nlist=conftest.nm
8094 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8095 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8096 ac_status=$?
8097 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8098 test $ac_status = 0; } && test -s "$nlist"; then
8178 $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5
8179 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then
80998180 # Try sorting and uniquifying the output.
81008181 if sort "$nlist" | uniq > "$nlist"T; then
81018182 mv -f "$nlist"T "$nlist"
1396614047
1396714048
1396814049
14050
14051 # Check whether --enable-cross-guesses was given.
14052 if test "${enable_cross_guesses+set}" = set; then :
14053 enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
14054 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
14055 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
14056 enableval=conservative
14057 fi
14058 gl_cross_guesses="$enableval"
14059 else
14060 gl_cross_guesses=conservative
14061 fi
14062
14063 if test $gl_cross_guesses = risky; then
14064 gl_cross_guess_normal="guessing yes"
14065 gl_cross_guess_inverted="guessing no"
14066 else
14067 gl_cross_guess_normal="guessing no"
14068 gl_cross_guess_inverted="guessing yes"
14069 fi
1396914070 LIBC_FATAL_STDERR_=1
1397014071 export LIBC_FATAL_STDERR_
14072
14073
14074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14075 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14076 if ${ac_cv_c_restrict+:} false; then :
14077 $as_echo_n "(cached) " >&6
14078 else
14079 ac_cv_c_restrict=no
14080 # The order here caters to the fact that C++ does not require restrict.
14081 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14083 /* end confdefs.h. */
14084 typedef int *int_ptr;
14085 int foo (int_ptr $ac_kw ip) { return ip[0]; }
14086 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
14087 int bar (int ip[$ac_kw]) { return ip[0]; }
14088
14089 int
14090 main ()
14091 {
14092 int s[1];
14093 int *$ac_kw t = s;
14094 t[0] = 0;
14095 return foo (t) + bar (t);
14096
14097 ;
14098 return 0;
14099 }
14100 _ACEOF
14101 if ac_fn_c_try_compile "$LINENO"; then :
14102 ac_cv_c_restrict=$ac_kw
14103 fi
14104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14105 test "$ac_cv_c_restrict" != no && break
14106 done
14107
14108 fi
14109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14110 $as_echo "$ac_cv_c_restrict" >&6; }
14111
14112 case $ac_cv_c_restrict in
14113 restrict) ;;
14114 no) $as_echo "#define restrict /**/" >>confdefs.h
14115 ;;
14116 *) cat >>confdefs.h <<_ACEOF
14117 #define restrict $ac_cv_c_restrict
14118 _ACEOF
14119 ;;
14120 esac
1397114121
1397214122
1397314123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
1445314603
1445414604
1445514605
14456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
14457 $as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
14606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
14607 $as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
1445814608 if ${gl_cv_header_limits_width+:} false; then :
1445914609 $as_echo_n "(cached) " >&6
1446014610 else
1446114611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1446214612 /* end confdefs.h. */
1446314613 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
14464 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
14465 #endif
14466 #include <limits.h>
14467 int ullw = ULLONG_WIDTH;
14614 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
14615 #endif
14616 #include <limits.h>
14617 long long llm = LLONG_MAX;
14618 int wb = WORD_BIT;
14619 int ullw = ULLONG_WIDTH;
14620
1446814621 int
1446914622 main ()
1447014623 {
1476014913
1476114914
1476214915
14763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14764 $as_echo_n "checking for unsigned long long int... " >&6; }
14765 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14766 $as_echo_n "(cached) " >&6
14767 else
14768 ac_cv_type_unsigned_long_long_int=yes
14769 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14771 /* end confdefs.h. */
14772
14773 /* For now, do not test the preprocessor; as of 2007 there are too many
14774 implementations with broken preprocessors. Perhaps this can
14775 be revisited in 2012. In the meantime, code should not expect
14776 #if to work with literals wider than 32 bits. */
14777 /* Test literals. */
14778 long long int ll = 9223372036854775807ll;
14779 long long int nll = -9223372036854775807LL;
14780 unsigned long long int ull = 18446744073709551615ULL;
14781 /* Test constant expressions. */
14782 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14783 ? 1 : -1)];
14784 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14785 ? 1 : -1)];
14786 int i = 63;
14787 int
14788 main ()
14789 {
14790 /* Test availability of runtime routines for shift and division. */
14791 long long int llmax = 9223372036854775807ll;
14792 unsigned long long int ullmax = 18446744073709551615ull;
14793 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14794 | (llmax / ll) | (llmax % ll)
14795 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14796 | (ullmax / ull) | (ullmax % ull));
14797 ;
14798 return 0;
14799 }
14800
14801 _ACEOF
14802 if ac_fn_c_try_link "$LINENO"; then :
14803
14804 else
14805 ac_cv_type_unsigned_long_long_int=no
14806 fi
14807 rm -f core conftest.err conftest.$ac_objext \
14808 conftest$ac_exeext conftest.$ac_ext
14809 fi
14810 fi
14811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14812 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14813 if test $ac_cv_type_unsigned_long_long_int = yes; then
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14926
1481414927
1481514928 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14816
14817 fi
14818
14819
14820
14821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14822 $as_echo_n "checking for long long int... " >&6; }
14823 if ${ac_cv_type_long_long_int+:} false; then :
14824 $as_echo_n "(cached) " >&6
14825 else
14826 ac_cv_type_long_long_int=yes
14827 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14828 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14829 if test $ac_cv_type_long_long_int = yes; then
14830 if test "$cross_compiling" = yes; then :
14831 :
14832 else
14833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14834 /* end confdefs.h. */
14835 #include <limits.h>
14836 #ifndef LLONG_MAX
14837 # define HALF \
14838 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14839 # define LLONG_MAX (HALF - 1 + HALF)
14840 #endif
14841 int
14842 main ()
14843 {
14844 long long int n = 1;
14845 int i;
14846 for (i = 0; ; i++)
14847 {
14848 long long int m = n << i;
14849 if (m >> i != n)
14850 return 1;
14851 if (LLONG_MAX / 2 < m)
14852 break;
14853 }
14854 return 0;
14855 ;
14856 return 0;
14857 }
14858 _ACEOF
14859 if ac_fn_c_try_run "$LINENO"; then :
14860
14861 else
14862 ac_cv_type_long_long_int=no
14863 fi
14864 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14865 conftest.$ac_objext conftest.beam conftest.$ac_ext
14866 fi
14867
14868 fi
14869 fi
14870 fi
14871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14872 $as_echo "$ac_cv_type_long_long_int" >&6; }
14873 if test $ac_cv_type_long_long_int = yes; then
14874
14875 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14876
14877 fi
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889 if test $ac_cv_type_long_long_int = yes; then
14890 HAVE_LONG_LONG_INT=1
14891 else
14892 HAVE_LONG_LONG_INT=0
14893 fi
14894
14895
14896 if test $ac_cv_type_unsigned_long_long_int = yes; then
14897 HAVE_UNSIGNED_LONG_LONG_INT=1
14898 else
14899 HAVE_UNSIGNED_LONG_LONG_INT=0
14900 fi
1490114929
1490214930
1490314931
1574415772 GL_GENERATE_STDINT_H_FALSE=
1574515773 fi
1574615774
15747
15748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
15749 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
15750 if ${ac_cv_c_restrict+:} false; then :
15751 $as_echo_n "(cached) " >&6
15752 else
15753 ac_cv_c_restrict=no
15754 # The order here caters to the fact that C++ does not require restrict.
15755 for ac_kw in __restrict __restrict__ _Restrict restrict; do
15756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15757 /* end confdefs.h. */
15758 typedef int *int_ptr;
15759 int foo (int_ptr $ac_kw ip) { return ip[0]; }
15760 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
15761 int bar (int ip[$ac_kw]) { return ip[0]; }
15762
15763 int
15764 main ()
15765 {
15766 int s[1];
15767 int *$ac_kw t = s;
15768 t[0] = 0;
15769 return foo (t) + bar (t);
15770
15771 ;
15772 return 0;
15773 }
15774 _ACEOF
15775 if ac_fn_c_try_compile "$LINENO"; then :
15776 ac_cv_c_restrict=$ac_kw
15777 fi
15778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15779 test "$ac_cv_c_restrict" != no && break
15780 done
15781
15782 fi
15783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
15784 $as_echo "$ac_cv_c_restrict" >&6; }
15785
15786 case $ac_cv_c_restrict in
15787 restrict) ;;
15788 no) $as_echo "#define restrict /**/" >>confdefs.h
15789 ;;
15790 *) cat >>confdefs.h <<_ACEOF
15791 #define restrict $ac_cv_c_restrict
15792 _ACEOF
15793 ;;
15794 esac
1579515775
1579615776
1579715777 GNULIB_EXPLICIT_BZERO=0;
1588015860
1588115861
1588215862
15883
1588415863 if test $gl_cv_have_include_next = yes; then
1588515864 gl_cv_next_string_h='<'string.h'>'
1588615865 else
1595115930
1595215931
1595315932
15933
15934
1595415935 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
1595515936 if test "x$ac_cv_type_pid_t" = xyes; then :
1595615937
1606916050
1607016051
1607116052
16053 GNULIB_ACCESS=0;
1607216054 GNULIB_CHDIR=0;
1607316055 GNULIB_CHOWN=0;
1607416056 GNULIB_CLOSE=0;
16057 GNULIB_COPY_FILE_RANGE=0;
1607516058 GNULIB_DUP=0;
1607616059 GNULIB_DUP2=0;
1607716060 GNULIB_DUP3=0;
1609016073 GNULIB_GETHOSTNAME=0;
1609116074 GNULIB_GETLOGIN=0;
1609216075 GNULIB_GETLOGIN_R=0;
16076 GNULIB_GETOPT_POSIX=0;
1609316077 GNULIB_GETPAGESIZE=0;
1609416078 GNULIB_GETPASS=0;
1609516079 GNULIB_GETUSERSHELL=0;
1612016104 GNULIB_USLEEP=0;
1612116105 GNULIB_WRITE=0;
1612216106 HAVE_CHOWN=1;
16107 HAVE_COPY_FILE_RANGE=1;
1612316108 HAVE_DUP2=1;
1612416109 HAVE_DUP3=1;
1612516110 HAVE_EUIDACCESS=1;
1616416149 HAVE_DECL_TTYNAME_R=1;
1616516150 HAVE_OS_H=0;
1616616151 HAVE_SYS_PARAM_H=0;
16152 REPLACE_ACCESS=0;
1616716153 REPLACE_CHOWN=0;
1616816154 REPLACE_CLOSE=0;
1616916155 REPLACE_DUP=0;
1630416290 gl_next_as_first_directive=$gl_cv_next_inttypes_h
1630516291 fi
1630616292 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
16293
16294
1630716295
1630816296
1630916297
1646916457 REPLACE_WCWIDTH=0;
1647016458 REPLACE_WCSWIDTH=0;
1647116459 REPLACE_WCSFTIME=0;
16460 REPLACE_WCSTOK=0;
1647216461
1647316462
1647416463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
1659016579
1659116580
1659216581
16582
1659316583 gl_source_base='gl'
1659416584
1659516585 for ac_header in byteswap.h
1661816608 GL_GENERATE_BYTESWAP_H_TRUE='#'
1661916609 GL_GENERATE_BYTESWAP_H_FALSE=
1662016610 fi
16611
1662116612
1662216613
1662316614
1667216663 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
1667316664
1667416665 fi
16666
16667
16668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
16669 $as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
16670 if ${gl_cv_c___inline+:} false; then :
16671 $as_echo_n "(cached) " >&6
16672 else
16673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16674 /* end confdefs.h. */
16675 typedef int foo_t;
16676 static __inline foo_t foo (void) { return 0; }
16677 int
16678 main ()
16679 {
16680 return foo ();
16681 ;
16682 return 0;
16683 }
16684 _ACEOF
16685 if ac_fn_c_try_compile "$LINENO"; then :
16686 gl_cv_c___inline=yes
16687 else
16688 gl_cv_c___inline=no
16689 fi
16690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16691 fi
16692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
16693 $as_echo "$gl_cv_c___inline" >&6; }
16694 if test $gl_cv_c___inline = yes; then
16695
16696 $as_echo "#define HAVE___INLINE 1" >>confdefs.h
16697
16698 fi
16699
1667516700
1667616701
1667716702
1678516810
1678616811
1678716812
16788 # Define two additional variables used in the Makefile substitution.
16789
16790 if test "$ac_cv_header_stdbool_h" = yes; then
16791 STDBOOL_H=''
16813
16814 if test "$ac_cv_header_stdbool_h" = yes; then
16815 case "$host_os" in
16816 solaris*)
16817 if test -z "$GCC"; then
16818 STDBOOL_H='stdbool.h'
16819 else
16820 STDBOOL_H=''
16821 fi
16822 ;;
16823 *)
16824 STDBOOL_H=''
16825 ;;
16826 esac
1679216827 else
1679316828 STDBOOL_H='stdbool.h'
1679416829 fi
1681316848
1681416849
1681516850 STDDEF_H=
16816 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
16817
16818 "
16819 if test "x$ac_cv_type_max_align_t" = xyes; then :
16820
16821 else
16822 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
16823 fi
16851
16852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
16853 $as_echo_n "checking for good max_align_t... " >&6; }
16854 if ${gl_cv_type_max_align_t+:} false; then :
16855 $as_echo_n "(cached) " >&6
16856 else
16857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16858 /* end confdefs.h. */
16859 #include <stddef.h>
16860 unsigned int s = sizeof (max_align_t);
16861 #if defined __GNUC__ || defined __IBM__ALIGNOF__
16862 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
16863 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
16864 #endif
16865
16866 int
16867 main ()
16868 {
16869
16870 ;
16871 return 0;
16872 }
16873 _ACEOF
16874 if ac_fn_c_try_compile "$LINENO"; then :
16875 gl_cv_type_max_align_t=yes
16876 else
16877 gl_cv_type_max_align_t=no
16878 fi
16879 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16880
16881 fi
16882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
16883 $as_echo "$gl_cv_type_max_align_t" >&6; }
16884 if test $gl_cv_type_max_align_t = no; then
16885 HAVE_MAX_ALIGN_T=0
16886 STDDEF_H=stddef.h
16887 fi
1682416888
1682516889 if test $gt_cv_c_wchar_t = no; then
1682616890 HAVE_WCHAR_T=0
1682716891 STDDEF_H=stddef.h
1682816892 fi
16893
1682916894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
1683016895 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
1683116896 if ${gl_cv_decl_null_works+:} false; then :
1685716922 REPLACE_NULL=1
1685816923 STDDEF_H=stddef.h
1685916924 fi
16925
1686016926
1686116927 if test -n "$STDDEF_H"; then
1686216928 GL_GENERATE_STDDEF_H_TRUE=
1709217158
1709317159
1709417160
17161
17162
1709517163 # Check whether --enable-valgrind-tests was given.
1709617164 if test "${enable_valgrind_tests+set}" = set; then :
1709717165 enableval=$enable_valgrind_tests; opt_valgrind_tests=$enableval
1717817246
1717917247 gltests_libdeps=
1718017248 gltests_ltlibdeps=
17249
1718117250
1718217251
1718317252
1725117320
1725217321 #if defined INT32_MAX && defined INTMAX_MAX
1725317322 #define CONDITION (INT32_MAX < INTMAX_MAX)
17254 #elif HAVE_LONG_LONG_INT
17323 #else
1725517324 #define CONDITION (sizeof (int) < sizeof (long long int))
17256 #else
17257 #define CONDITION 0
1725817325 #endif
1725917326 int test[CONDITION ? 1 : -1];
1726017327 int
1730317370
1730417371 #if defined INT64_MAX
1730517372 #define CONDITION (INT64_MAX == LONG_MAX)
17306 #elif HAVE_LONG_LONG_INT
17373 #else
1730717374 #define CONDITION (sizeof (long long int) == sizeof (long int))
17308 #else
17309 #define CONDITION 0
1731017375 #endif
1731117376 int test[CONDITION ? 1 : -1];
1731217377 int
1735717422
1735817423 #if defined UINT32_MAX && defined UINTMAX_MAX
1735917424 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
17360 #elif HAVE_LONG_LONG_INT
17425 #else
1736117426 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
17362 #else
17363 #define CONDITION 0
1736417427 #endif
1736517428 int test[CONDITION ? 1 : -1];
1736617429 int
1740917472
1741017473 #if defined UINT64_MAX
1741117474 #define CONDITION (UINT64_MAX == ULONG_MAX)
17412 #elif HAVE_LONG_LONG_INT
17475 #else
1741317476 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
17414 #else
17415 #define CONDITION 0
1741617477 #endif
1741717478 int test[CONDITION ? 1 : -1];
1741817479 int
1744617507
1744717508
1744817509
17510
17511 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
1744917512
1745017513
1745117514 # Check whether --enable-valgrind-tests was given.
1763617699
1763717700
1763817701
17702
17703
1763917704 LIBTESTS_LIBDEPS="$gltests_libdeps"
1764017705
1764117706
1766417729
1766517730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
1766617731 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
17667 if ${gl_cv_cc_nomfi_supported+:} false; then :
17732 if ${gl_cv_cc_nomfi_supported+:} false; then :
1766817733 $as_echo_n "(cached) " >&6
1766917734 else
17670
17671 gl_save_CFLAGS="$CFLAGS"
17672 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
17673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17735 gl_save_CFLAGS="$CFLAGS"
17736 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
17737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1767417738 /* end confdefs.h. */
1767517739
1767617740 int
1768717751 gl_cv_cc_nomfi_supported=no
1768817752 fi
1768917753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17690 CFLAGS="$gl_save_CFLAGS"
17691 fi
17692
17693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
17754 CFLAGS="$gl_save_CFLAGS"
17755
17756 fi
17757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
1769417758 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
1769517759
1769617760 if test "$gl_cv_cc_nomfi_supported" = yes; then
1769717761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
1769817762 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
17699 if ${gl_cv_cc_nomfi_needed+:} false; then :
17763 if ${gl_cv_cc_nomfi_needed+:} false; then :
1770017764 $as_echo_n "(cached) " >&6
1770117765 else
17702
17703 gl_save_CFLAGS="$CFLAGS"
17704 CFLAGS="$CFLAGS -W -Werror"
17705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17766 gl_save_CFLAGS="$CFLAGS"
17767 CFLAGS="$CFLAGS -W -Werror"
17768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1770617769 /* end confdefs.h. */
1770717770 int f (void)
17708 {
17709 typedef struct { int a; int b; } s_t;
17710 s_t s1 = { 0, };
17711 return s1.b;
17712 }
17771 {
17772 typedef struct { int a; int b; } s_t;
17773 s_t s1 = { 0, };
17774 return s1.b;
17775 }
1771317776
1771417777 int
1771517778 main ()
1772517788 gl_cv_cc_nomfi_needed=yes
1772617789 fi
1772717790 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17728 CFLAGS="$gl_save_CFLAGS"
17729
17730 fi
17731
17732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
17791 CFLAGS="$gl_save_CFLAGS"
17792
17793 fi
17794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
1773317795 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
1773417796 fi
1773517797
1773617798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
1773717799 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
17738 if ${gl_cv_cc_uninitialized_supported+:} false; then :
17800 if ${gl_cv_cc_uninitialized_supported+:} false; then :
1773917801 $as_echo_n "(cached) " >&6
1774017802 else
17741
17742 gl_save_CFLAGS="$CFLAGS"
17743 CFLAGS="$CFLAGS -Werror -Wuninitialized"
17744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17803 gl_save_CFLAGS="$CFLAGS"
17804 CFLAGS="$CFLAGS -Werror -Wuninitialized"
17805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1774517806 /* end confdefs.h. */
1774617807
1774717808 int
1775817819 gl_cv_cc_uninitialized_supported=no
1775917820 fi
1776017821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17761 CFLAGS="$gl_save_CFLAGS"
17762 fi
17763
17764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
17822 CFLAGS="$gl_save_CFLAGS"
17823
17824 fi
17825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
1776517826 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
1776617827
1776717828 fi
1777717838 gl_manywarn_set=
1777817839 for gl_manywarn_item in -fno-common \
1777917840 -W \
17841 -Wabsolute-value \
1778017842 -Waddress \
17843 -Waddress-of-packed-member \
1778117844 -Waggressive-loop-optimizations \
1778217845 -Wall \
17783 -Wattribute-alias \
17846 -Wattribute-warning \
1778417847 -Wattributes \
1778517848 -Wbad-function-cast \
1778617849 -Wbool-compare \
1778717850 -Wbool-operation \
1778817851 -Wbuiltin-declaration-mismatch \
1778917852 -Wbuiltin-macro-redefined \
17853 -Wcannot-profile \
1779017854 -Wcast-align \
1779117855 -Wcast-align=strict \
1779217856 -Wcast-function-type \
1785117915 -Wmissing-field-initializers \
1785217916 -Wmissing-include-dirs \
1785317917 -Wmissing-parameter-type \
17918 -Wmissing-profile \
1785417919 -Wmissing-prototypes \
1785517920 -Wmultichar \
1785617921 -Wmultistatement-macros \
1796118026 $as_echo "$gl_alloc_max" >&6; }
1796218027 gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$gl_alloc_max"
1796318028 gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
18029 gl_manywarn_set="$gl_manywarn_set -Wattribute-alias=2"
1796418030 gl_manywarn_set="$gl_manywarn_set -Wformat-overflow=2"
1796518031 gl_manywarn_set="$gl_manywarn_set -Wformat-truncation=2"
1796618032 gl_manywarn_set="$gl_manywarn_set -Wimplicit-fallthrough=5"
1879018856 # report actual input values of CONFIG_FILES etc. instead of their
1879118857 # values after options handling.
1879218858 ac_log="
18793 This file was extended by libntlm $as_me 1.5, which was
18859 This file was extended by libntlm $as_me 1.6, which was
1879418860 generated by GNU Autoconf 2.69. Invocation command line was
1879518861
1879618862 CONFIG_FILES = $CONFIG_FILES
1886018926 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1886118927 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1886218928 ac_cs_version="\\
18863 libntlm config.status 1.5
18929 libntlm config.status 1.6
1886418930 configured by $0, generated by GNU Autoconf 2.69,
1886518931 with options \\"\$ac_cs_config\\"
1886618932
1897919045 #
1898019046 # INIT-COMMANDS
1898119047 #
18982 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
19048 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
1898319049
1898419050
1898519051 # The HP-UX ksh and POSIX shell print the target directory to stdout
1991619982 # Older Autoconf quotes --file arguments for eval, but not when files
1991719983 # are listed without --file. Let's play safe and only enable the eval
1991819984 # if we detect the quoting.
19919 case $CONFIG_FILES in
19920 *\'*) eval set x "$CONFIG_FILES" ;;
19921 *) set x $CONFIG_FILES ;;
19922 esac
19985 # TODO: see whether this extra hack can be removed once we start
19986 # requiring Autoconf 2.70 or later.
19987 case $CONFIG_FILES in #(
19988 *\'*) :
19989 eval set x "$CONFIG_FILES" ;; #(
19990 *) :
19991 set x $CONFIG_FILES ;; #(
19992 *) :
19993 ;;
19994 esac
1992319995 shift
19924 for mf
19996 # Used to flag and report bootstrapping failures.
19997 am_rc=0
19998 for am_mf
1992519999 do
1992620000 # Strip MF so we end up with the name of the file.
19927 mf=`echo "$mf" | sed -e 's/:.*$//'`
19928 # Check whether this is an Automake generated Makefile or not.
19929 # We used to match only the files named 'Makefile.in', but
19930 # some people rename them; so instead we look at the file content.
19931 # Grep'ing the first line is not enough: some people post-process
19932 # each Makefile.in and add a new line on top of each file to say so.
19933 # Grep'ing the whole file is not good either: AIX grep has a line
20001 am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
20002 # Check whether this is an Automake generated Makefile which includes
20003 # dependency-tracking related rules and includes.
20004 # Grep'ing the whole file directly is not great: AIX grep has a line
1993420005 # limit of 2048, but all sed's we know have understand at least 4000.
19935 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
19936 dirpart=`$as_dirname -- "$mf" ||
19937 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19938 X"$mf" : 'X\(//\)[^/]' \| \
19939 X"$mf" : 'X\(//\)$' \| \
19940 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
19941 $as_echo X"$mf" |
20006 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
20007 || continue
20008 am_dirpart=`$as_dirname -- "$am_mf" ||
20009 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20010 X"$am_mf" : 'X\(//\)[^/]' \| \
20011 X"$am_mf" : 'X\(//\)$' \| \
20012 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
20013 $as_echo X"$am_mf" |
1994220014 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1994320015 s//\1/
1994420016 q
1995620028 q
1995720029 }
1995820030 s/.*/./; q'`
19959 else
19960 continue
19961 fi
19962 # Extract the definition of DEPDIR, am__include, and am__quote
19963 # from the Makefile without running 'make'.
19964 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
19965 test -z "$DEPDIR" && continue
19966 am__include=`sed -n 's/^am__include = //p' < "$mf"`
19967 test -z "$am__include" && continue
19968 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
19969 # Find all dependency output files, they are included files with
19970 # $(DEPDIR) in their names. We invoke sed twice because it is the
19971 # simplest approach to changing $(DEPDIR) to its actual value in the
19972 # expansion.
19973 for file in `sed -n "
19974 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
19975 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
19976 # Make sure the directory exists.
19977 test -f "$dirpart/$file" && continue
19978 fdir=`$as_dirname -- "$file" ||
19979 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19980 X"$file" : 'X\(//\)[^/]' \| \
19981 X"$file" : 'X\(//\)$' \| \
19982 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
19983 $as_echo X"$file" |
19984 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20031 am_filepart=`$as_basename -- "$am_mf" ||
20032 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
20033 X"$am_mf" : 'X\(//\)$' \| \
20034 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
20035 $as_echo X/"$am_mf" |
20036 sed '/^.*\/\([^/][^/]*\)\/*$/{
1998520037 s//\1/
1998620038 q
1998720039 }
19988 /^X\(\/\/\)[^/].*/{
20040 /^X\/\(\/\/\)$/{
1998920041 s//\1/
1999020042 q
1999120043 }
19992 /^X\(\/\/\)$/{
19993 s//\1/
19994 q
19995 }
19996 /^X\(\/\).*/{
20044 /^X\/\(\/\).*/{
1999720045 s//\1/
1999820046 q
1999920047 }
2000020048 s/.*/./; q'`
20001 as_dir=$dirpart/$fdir; as_fn_mkdir_p
20002 # echo "creating $dirpart/$file"
20003 echo '# dummy' > "$dirpart/$file"
20004 done
20049 { echo "$as_me:$LINENO: cd "$am_dirpart" \
20050 && sed -e '/# am--include-marker/d' "$am_filepart" \
20051 | $MAKE -f - am--depfiles" >&5
20052 (cd "$am_dirpart" \
20053 && sed -e '/# am--include-marker/d' "$am_filepart" \
20054 | $MAKE -f - am--depfiles) >&5 2>&5
20055 ac_status=$?
20056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20057 (exit $ac_status); } || am_rc=$?
2000520058 done
20059 if test $am_rc -ne 0; then
20060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20061 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20062 as_fn_error $? "Something went wrong bootstrapping makefile fragments
20063 for automatic dependency tracking. Try re-running configure with the
20064 '--disable-dependency-tracking' option to at least be able to build
20065 the package (albeit without support for automatic dependency tracking).
20066 See \`config.log' for more details" "$LINENO" 5; }
20067 fi
20068 { am_dirpart=; unset am_dirpart;}
20069 { am_filepart=; unset am_filepart;}
20070 { am_mf=; unset am_mf;}
20071 { am_rc=; unset am_rc;}
20072 rm -f conftest-deps.mk
2000620073 }
2000720074 ;;
2000820075 "libtool":C)
00 dnl Process this file with autoconf to produce a configure script.
11
2 dnl Copyright (C) 2002-2018 Simon Josefsson.
2 dnl Copyright (C) 2002-2020 Simon Josefsson.
33 dnl
44 dnl This file is part of Libntlm.
55 dnl
1818 dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
1919 dnl 02110-1301, USA
2020
21 AC_PREREQ(2.61)
22 AC_INIT([libntlm], [1.5], [libntlm@nongnu.org])
21 AC_PREREQ(2.63)
22 AC_INIT([libntlm], [1.6], [libntlm@nongnu.org])
2323 AC_CONFIG_AUX_DIR([build-aux])
2424 AC_CONFIG_MACRO_DIR([m4])
2525
2828 # No interfaces changed: REVISION++
2929 AC_SUBST(LT_CURRENT, 0)
3030 AC_SUBST(LT_AGE, 0)
31 AC_SUBST(LT_REVISION, 20)
31 AC_SUBST(LT_REVISION, 21)
3232
3333 AM_INIT_AUTOMAKE([1.10 gnits -Wall -Werror])
3434 AM_CONFIG_HEADER(config.h)
00 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
11 ## Process this file with automake to produce Makefile.in.
2 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
2 # Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 #
44 # This file is free software; you can redistribute it and/or modify
55 # it under the terms of the GNU General Public License as published by
4444 # manywarnings \
4545 # strverscmp \
4646 # unistd \
47 # update-copyright \
4748 # valgrind-tests \
4849 # warnings
4950
50 AUTOMAKE_OPTIONS = 1.9.6 gnits
51 AUTOMAKE_OPTIONS = 1.11 gnits
5152
5253 SUBDIRS =
5354 noinst_HEADERS =
6263 DISTCLEANFILES =
6364 MAINTAINERCLEANFILES =
6465 # No GNU Make output.
65 SUBDIRS += tests
66 SUBDIRS += . tests
6667 EXTRA_DIST += m4/gnulib-cache.m4
6768
6869 AM_CPPFLAGS =
141142 test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile
142143
143144 ## end gnulib module gnumakefile
145
146 ## begin gnulib module libc-config
147
148
149 EXTRA_DIST += cdefs.h libc-config.h
150
151 ## end gnulib module libc-config
144152
145153 ## begin gnulib module limits-h
146154
311319 -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
312320 -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
313321 -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
314 -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
315 -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
316322 -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
317323 -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
318324 -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
495501 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
496502 -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
497503 -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
504 -e 's/@''GNULIB_ACCESS''@/$(GNULIB_ACCESS)/g' \
498505 -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
499506 -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
500507 -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
508 -e 's/@''GNULIB_COPY_FILE_RANGE''@/$(GNULIB_COPY_FILE_RANGE)/g' \
501509 -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
502510 -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
503511 -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
516524 -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
517525 -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
518526 -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
527 -e 's/@''GNULIB_GETOPT_POSIX''@/$(GNULIB_GETOPT_POSIX)/g' \
519528 -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
520529 -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
521530 -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
548557 -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
549558 < $(srcdir)/unistd.in.h | \
550559 sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
560 -e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \
551561 -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
552562 -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
553563 -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
592602 -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
593603 -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
594604 | \
595 sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
605 sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
606 -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
596607 -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
597608 -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
598609 -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
639650
640651 ## end gnulib module unistd
641652
653 ## begin gnulib module update-copyright
654
655
656 EXTRA_DIST += $(top_srcdir)/build-aux/update-copyright
657
658 ## end gnulib module update-copyright
659
642660 ## begin gnulib module useless-if-before-free
643661
644662
0 # Makefile.in generated by automake 1.15 from Makefile.am.
0 # Makefile.in generated by automake 1.16.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2018 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
1313
1414 @SET_MAKE@
1515
16 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
16 # Copyright (C) 2002-2020 Free Software Foundation, Inc.
1717 #
1818 # This file is free software; you can redistribute it and/or modify
1919 # it under the terms of the GNU General Public License as published by
5858 # manywarnings \
5959 # strverscmp \
6060 # unistd \
61 # update-copyright \
6162 # valgrind-tests \
6263 # warnings
6364
140141 subdir = gl
141142 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
142143 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \
144 $(top_srcdir)/gl/m4/__inline.m4 \
143145 $(top_srcdir)/gl/m4/absolute-header.m4 \
144146 $(top_srcdir)/gl/m4/autobuild.m4 \
145147 $(top_srcdir)/gl/m4/byteswap.m4 \
152154 $(top_srcdir)/gl/m4/inttypes-pri.m4 \
153155 $(top_srcdir)/gl/m4/inttypes.m4 \
154156 $(top_srcdir)/gl/m4/limits-h.m4 \
155 $(top_srcdir)/gl/m4/longlong.m4 \
156157 $(top_srcdir)/gl/m4/manywarnings.m4 $(top_srcdir)/gl/m4/md4.m4 \
157158 $(top_srcdir)/gl/m4/multiarch.m4 $(top_srcdir)/gl/m4/off_t.m4 \
158159 $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdalign.m4 \
165166 $(top_srcdir)/gl/m4/warn-on-use.m4 \
166167 $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \
167168 $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wint_t.m4 \
168 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
169 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
170 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
169 $(top_srcdir)/gl/m4/zzgnulib.m4 $(top_srcdir)/m4/libtool.m4 \
170 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
171 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
172 $(top_srcdir)/configure.ac
171173 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
172174 $(ACLOCAL_M4)
173175 DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
202204 am__v_at_1 =
203205 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
204206 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
205 am__depfiles_maybe = depfiles
207 am__maybe_remake_depfiles = depfiles
208 am__depfiles_remade = ./$(DEPDIR)/check-version.Plo \
209 ./$(DEPDIR)/des.Plo ./$(DEPDIR)/md4.Plo \
210 ./$(DEPDIR)/strverscmp.Plo ./$(DEPDIR)/unistd.Plo
206211 am__mv = mv -f
207212 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
208213 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
245250 $(RECURSIVE_CLEAN_TARGETS) \
246251 $(am__extra_recursive_targets)
247252 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
248 distdir
253 distdir distdir-am
249254 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
250255 # Read a list of newline-separated strings from the standard input,
251256 # and print each of them once, without duplicates. Input order is
329334 EGREP = @EGREP@
330335 EXEEXT = @EXEEXT@
331336 FGREP = @FGREP@
337 GNULIB_ACCESS = @GNULIB_ACCESS@
332338 GNULIB_BTOWC = @GNULIB_BTOWC@
333339 GNULIB_CHDIR = @GNULIB_CHDIR@
334340 GNULIB_CHOWN = @GNULIB_CHOWN@
335341 GNULIB_CLOSE = @GNULIB_CLOSE@
342 GNULIB_COPY_FILE_RANGE = @GNULIB_COPY_FILE_RANGE@
336343 GNULIB_DUP = @GNULIB_DUP@
337344 GNULIB_DUP2 = @GNULIB_DUP2@
338345 GNULIB_DUP3 = @GNULIB_DUP3@
354361 GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
355362 GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
356363 GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
364 GNULIB_GETOPT_POSIX = @GNULIB_GETOPT_POSIX@
357365 GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
358366 GNULIB_GETPASS = @GNULIB_GETPASS@
359367 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
466474 HAVE_BTOWC = @HAVE_BTOWC@
467475 HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
468476 HAVE_CHOWN = @HAVE_CHOWN@
477 HAVE_COPY_FILE_RANGE = @HAVE_COPY_FILE_RANGE@
469478 HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
470479 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
471480 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
517526 HAVE_LCHOWN = @HAVE_LCHOWN@
518527 HAVE_LINK = @HAVE_LINK@
519528 HAVE_LINKAT = @HAVE_LINKAT@
520 HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
521529 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
522530 HAVE_MBRLEN = @HAVE_MBRLEN@
523531 HAVE_MBRTOWC = @HAVE_MBRTOWC@
556564 HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
557565 HAVE_UNISTD_H = @HAVE_UNISTD_H@
558566 HAVE_UNLINKAT = @HAVE_UNLINKAT@
559 HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
560567 HAVE_USLEEP = @HAVE_USLEEP@
561568 HAVE_WCHAR_H = @HAVE_WCHAR_H@
562569 HAVE_WCHAR_T = @HAVE_WCHAR_T@
656663 PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
657664 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
658665 RANLIB = @RANLIB@
666 REPLACE_ACCESS = @REPLACE_ACCESS@
659667 REPLACE_BTOWC = @REPLACE_BTOWC@
660668 REPLACE_CHOWN = @REPLACE_CHOWN@
661669 REPLACE_CLOSE = @REPLACE_CLOSE@
717725 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
718726 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
719727 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
728 REPLACE_WCSTOK = @REPLACE_WCSTOK@
720729 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
721730 REPLACE_WCTOB = @REPLACE_WCTOB@
722731 REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
802811 top_build_prefix = @top_build_prefix@
803812 top_builddir = @top_builddir@
804813 top_srcdir = @top_srcdir@
805 AUTOMAKE_OPTIONS = 1.9.6 gnits
814 AUTOMAKE_OPTIONS = 1.11 gnits
806815 # No GNU Make output.
807 SUBDIRS = tests
816 SUBDIRS = . tests
808817 noinst_HEADERS =
809818 noinst_LIBRARIES =
810819 noinst_LTLIBRARIES = libgnu.la
811820 EXTRA_DIST = m4/gnulib-cache.m4 byteswap.in.h check-version.h des.h \
812 md4.h $(top_srcdir)/GNUmakefile limits.in.h \
813 $(top_srcdir)/maint.mk arg-nonnull.h c++defs.h warn-on-use.h \
814 stdalign.in.h stdbool.in.h stddef.in.h stdint.in.h string.in.h \
815 strverscmp.c sys_types.in.h unistd.in.h \
821 md4.h $(top_srcdir)/GNUmakefile cdefs.h libc-config.h \
822 limits.in.h $(top_srcdir)/maint.mk arg-nonnull.h c++defs.h \
823 warn-on-use.h stdalign.in.h stdbool.in.h stddef.in.h \
824 stdint.in.h string.in.h strverscmp.c sys_types.in.h \
825 unistd.in.h $(top_srcdir)/build-aux/update-copyright \
816826 $(top_srcdir)/build-aux/useless-if-before-free \
817827 $(top_srcdir)/build-aux/vc-list-files
818828 BUILT_SOURCES = $(BYTESWAP_H) $(LIMITS_H) $(STDALIGN_H) $(STDBOOL_H) \
875885 *config.status*) \
876886 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
877887 *) \
878 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
879 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
888 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
889 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
880890 esac;
881891
882892 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
911921 distclean-compile:
912922 -rm -f *.tab.c
913923
914 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-version.Plo@am__quote@
915 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/des.Plo@am__quote@
916 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md4.Plo@am__quote@
917 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strverscmp.Plo@am__quote@
918 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistd.Plo@am__quote@
924 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-version.Plo@am__quote@ # am--include-marker
925 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/des.Plo@am__quote@ # am--include-marker
926 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md4.Plo@am__quote@ # am--include-marker
927 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strverscmp.Plo@am__quote@ # am--include-marker
928 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistd.Plo@am__quote@ # am--include-marker
929
930 $(am__depfiles_remade):
931 @$(MKDIR_P) $(@D)
932 @echo '# dummy' >$@-t && $(am__mv) $@-t $@
933
934 am--depfiles: $(am__depfiles_remade)
919935
920936 .c.o:
921937 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
10431059 distclean-tags:
10441060 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
10451061
1046 distdir: $(DISTFILES)
1062 distdir: $(BUILT_SOURCES)
1063 $(MAKE) $(AM_MAKEFLAGS) distdir-am
1064
1065 distdir-am: $(DISTFILES)
10471066 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
10481067 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
10491068 list='$(DISTFILES)'; \
11461165 clean-noinstLTLIBRARIES mostlyclean-am
11471166
11481167 distclean: distclean-recursive
1149 -rm -rf ./$(DEPDIR)
1168 -rm -f ./$(DEPDIR)/check-version.Plo
1169 -rm -f ./$(DEPDIR)/des.Plo
1170 -rm -f ./$(DEPDIR)/md4.Plo
1171 -rm -f ./$(DEPDIR)/strverscmp.Plo
1172 -rm -f ./$(DEPDIR)/unistd.Plo
11501173 -rm -f Makefile
11511174 distclean-am: clean-am distclean-compile distclean-generic \
11521175 distclean-local distclean-tags
11921215 installcheck-am:
11931216
11941217 maintainer-clean: maintainer-clean-recursive
1195 -rm -rf ./$(DEPDIR)
1218 -rm -f ./$(DEPDIR)/check-version.Plo
1219 -rm -f ./$(DEPDIR)/des.Plo
1220 -rm -f ./$(DEPDIR)/md4.Plo
1221 -rm -f ./$(DEPDIR)/strverscmp.Plo
1222 -rm -f ./$(DEPDIR)/unistd.Plo
11961223 -rm -f Makefile
11971224 maintainer-clean-am: distclean-am maintainer-clean-generic
11981225
12141241 .MAKE: $(am__recursive_targets) all check install install-am \
12151242 install-strip
12161243
1217 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
1218 check-am clean clean-generic clean-libtool \
1244 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
1245 am--depfiles check check-am clean clean-generic clean-libtool \
12191246 clean-noinstLIBRARIES clean-noinstLTLIBRARIES cscopelist-am \
12201247 ctags ctags-am distclean distclean-compile distclean-generic \
12211248 distclean-libtool distclean-local distclean-tags distdir dvi \
13211348 @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
13221349 @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
13231350 @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
1324 @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
1325 @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
13261351 @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
13271352 @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
13281353 @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
14661491 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
14671492 -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
14681493 -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
1494 -e 's/@''GNULIB_ACCESS''@/$(GNULIB_ACCESS)/g' \
14691495 -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
14701496 -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
14711497 -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
1498 -e 's/@''GNULIB_COPY_FILE_RANGE''@/$(GNULIB_COPY_FILE_RANGE)/g' \
14721499 -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
14731500 -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
14741501 -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
14871514 -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
14881515 -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
14891516 -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
1517 -e 's/@''GNULIB_GETOPT_POSIX''@/$(GNULIB_GETOPT_POSIX)/g' \
14901518 -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
14911519 -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
14921520 -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
15191547 -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
15201548 < $(srcdir)/unistd.in.h | \
15211549 sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
1550 -e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \
15221551 -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
15231552 -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
15241553 -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
15631592 -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
15641593 -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
15651594 | \
1566 sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
1595 sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
1596 -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
15671597 -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
15681598 -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
15691599 -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
00 /* A C macro for declaring that specific arguments must not be NULL.
1 Copyright (C) 2009-2018 Free Software Foundation, Inc.
1 Copyright (C) 2009-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify it
44 under the terms of the GNU Lesser General Public License as published
00 /* byteswap.h - Byte swapping
1 Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc.
1 Copyright (C) 2005, 2007, 2009-2020 Free Software Foundation, Inc.
22 Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005.
33
44 This program is free software: you can redistribute it and/or modify
00 /* C++ compatible function declaration macros.
1 Copyright (C) 2010-2018 Free Software Foundation, Inc.
1 Copyright (C) 2010-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify it
44 under the terms of the GNU Lesser General Public License as published
300300 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
301301 "The symbol ::" #func " refers to the system function. " \
302302 "Use " #namespace "::" #func " instead.")
303 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
304 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
305 extern __typeof__ (func) func
306303 # else
307304 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
308305 _GL_EXTERN_C int _gl_cxxalias_dummy
0 /* Copyright (C) 1992-2020 Free Software Foundation, Inc.
1 This file is part of the GNU C Library.
2
3 The GNU C Library is free software; you can redistribute it and/or
4 modify it under the terms of the GNU Lesser General Public
5 License as published by the Free Software Foundation; either
6 version 2.1 of the License, or (at your option) any later version.
7
8 The GNU C Library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Lesser General Public License for more details.
12
13 You should have received a copy of the GNU Lesser General Public
14 License along with the GNU C Library; if not, see
15 <https://www.gnu.org/licenses/>. */
16
17 #ifndef _SYS_CDEFS_H
18 #define _SYS_CDEFS_H 1
19
20 /* We are almost always included from features.h. */
21 #ifndef _FEATURES_H
22 # include <features.h>
23 #endif
24
25 /* The GNU libc does not support any K&R compilers or the traditional mode
26 of ISO C compilers anymore. Check for some of the combinations not
27 anymore supported. */
28 #if defined __GNUC__ && !defined __STDC__
29 # error "You need a ISO C conforming compiler to use the glibc headers"
30 #endif
31
32 /* Some user header file might have defined this before. */
33 #undef __P
34 #undef __PMT
35
36 #ifdef __GNUC__
37
38 /* All functions, except those with callbacks or those that
39 synchronize memory, are leaf functions. */
40 # if __GNUC_PREREQ (4, 6) && !defined _LIBC
41 # define __LEAF , __leaf__
42 # define __LEAF_ATTR __attribute__ ((__leaf__))
43 # else
44 # define __LEAF
45 # define __LEAF_ATTR
46 # endif
47
48 /* GCC can always grok prototypes. For C++ programs we add throw()
49 to help it optimize the function calls. But this works only with
50 gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
51 as non-throwing using a function attribute since programs can use
52 the -fexceptions options for C code as well. */
53 # if !defined __cplusplus && __GNUC_PREREQ (3, 3)
54 # define __THROW __attribute__ ((__nothrow__ __LEAF))
55 # define __THROWNL __attribute__ ((__nothrow__))
56 # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
57 # define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
58 # else
59 # if defined __cplusplus && __GNUC_PREREQ (2,8)
60 # define __THROW throw ()
61 # define __THROWNL throw ()
62 # define __NTH(fct) __LEAF_ATTR fct throw ()
63 # define __NTHNL(fct) fct throw ()
64 # else
65 # define __THROW
66 # define __THROWNL
67 # define __NTH(fct) fct
68 # define __NTHNL(fct) fct
69 # endif
70 # endif
71
72 #else /* Not GCC. */
73
74 # if (defined __cplusplus \
75 || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
76 # define __inline inline
77 # else
78 # define __inline /* No inline functions. */
79 # endif
80
81 # define __THROW
82 # define __THROWNL
83 # define __NTH(fct) fct
84
85 #endif /* GCC. */
86
87 /* Compilers that are not clang may object to
88 #if defined __clang__ && __has_extension(...)
89 even though they do not need to evaluate the right-hand side of the &&. */
90 #if defined __clang__ && defined __has_extension
91 # define __glibc_clang_has_extension(ext) __has_extension (ext)
92 #else
93 # define __glibc_clang_has_extension(ext) 0
94 #endif
95
96 /* These two macros are not used in glibc anymore. They are kept here
97 only because some other projects expect the macros to be defined. */
98 #define __P(args) args
99 #define __PMT(args) args
100
101 /* For these things, GCC behaves the ANSI way normally,
102 and the non-ANSI way under -traditional. */
103
104 #define __CONCAT(x,y) x ## y
105 #define __STRING(x) #x
106
107 /* This is not a typedef so `const __ptr_t' does the right thing. */
108 #define __ptr_t void *
109
110
111 /* C++ needs to know that types and declarations are C, not C++. */
112 #ifdef __cplusplus
113 # define __BEGIN_DECLS extern "C" {
114 # define __END_DECLS }
115 #else
116 # define __BEGIN_DECLS
117 # define __END_DECLS
118 #endif
119
120
121 /* Fortify support. */
122 #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
123 #define __bos0(ptr) __builtin_object_size (ptr, 0)
124
125 #if __GNUC_PREREQ (4,3)
126 # define __warndecl(name, msg) \
127 extern void name (void) __attribute__((__warning__ (msg)))
128 # define __warnattr(msg) __attribute__((__warning__ (msg)))
129 # define __errordecl(name, msg) \
130 extern void name (void) __attribute__((__error__ (msg)))
131 #else
132 # define __warndecl(name, msg) extern void name (void)
133 # define __warnattr(msg)
134 # define __errordecl(name, msg) extern void name (void)
135 #endif
136
137 /* Support for flexible arrays.
138 Headers that should use flexible arrays only if they're "real"
139 (e.g. only if they won't affect sizeof()) should test
140 #if __glibc_c99_flexarr_available. */
141 #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc
142 # define __flexarr []
143 # define __glibc_c99_flexarr_available 1
144 #elif __GNUC_PREREQ (2,97)
145 /* GCC 2.97 supports C99 flexible array members as an extension,
146 even when in C89 mode or compiling C++ (any version). */
147 # define __flexarr []
148 # define __glibc_c99_flexarr_available 1
149 #elif defined __GNUC__
150 /* Pre-2.97 GCC did not support C99 flexible arrays but did have
151 an equivalent extension with slightly different notation. */
152 # define __flexarr [0]
153 # define __glibc_c99_flexarr_available 1
154 #else
155 /* Some other non-C99 compiler. Approximate with [1]. */
156 # define __flexarr [1]
157 # define __glibc_c99_flexarr_available 0
158 #endif
159
160
161 /* __asm__ ("xyz") is used throughout the headers to rename functions
162 at the assembly language level. This is wrapped by the __REDIRECT
163 macro, in order to support compilers that can do this some other
164 way. When compilers don't support asm-names at all, we have to do
165 preprocessor tricks instead (which don't have exactly the right
166 semantics, but it's the best we can do).
167
168 Example:
169 int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
170
171 #if defined __GNUC__ && __GNUC__ >= 2
172
173 # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
174 # ifdef __cplusplus
175 # define __REDIRECT_NTH(name, proto, alias) \
176 name proto __THROW __asm__ (__ASMNAME (#alias))
177 # define __REDIRECT_NTHNL(name, proto, alias) \
178 name proto __THROWNL __asm__ (__ASMNAME (#alias))
179 # else
180 # define __REDIRECT_NTH(name, proto, alias) \
181 name proto __asm__ (__ASMNAME (#alias)) __THROW
182 # define __REDIRECT_NTHNL(name, proto, alias) \
183 name proto __asm__ (__ASMNAME (#alias)) __THROWNL
184 # endif
185 # define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
186 # define __ASMNAME2(prefix, cname) __STRING (prefix) cname
187
188 /*
189 #elif __SOME_OTHER_COMPILER__
190
191 # define __REDIRECT(name, proto, alias) name proto; \
192 _Pragma("let " #name " = " #alias)
193 */
194 #endif
195
196 /* GCC has various useful declarations that can be made with the
197 `__attribute__' syntax. All of the ways we use this do fine if
198 they are omitted for compilers that don't understand it. */
199 #if !defined __GNUC__ || __GNUC__ < 2
200 # define __attribute__(xyz) /* Ignore */
201 #endif
202
203 /* At some point during the gcc 2.96 development the `malloc' attribute
204 for functions was introduced. We don't want to use it unconditionally
205 (although this would be possible) since it generates warnings. */
206 #if __GNUC_PREREQ (2,96)
207 # define __attribute_malloc__ __attribute__ ((__malloc__))
208 #else
209 # define __attribute_malloc__ /* Ignore */
210 #endif
211
212 /* Tell the compiler which arguments to an allocation function
213 indicate the size of the allocation. */
214 #if __GNUC_PREREQ (4, 3)
215 # define __attribute_alloc_size__(params) \
216 __attribute__ ((__alloc_size__ params))
217 #else
218 # define __attribute_alloc_size__(params) /* Ignore. */
219 #endif
220
221 /* At some point during the gcc 2.96 development the `pure' attribute
222 for functions was introduced. We don't want to use it unconditionally
223 (although this would be possible) since it generates warnings. */
224 #if __GNUC_PREREQ (2,96)
225 # define __attribute_pure__ __attribute__ ((__pure__))
226 #else
227 # define __attribute_pure__ /* Ignore */
228 #endif
229
230 /* This declaration tells the compiler that the value is constant. */
231 #if __GNUC_PREREQ (2,5)
232 # define __attribute_const__ __attribute__ ((__const__))
233 #else
234 # define __attribute_const__ /* Ignore */
235 #endif
236
237 /* At some point during the gcc 3.1 development the `used' attribute
238 for functions was introduced. We don't want to use it unconditionally
239 (although this would be possible) since it generates warnings. */
240 #if __GNUC_PREREQ (3,1)
241 # define __attribute_used__ __attribute__ ((__used__))
242 # define __attribute_noinline__ __attribute__ ((__noinline__))
243 #else
244 # define __attribute_used__ __attribute__ ((__unused__))
245 # define __attribute_noinline__ /* Ignore */
246 #endif
247
248 /* Since version 3.2, gcc allows marking deprecated functions. */
249 #if __GNUC_PREREQ (3,2)
250 # define __attribute_deprecated__ __attribute__ ((__deprecated__))
251 #else
252 # define __attribute_deprecated__ /* Ignore */
253 #endif
254
255 /* Since version 4.5, gcc also allows one to specify the message printed
256 when a deprecated function is used. clang claims to be gcc 4.2, but
257 may also support this feature. */
258 #if __GNUC_PREREQ (4,5) || \
259 __glibc_clang_has_extension (__attribute_deprecated_with_message__)
260 # define __attribute_deprecated_msg__(msg) \
261 __attribute__ ((__deprecated__ (msg)))
262 #else
263 # define __attribute_deprecated_msg__(msg) __attribute_deprecated__
264 #endif
265
266 /* At some point during the gcc 2.8 development the `format_arg' attribute
267 for functions was introduced. We don't want to use it unconditionally
268 (although this would be possible) since it generates warnings.
269 If several `format_arg' attributes are given for the same function, in
270 gcc-3.0 and older, all but the last one are ignored. In newer gccs,
271 all designated arguments are considered. */
272 #if __GNUC_PREREQ (2,8)
273 # define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
274 #else
275 # define __attribute_format_arg__(x) /* Ignore */
276 #endif
277
278 /* At some point during the gcc 2.97 development the `strfmon' format
279 attribute for functions was introduced. We don't want to use it
280 unconditionally (although this would be possible) since it
281 generates warnings. */
282 #if __GNUC_PREREQ (2,97)
283 # define __attribute_format_strfmon__(a,b) \
284 __attribute__ ((__format__ (__strfmon__, a, b)))
285 #else
286 # define __attribute_format_strfmon__(a,b) /* Ignore */
287 #endif
288
289 /* The nonnull function attribute marks pointer parameters that
290 must not be NULL. Do not define __nonnull if it is already defined,
291 for portability when this file is used in Gnulib. */
292 #ifndef __nonnull
293 # if __GNUC_PREREQ (3,3)
294 # define __nonnull(params) __attribute__ ((__nonnull__ params))
295 # else
296 # define __nonnull(params)
297 # endif
298 #endif
299
300 /* If fortification mode, we warn about unused results of certain
301 function calls which can lead to problems. */
302 #if __GNUC_PREREQ (3,4)
303 # define __attribute_warn_unused_result__ \
304 __attribute__ ((__warn_unused_result__))
305 # if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0
306 # define __wur __attribute_warn_unused_result__
307 # endif
308 #else
309 # define __attribute_warn_unused_result__ /* empty */
310 #endif
311 #ifndef __wur
312 # define __wur /* Ignore */
313 #endif
314
315 /* Forces a function to be always inlined. */
316 #if __GNUC_PREREQ (3,2)
317 /* The Linux kernel defines __always_inline in stddef.h (283d7573), and
318 it conflicts with this definition. Therefore undefine it first to
319 allow either header to be included first. */
320 # undef __always_inline
321 # define __always_inline __inline __attribute__ ((__always_inline__))
322 #else
323 # undef __always_inline
324 # define __always_inline __inline
325 #endif
326
327 /* Associate error messages with the source location of the call site rather
328 than with the source location inside the function. */
329 #if __GNUC_PREREQ (4,3)
330 # define __attribute_artificial__ __attribute__ ((__artificial__))
331 #else
332 # define __attribute_artificial__ /* Ignore */
333 #endif
334
335 /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
336 inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
337 or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
338 older than 4.3 may define these macros and still not guarantee GNU inlining
339 semantics.
340
341 clang++ identifies itself as gcc-4.2, but has support for GNU inlining
342 semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
343 __GNUC_GNU_INLINE__ macro definitions. */
344 #if (!defined __cplusplus || __GNUC_PREREQ (4,3) \
345 || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \
346 || defined __GNUC_GNU_INLINE__)))
347 # if defined __GNUC_STDC_INLINE__ || defined __cplusplus
348 # define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
349 # define __extern_always_inline \
350 extern __always_inline __attribute__ ((__gnu_inline__))
351 # else
352 # define __extern_inline extern __inline
353 # define __extern_always_inline extern __always_inline
354 # endif
355 #endif
356
357 #ifdef __extern_always_inline
358 # define __fortify_function __extern_always_inline __attribute_artificial__
359 #endif
360
361 /* GCC 4.3 and above allow passing all anonymous arguments of an
362 __extern_always_inline function to some other vararg function. */
363 #if __GNUC_PREREQ (4,3)
364 # define __va_arg_pack() __builtin_va_arg_pack ()
365 # define __va_arg_pack_len() __builtin_va_arg_pack_len ()
366 #endif
367
368 /* It is possible to compile containing GCC extensions even if GCC is
369 run in pedantic mode if the uses are carefully marked using the
370 `__extension__' keyword. But this is not generally available before
371 version 2.8. */
372 #if !__GNUC_PREREQ (2,8)
373 # define __extension__ /* Ignore */
374 #endif
375
376 /* __restrict is known in EGCS 1.2 and above. */
377 #if !__GNUC_PREREQ (2,92)
378 # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
379 # define __restrict restrict
380 # else
381 # define __restrict /* Ignore */
382 # endif
383 #endif
384
385 /* ISO C99 also allows to declare arrays as non-overlapping. The syntax is
386 array_name[restrict]
387 GCC 3.1 supports this. */
388 #if __GNUC_PREREQ (3,1) && !defined __GNUG__
389 # define __restrict_arr __restrict
390 #else
391 # ifdef __GNUC__
392 # define __restrict_arr /* Not supported in old GCC. */
393 # else
394 # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
395 # define __restrict_arr restrict
396 # else
397 /* Some other non-C99 compiler. */
398 # define __restrict_arr /* Not supported. */
399 # endif
400 # endif
401 #endif
402
403 #if __GNUC__ >= 3
404 # define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
405 # define __glibc_likely(cond) __builtin_expect ((cond), 1)
406 #else
407 # define __glibc_unlikely(cond) (cond)
408 # define __glibc_likely(cond) (cond)
409 #endif
410
411 #ifdef __has_attribute
412 # define __glibc_has_attribute(attr) __has_attribute (attr)
413 #else
414 # define __glibc_has_attribute(attr) 0
415 #endif
416
417 #if (!defined _Noreturn \
418 && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
419 && !__GNUC_PREREQ (4,7))
420 # if __GNUC_PREREQ (2,8)
421 # define _Noreturn __attribute__ ((__noreturn__))
422 # else
423 # define _Noreturn
424 # endif
425 #endif
426
427 #if __GNUC_PREREQ (8, 0)
428 /* Describes a char array whose address can safely be passed as the first
429 argument to strncpy and strncat, as the char array is not necessarily
430 a NUL-terminated string. */
431 # define __attribute_nonstring__ __attribute__ ((__nonstring__))
432 #else
433 # define __attribute_nonstring__
434 #endif
435
436 #if (!defined _Static_assert && !defined __cplusplus \
437 && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
438 && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__))
439 # define _Static_assert(expr, diagnostic) \
440 extern int (*__Static_assert_function (void)) \
441 [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
442 #endif
443
444 /* The #ifndef lets Gnulib avoid including these on non-glibc
445 platforms, where the includes typically do not exist. */
446 #ifndef __WORDSIZE
447 # include <bits/wordsize.h>
448 # include <bits/long-double.h>
449 #endif
450
451 #if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
452 # define __LDBL_COMPAT 1
453 # ifdef __REDIRECT
454 # define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias)
455 # define __LDBL_REDIR(name, proto) \
456 __LDBL_REDIR1 (name, proto, __nldbl_##name)
457 # define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias)
458 # define __LDBL_REDIR_NTH(name, proto) \
459 __LDBL_REDIR1_NTH (name, proto, __nldbl_##name)
460 # define __LDBL_REDIR1_DECL(name, alias) \
461 extern __typeof (name) name __asm (__ASMNAME (#alias));
462 # define __LDBL_REDIR_DECL(name) \
463 extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name));
464 # define __REDIRECT_LDBL(name, proto, alias) \
465 __LDBL_REDIR1 (name, proto, __nldbl_##alias)
466 # define __REDIRECT_NTH_LDBL(name, proto, alias) \
467 __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias)
468 # endif
469 #endif
470 #if !defined __LDBL_COMPAT || !defined __REDIRECT
471 # define __LDBL_REDIR1(name, proto, alias) name proto
472 # define __LDBL_REDIR(name, proto) name proto
473 # define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW
474 # define __LDBL_REDIR_NTH(name, proto) name proto __THROW
475 # define __LDBL_REDIR_DECL(name)
476 # ifdef __REDIRECT
477 # define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias)
478 # define __REDIRECT_NTH_LDBL(name, proto, alias) \
479 __REDIRECT_NTH (name, proto, alias)
480 # endif
481 #endif
482
483 /* __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
484 intended for use in preprocessor macros.
485
486 Note: MESSAGE must be a _single_ string; concatenation of string
487 literals is not supported. */
488 #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
489 # define __glibc_macro_warning1(message) _Pragma (#message)
490 # define __glibc_macro_warning(message) \
491 __glibc_macro_warning1 (GCC warning message)
492 #else
493 # define __glibc_macro_warning(msg)
494 #endif
495
496 /* Generic selection (ISO C11) is a C-only feature, available in GCC
497 since version 4.9. Previous versions do not provide generic
498 selection, even though they might set __STDC_VERSION__ to 201112L,
499 when in -std=c11 mode. Thus, we must check for !defined __GNUC__
500 when testing __STDC_VERSION__ for generic selection support.
501 On the other hand, Clang also defines __GNUC__, so a clang-specific
502 check is required to enable the use of generic selection. */
503 #if !defined __cplusplus \
504 && (__GNUC_PREREQ (4, 9) \
505 || __glibc_clang_has_extension (c_generic_selections) \
506 || (!defined __GNUC__ && defined __STDC_VERSION__ \
507 && __STDC_VERSION__ >= 201112L))
508 # define __HAVE_GENERIC_SELECTION 1
509 #else
510 # define __HAVE_GENERIC_SELECTION 0
511 #endif
512
513 #endif /* sys/cdefs.h */
00 /* check-version.h --- Check version string compatibility.
1 Copyright (C) 1998-2006, 2008-2018 Free Software Foundation, Inc.
1 Copyright (C) 1998-2006, 2008-2020 Free Software Foundation, Inc.
22
33 This program is free software; you can redistribute it and/or modify
44 it under the terms of the GNU Lesser General Public License as published by
00 /* check-version.h --- Check version string compatibility.
1 Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc.
1 Copyright (C) 2005, 2009-2020 Free Software Foundation, Inc.
22
33 This program is free software; you can redistribute it and/or modify
44 it under the terms of the GNU Lesser General Public License as published by
00 /* des.c --- DES and Triple-DES encryption/decryption Algorithm
1 * Copyright (C) 1998-1999, 2001-2007, 2009-2018 Free Software Foundation, Inc.
1 * Copyright (C) 1998-1999, 2001-2007, 2009-2020 Free Software Foundation, Inc.
22 *
33 * This file is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU Lesser General Public License as published
406406 * Macros to convert 8 bytes from/to 32bit words.
407407 */
408408 #define READ_64BIT_DATA(data, left, right) \
409 left = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3]; \
410 right = (data[4] << 24) | (data[5] << 16) | (data[6] << 8) | data[7];
409 left = ((uint32_t) data[0] << 24) \
410 | ((uint32_t) data[1] << 16) \
411 | ((uint32_t) data[2] << 8) \
412 | (uint32_t) data[3]; \
413 right = ((uint32_t) data[4] << 24) \
414 | ((uint32_t) data[5] << 16) \
415 | ((uint32_t) data[6] << 8) \
416 | (uint32_t) data[7];
411417
412418 #define WRITE_64BIT_DATA(data, left, right) \
413 data[0] = (left >> 24) &0xff; data[1] = (left >> 16) &0xff; \
419 data[0] = (left >> 24) &0xff; data[1] = (left >> 16) &0xff; \
414420 data[2] = (left >> 8) &0xff; data[3] = left &0xff; \
415421 data[4] = (right >> 24) &0xff; data[5] = (right >> 16) &0xff; \
416422 data[6] = (right >> 8) &0xff; data[7] = right &0xff;
00 /* des.h --- DES cipher implementation.
1 * Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc.
1 * Copyright (C) 2005, 2007, 2009-2020 Free Software Foundation, Inc.
22 *
33 * This file is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU Lesser General Public License as published
0 /* System definitions for code taken from the GNU C Library
1
2 Copyright 2017-2020 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this program; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18 /* Written by Paul Eggert. */
19
20 /* This is intended to be a good-enough substitute for glibc system
21 macros like those defined in <sys/cdefs.h>, so that Gnulib code
22 shared with glibc can do this as the first #include:
23
24 #ifndef _LIBC
25 # include <libc-config.h>
26 #endif
27
28 When compiled as part of glibc this is a no-op; when compiled as
29 part of Gnulib this includes Gnulib's <config.h> and defines macros
30 that glibc library code would normally assume. */
31
32 #include <config.h>
33
34 /* On glibc this includes <features.h> and <sys/cdefs.h> and #defines
35 _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 it
36 includes <sys/cdefs.h> which defines __nonnull. Elsewhere it
37 is harmless. */
38 #include <errno.h>
39
40 /* From glibc <errno.h>. */
41 #ifndef __set_errno
42 # define __set_errno(val) (errno = (val))
43 #endif
44
45 /* From glibc <features.h>. */
46
47 #ifndef __GNUC_PREREQ
48 # if defined __GNUC__ && defined __GNUC_MINOR__
49 # define __GNUC_PREREQ(maj, min) ((maj) < __GNUC__ + ((min) <= __GNUC_MINOR__))
50 # else
51 # define __GNUC_PREREQ(maj, min) 0
52 # endif
53 #endif
54
55 #ifndef __glibc_clang_prereq
56 # if defined __clang_major__ && defined __clang_minor__
57 # ifdef __apple_build_version__
58 /* Apple for some reason renumbers __clang_major__ and __clang_minor__.
59 Gnulib code uses only __glibc_clang_prereq (3, 5); map it to
60 6000000 <= __apple_build_version__. Support for other calls to
61 __glibc_clang_prereq can be added here as needed. */
62 # define __glibc_clang_prereq(maj, min) \
63 ((maj) == 3 && (min) == 5 ? 6000000 <= __apple_build_version__ : 0)
64 # else
65 # define __glibc_clang_prereq(maj, min) \
66 ((maj) < __clang_major__ + ((min) <= __clang_minor__))
67 # endif
68 # else
69 # define __glibc_clang_prereq(maj, min) 0
70 # endif
71 #endif
72
73
74 /* Prepare to include <cdefs.h>, which is our copy of glibc
75 <sys/cdefs.h>. */
76
77 /* Define _FEATURES_H so that <cdefs.h> does not include <features.h>. */
78 #ifndef _FEATURES_H
79 # define _FEATURES_H 1
80 #endif
81 /* Define __WORDSIZE so that <cdefs.h> does not attempt to include
82 nonexistent files. Make it a syntax error, since Gnulib does not
83 use __WORDSIZE now, and if Gnulib uses it later the syntax error
84 will let us know that __WORDSIZE needs configuring. */
85 #ifndef __WORDSIZE
86 # define __WORDSIZE %%%
87 #endif
88 /* Undef the macros unconditionally defined by our copy of glibc
89 <sys/cdefs.h>, so that they do not clash with any system-defined
90 versions. */
91 #undef _SYS_CDEFS_H
92 #undef __ASMNAME
93 #undef __ASMNAME2
94 #undef __BEGIN_DECLS
95 #undef __CONCAT
96 #undef __END_DECLS
97 #undef __HAVE_GENERIC_SELECTION
98 #undef __LDBL_COMPAT
99 #undef __LDBL_REDIR
100 #undef __LDBL_REDIR1
101 #undef __LDBL_REDIR1_DECL
102 #undef __LDBL_REDIR1_NTH
103 #undef __LDBL_REDIR_DECL
104 #undef __LDBL_REDIR_NTH
105 #undef __LEAF
106 #undef __LEAF_ATTR
107 #undef __NTH
108 #undef __NTHNL
109 #undef __P
110 #undef __PMT
111 #undef __REDIRECT
112 #undef __REDIRECT_LDBL
113 #undef __REDIRECT_NTH
114 #undef __REDIRECT_NTHNL
115 #undef __REDIRECT_NTH_LDBL
116 #undef __STRING
117 #undef __THROW
118 #undef __THROWNL
119 #undef __always_inline
120 #undef __attribute__
121 #undef __attribute_alloc_size__
122 #undef __attribute_artificial__
123 #undef __attribute_const__
124 #undef __attribute_deprecated__
125 #undef __attribute_deprecated_msg__
126 #undef __attribute_format_arg__
127 #undef __attribute_format_strfmon__
128 #undef __attribute_malloc__
129 #undef __attribute_noinline__
130 #undef __attribute_nonstring__
131 #undef __attribute_pure__
132 #undef __attribute_used__
133 #undef __attribute_warn_unused_result__
134 #undef __bos
135 #undef __bos0
136 #undef __errordecl
137 #undef __extension__
138 #undef __extern_always_inline
139 #undef __extern_inline
140 #undef __flexarr
141 #undef __fortify_function
142 #undef __glibc_c99_flexarr_available
143 #undef __glibc_clang_has_extension
144 #undef __glibc_likely
145 #undef __glibc_macro_warning
146 #undef __glibc_macro_warning1
147 #undef __glibc_unlikely
148 #undef __inline
149 #undef __ptr_t
150 #undef __restrict
151 #undef __restrict_arr
152 #undef __va_arg_pack
153 #undef __va_arg_pack_len
154 #undef __warnattr
155 #undef __warndecl
156
157 /* Include our copy of glibc <sys/cdefs.h>. */
158 #include <cdefs.h>
159
160 /* <cdefs.h> __inline is too pessimistic for non-GCC. */
161 #undef __inline
162 #ifndef HAVE___INLINE
163 # if 199901 <= __STDC_VERSION__ || defined inline
164 # define __inline inline
165 # else
166 # define __inline
167 # endif
168 #endif
169
170
171 /* A substitute for glibc <libc-symbols.h>, good enough for Gnulib. */
172 #define attribute_hidden
173 #define libc_hidden_proto(name, ...)
174 #define libc_hidden_def(name)
175 #define libc_hidden_weak(name)
176 #define libc_hidden_ver(local, name)
177 #define strong_alias(name, aliasname)
178 #define weak_alias(name, aliasname)
179
180 /* A substitute for glibc <shlib-compat.h>, good enough for Gnulib. */
181 #define SHLIB_COMPAT(lib, introduced, obsoleted) 0
182 #define versioned_symbol(lib, local, symbol, version)
00 /* A GNU-like <limits.h>.
11
2 Copyright 2016-2018 Free Software Foundation, Inc.
2 Copyright 2016-2020 Free Software Foundation, Inc.
33
44 This program is free software; you can redistribute it and/or
55 modify it under the terms of the GNU Lesser General Public License
2727 #ifndef _@GUARD_PREFIX@_LIMITS_H
2828 #define _@GUARD_PREFIX@_LIMITS_H
2929
30 /* For HP-UX 11.31. */
31 #if defined LONG_LONG_MIN && !defined LLONG_MIN
32 # define LLONG_MIN LONG_LONG_MIN
30 #ifndef LLONG_MIN
31 # if defined LONG_LONG_MIN /* HP-UX 11.31 */
32 # define LLONG_MIN LONG_LONG_MIN
33 # elif defined LONGLONG_MIN /* IRIX 6.5 */
34 # define LLONG_MIN LONGLONG_MIN
35 # elif defined __GNUC__
36 # define LLONG_MIN (- __LONG_LONG_MAX__ - 1LL)
37 # endif
3338 #endif
34 #if defined LONG_LONG_MAX && !defined LLONG_MAX
35 # define LLONG_MAX LONG_LONG_MAX
39 #ifndef LLONG_MAX
40 # if defined LONG_LONG_MAX /* HP-UX 11.31 */
41 # define LLONG_MAX LONG_LONG_MAX
42 # elif defined LONGLONG_MAX /* IRIX 6.5 */
43 # define LLONG_MAX LONGLONG_MAX
44 # elif defined __GNUC__
45 # define LLONG_MAX __LONG_LONG_MAX__
46 # endif
3647 #endif
37 #if defined ULONG_LONG_MAX && !defined ULLONG_MAX
38 # define ULLONG_MAX ULONG_LONG_MAX
48 #ifndef ULLONG_MAX
49 # if defined ULONG_LONG_MAX /* HP-UX 11.31 */
50 # define ULLONG_MAX ULONG_LONG_MAX
51 # elif defined ULONGLONG_MAX /* IRIX 6.5 */
52 # define ULLONG_MAX ULONGLONG_MAX
53 # elif defined __GNUC__
54 # define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL)
55 # endif
3956 #endif
4057
4158 /* The number of usable bits in an unsigned or signed integer type
5168 #define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n))
5269 #define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n))
5370 #define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1))
71
72 #ifndef WORD_BIT
73 /* Assume 'int' is 32 bits wide. */
74 # define WORD_BIT 32
75 #endif
76 #ifndef LONG_BIT
77 /* Assume 'long' is 32 or 64 bits wide. */
78 # if LONG_MAX == INT_MAX
79 # define LONG_BIT 32
80 # else
81 # define LONG_BIT 64
82 # endif
83 #endif
5484
5585 /* Macros specified by ISO/IEC TS 18661-1:2014. */
5686
0 # 00gnulib.m4 serial 3
1 dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
0 # 00gnulib.m4 serial 7
1 dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
55
66 dnl This file must be named something that sorts before all other
7 dnl gnulib-provided .m4 files. It is needed until such time as we can
8 dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
9 dnl m4_divert semantics.
7 dnl gnulib-provided .m4 files. The first part is needed until such time
8 dnl as we can assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
9 dnl m4_divert semantics. The second part is needed until the clang fix
10 dnl has been included in Autoconf.
1011
1112 # Until autoconf 2.63, handling of the diversion stack required m4_init
1213 # to be called first; but this does not happen with aclocal. Wrapping
3839 [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl
3940 [AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])])
4041
42 # The following definitions arrange to use a compiler option
43 # -Werror=implicit-function-declaration in AC_CHECK_DECL, when the
44 # compiler is clang. Without it, clang implicitly declares "known"
45 # library functions in C mode, but not in C++ mode, which would cause
46 # Gnulib to omit a declaration and thus later produce an error in C++
47 # mode. As of clang 9.0, these "known" functions are identified through
48 # LIBBUILTIN invocations in the LLVM source file
49 # llvm/tools/clang/include/clang/Basic/Builtins.def.
50 # It's not possible to AC_REQUIRE the extra tests from AC_CHECK_DECL,
51 # because AC_CHECK_DECL, like other Autoconf built-ins, is not supposed
52 # to AC_REQUIRE anything: some configure.ac files have their first
53 # AC_CHECK_DECL executed conditionally. Therefore append the extra tests
54 # to AC_PROG_CC.
55 AC_DEFUN([gl_COMPILER_CLANG],
56 [
57 dnl AC_REQUIRE([AC_PROG_CC])
58 AC_CACHE_CHECK([whether the compiler is clang],
59 [gl_cv_compiler_clang],
60 [dnl Use _AC_COMPILE_IFELSE instead of AC_EGREP_CPP, to avoid error
61 dnl "circular dependency of AC_LANG_COMPILER(C)" if AC_PROG_CC has
62 dnl not yet been invoked.
63 _AC_COMPILE_IFELSE(
64 [AC_LANG_PROGRAM([[
65 #ifdef __clang__
66 barfbarf
67 #endif
68 ]],[[]])
69 ],
70 [gl_cv_compiler_clang=no],
71 [gl_cv_compiler_clang=yes])
72 ])
73 ])
74 AC_DEFUN([gl_COMPILER_PREPARE_CHECK_DECL],
75 [
76 dnl AC_REQUIRE([AC_PROG_CC])
77 dnl AC_REQUIRE([gl_COMPILER_CLANG])
78 AC_CACHE_CHECK([for compiler option needed when checking for declarations],
79 [gl_cv_compiler_check_decl_option],
80 [if test $gl_cv_compiler_clang = yes; then
81 dnl Test whether the compiler supports the option
82 dnl '-Werror=implicit-function-declaration'.
83 save_ac_compile="$ac_compile"
84 ac_compile="$ac_compile -Werror=implicit-function-declaration"
85 dnl Use _AC_COMPILE_IFELSE instead of AC_COMPILE_IFELSE, to avoid a
86 dnl warning "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
87 _AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
88 [gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'],
89 [gl_cv_compiler_check_decl_option=none])
90 ac_compile="$save_ac_compile"
91 else
92 gl_cv_compiler_check_decl_option=none
93 fi
94 ])
95 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
96 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
97 else
98 ac_compile_for_check_decl="$ac_compile"
99 fi
100 ])
101 dnl Redefine _AC_CHECK_DECL_BODY so that it references ac_compile_for_check_decl
102 dnl instead of ac_compile. If, for whatever reason, the override of AC_PROG_CC
103 dnl in zzgnulib.m4 is inactive, use the original ac_compile.
104 m4_define([_AC_CHECK_DECL_BODY],
105 [ ac_save_ac_compile="$ac_compile"
106 if test -n "$ac_compile_for_check_decl"; then
107 ac_compile="$ac_compile_for_check_decl"
108 fi]
109 m4_defn([_AC_CHECK_DECL_BODY])[ ac_compile="$ac_save_ac_compile"
110 ])
111
41112 # gl_00GNULIB
42113 # -----------
43114 # Witness macro that this file has been included. Needed to force
0 # Test for __inline keyword
1 dnl Copyright 2017-2020 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 AC_DEFUN([gl___INLINE],
7 [
8 AC_CACHE_CHECK([whether the compiler supports the __inline keyword],
9 [gl_cv_c___inline],
10 [AC_COMPILE_IFELSE(
11 [AC_LANG_PROGRAM(
12 [[typedef int foo_t;
13 static __inline foo_t foo (void) { return 0; }]],
14 [[return foo ();]])],
15 [gl_cv_c___inline=yes],
16 [gl_cv_c___inline=no])])
17 if test $gl_cv_c___inline = yes; then
18 AC_DEFINE([HAVE___INLINE], [1],
19 [Define to 1 if the compiler supports the keyword '__inline'.])
20 fi
21 ])
00 # absolute-header.m4 serial 16
1 dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
00 # autobuild.m4 serial 7
1 dnl Copyright (C) 2004, 2006-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2004, 2006-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
00 # byteswap.m4 serial 4
1 dnl Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2005, 2007, 2009-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
00 # serial 18 -*- Autoconf -*-
11 # Enable extensions on systems that normally disable them.
22
3 # Copyright (C) 2003, 2006-2018 Free Software Foundation, Inc.
3 # Copyright (C) 2003, 2006-2020 Free Software Foundation, Inc.
44 # This file is free software; the Free Software Foundation
55 # gives unlimited permission to copy and/or distribute it,
66 # with or without modifications, as long as this notice is preserved.
00 dnl 'extern inline' a la ISO C99.
11
2 dnl Copyright 2012-2018 Free Software Foundation, Inc.
2 dnl Copyright 2012-2020 Free Software Foundation, Inc.
33 dnl This file is free software; the Free Software Foundation
44 dnl gives unlimited permission to copy and/or distribute it,
55 dnl with or without modifications, as long as this notice is preserved.
3131 https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
3232
3333 DragonFly; see
34 http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
34 http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log
3535
3636 FreeBSD; see:
3737 https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
0 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
0 # Copyright (C) 2002-2020 Free Software Foundation, Inc.
11 #
22 # This file is free software; you can redistribute it and/or modify
33 # it under the terms of the GNU General Public License as published by
4949 # manywarnings \
5050 # strverscmp \
5151 # unistd \
52 # update-copyright \
5253 # valgrind-tests \
5354 # warnings
5455
6566 manywarnings
6667 strverscmp
6768 unistd
69 update-copyright
6870 valgrind-tests
6971 warnings
7072 ])
0 # gnulib-common.m4 serial 39
1 dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
0 # gnulib-common.m4 serial 48
1 dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
5
6 AC_PREREQ([2.62])
57
68 # gl_COMMON
79 # is expanded unconditionally through gnulib-tool magic.
911 dnl Use AC_REQUIRE here, so that the code is expanded once only.
1012 AC_REQUIRE([gl_00GNULIB])
1113 AC_REQUIRE([gl_COMMON_BODY])
14 AC_REQUIRE([gl_ZZGNULIB])
1215 ])
1316 AC_DEFUN([gl_COMMON_BODY], [
1417 AH_VERBATIM([_Noreturn],
1518 [/* The _Noreturn keyword of C11. */
16 #if ! (defined _Noreturn \
17 || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
18 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
19 || 0x5110 <= __SUNPRO_C)
19 #ifndef _Noreturn
20 # if (defined __cplusplus \
21 && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
22 || (defined _MSC_VER && 1900 <= _MSC_VER)) \
23 && 0)
24 /* [[noreturn]] is not practically usable, because with it the syntax
25 extern _Noreturn void func (...);
26 would not be valid; such a declaration would only be valid with 'extern'
27 and '_Noreturn' swapped, or without the 'extern' keyword. However, some
28 AIX system header files and several gnulib header files use precisely
29 this syntax with 'extern'. */
30 # define _Noreturn [[noreturn]]
31 # elif ((!defined __cplusplus || defined __clang__) \
32 && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
33 || 4 < __GNUC__ + (7 <= __GNUC_MINOR__) \
34 || (defined __apple_build_version__ \
35 ? 6000000 <= __apple_build_version__ \
36 : 3 < __clang_major__ + (5 <= __clang_minor__))))
37 /* _Noreturn works as-is. */
38 # elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
2039 # define _Noreturn __attribute__ ((__noreturn__))
21 # elif defined _MSC_VER && 1200 <= _MSC_VER
40 # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
2241 # define _Noreturn __declspec (noreturn)
2342 # else
2443 # define _Noreturn
7998 # define _GL_ATTRIBUTE_MALLOC /* empty */
8099 #endif
81100 ])
101 AH_VERBATIM([async_safe],
102 [/* The _GL_ASYNC_SAFE marker should be attached to functions that are
103 signal handlers (for signals other than SIGABRT, SIGPIPE) or can be
104 invoked from such signal handlers. Such functions have some restrictions:
105 * All functions that it calls should be marked _GL_ASYNC_SAFE as well,
106 or should be listed as async-signal-safe in POSIX
107 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04>
108 section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in
109 particular, are NOT async-signal-safe.
110 * All memory locations (variables and struct fields) that these functions
111 access must be marked 'volatile'. This holds for both read and write
112 accesses. Otherwise the compiler might optimize away stores to and
113 reads from such locations that occur in the program, depending on its
114 data flow analysis. For example, when the program contains a loop
115 that is intended to inspect a variable set from within a signal handler
116 while (!signal_occurred)
117 ;
118 the compiler is allowed to transform this into an endless loop if the
119 variable 'signal_occurred' is not declared 'volatile'.
120 Additionally, recall that:
121 * A signal handler should not modify errno (except if it is a handler
122 for a fatal signal and ends by raising the same signal again, thus
123 provoking the termination of the process). If it invokes a function
124 that may clobber errno, it needs to save and restore the value of
125 errno. */
126 #define _GL_ASYNC_SAFE
127 ])
128 dnl Hint which direction to take regarding cross-compilation guesses:
129 dnl When a user installs a program on a platform they are not intimately
130 dnl familiar with, --enable-cross-guesses=conservative is the appropriate
131 dnl choice. It implements the "If we don't know, assume the worst" principle.
132 dnl However, when an operating system developer (on a platform which is not
133 dnl yet known to gnulib) builds packages for their platform, they want to
134 dnl expose, not hide, possible platform bugs; in this case,
135 dnl --enable-cross-guesses=risky is the appropriate choice.
136 dnl Sets the variables
137 dnl gl_cross_guess_normal (to be used when 'yes' is good and 'no' is bad),
138 dnl gl_cross_guess_inverted (to be used when 'no' is good and 'yes' is bad).
139 AC_ARG_ENABLE([cross-guesses],
140 [AS_HELP_STRING([--enable-cross-guesses={conservative|risky}],
141 [specify policy for cross-compilation guesses])],
142 [if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
143 AC_MSG_WARN([invalid argument supplied to --enable-cross-guesses])
144 enableval=conservative
145 fi
146 gl_cross_guesses="$enableval"],
147 [gl_cross_guesses=conservative])
148 if test $gl_cross_guesses = risky; then
149 gl_cross_guess_normal="guessing yes"
150 gl_cross_guess_inverted="guessing no"
151 else
152 gl_cross_guess_normal="guessing no"
153 gl_cross_guess_inverted="guessing yes"
154 fi
82155 dnl Preparation for running test programs:
83156 dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
84157 dnl to /dev/tty, so they can be redirected to log files. Such diagnostics
213286 AC_SUBST([HAVE_FEATURES_H])
214287 ])
215288
216 # m4_foreach_w
217 # is a backport of autoconf-2.59c's m4_foreach_w.
218 # Remove this macro when we can assume autoconf >= 2.60.
219 m4_ifndef([m4_foreach_w],
220 [m4_define([m4_foreach_w],
221 [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])])
222
223289 # AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH])
224290 # ----------------------------------------------------
225291 # Backport of autoconf-2.63b's macro.
232298 # Modifies the value of the shell variable CC in an attempt to make $CC
233299 # understand ISO C99 source code.
234300 # This is like AC_PROG_CC_C99, except that
235 # - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60,
236301 # - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC
237302 # <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00367.html>,
238303 # but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99
319384 fi
320385 fi
321386 AC_SUBST([RANLIB])
322 ])
323
324 # AC_PROG_MKDIR_P
325 # is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix
326 # for interoperability with automake-1.9.6 from autoconf-2.62.
327 # Remove this macro when we can assume autoconf >= 2.62 or
328 # autoconf >= 2.60 && automake >= 1.10.
329 # AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
330 m4_ifndef([AC_AUTOCONF_VERSION],[
331 m4_ifdef([AC_PROG_MKDIR_P], [
332 dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed.
333 m4_define([AC_PROG_MKDIR_P],
334 m4_defn([AC_PROG_MKDIR_P])[
335 AC_SUBST([MKDIR_P])])], [
336 dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P.
337 AC_DEFUN_ONCE([AC_PROG_MKDIR_P],
338 [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
339 MKDIR_P='$(mkdir_p)'
340 AC_SUBST([MKDIR_P])])])
341387 ])
342388
343389 # AC_C_RESTRICT
372418 nothing if this is not supported. Do not define if restrict is
373419 supported directly. */
374420 #undef restrict
375 /* Work around a bug in Sun C++: it does not support _Restrict or
376 __restrict__, even though the corresponding Sun C compiler ends up with
377 "#define restrict _Restrict" or "#define restrict __restrict__" in the
378 previous line. Perhaps some future version of Sun C++ will work with
379 restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
380 #if defined __SUNPRO_CC && !defined __RESTRICT
421 /* Work around a bug in older versions of Sun C++, which did not
422 #define __restrict__ or support _Restrict or __restrict__
423 even though the corresponding Sun C compiler ended up with
424 "#define restrict _Restrict" or "#define restrict __restrict__"
425 in the previous line. This workaround can be removed once
426 we assume Oracle Developer Studio 12.5 (2016) or later. */
427 #if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__
381428 # define _Restrict
382429 # define __restrict__
383430 #endif])
413460 # AS_VAR_COPY was added in autoconf 2.63b
414461 m4_define_default([AS_VAR_COPY],
415462 [AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])
416
417 # AC_PROG_SED was added in autoconf 2.59b
418 m4_ifndef([AC_PROG_SED],
419 [AC_DEFUN([AC_PROG_SED],
420 [AC_CACHE_CHECK([for a sed that does not truncate output], ac_cv_path_SED,
421 [dnl ac_script should not contain more than 99 commands (for HP-UX sed),
422 dnl but more than about 7000 bytes, to catch a limit in Solaris 8 /usr/ucb/sed.
423 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
424 for ac_i in 1 2 3 4 5 6 7; do
425 ac_script="$ac_script$as_nl$ac_script"
426 done
427 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
428 AS_UNSET([ac_script])
429 if test -z "$SED"; then
430 ac_path_SED_found=false
431 _AS_PATH_WALK([], [
432 for ac_prog in sed gsed; do
433 for ac_exec_ext in '' $ac_executable_extensions; do
434 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
435 AS_EXECUTABLE_P(["$ac_path_SED"]) || continue
436 case `"$ac_path_SED" --version 2>&1` in
437 *GNU*) ac_cv_path_SED=$ac_path_SED ac_path_SED_found=:;;
438 *)
439 ac_count=0
440 _AS_ECHO_N([0123456789]) >conftest.in
441 while :
442 do
443 cat conftest.in conftest.in >conftest.tmp
444 mv conftest.tmp conftest.in
445 cp conftest.in conftest.nl
446 echo >> conftest.nl
447 "$ac_path_SED" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
448 diff conftest.out conftest.nl >/dev/null 2>&1 || break
449 ac_count=`expr $ac_count + 1`
450 if test $ac_count -gt ${ac_path_SED_max-0}; then
451 # Best so far, but keep looking for better
452 ac_cv_path_SED=$ac_path_SED
453 ac_path_SED_max=$ac_count
454 fi
455 test $ac_count -gt 10 && break
456 done
457 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
458 esac
459 $ac_path_SED_found && break 3
460 done
461 done])
462 if test -z "$ac_cv_path_SED"; then
463 AC_ERROR([no acceptable sed could be found in \$PATH])
464 fi
465 else
466 ac_cv_path_SED=$SED
467 fi
468 ])
469 SED="$ac_cv_path_SED"
470 AC_SUBST([SED])dnl
471 rm -f conftest.sed
472 ])
473 ])
00 # DO NOT EDIT! GENERATED AUTOMATICALLY!
1 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
1 # Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 #
33 # This file is free software; you can redistribute it and/or modify
44 # it under the terms of the GNU General Public License as published by
6161 # Code from module inttypes:
6262 # Code from module inttypes-incomplete:
6363 # Code from module inttypes-tests:
64 # Code from module libc-config:
6465 # Code from module limits-h:
6566 # Code from module limits-h-tests:
6667 # Code from module maintainer-makefile:
8889 # Code from module test-framework-sh-tests:
8990 # Code from module unistd:
9091 # Code from module unistd-tests:
92 # Code from module update-copyright:
93 # Code from module update-copyright-tests:
9194 # Code from module useless-if-before-free:
9295 # Code from module valgrind-tests:
9396 # Code from module vc-list-files:
114117 gl_COMMON
115118 gl_source_base='gl'
116119 gl_BYTESWAP
120 AC_REQUIRE([AC_C_RESTRICT])
117121 gl_MD4
118122 AC_REQUIRE([gl_EXTERN_INLINE])
119123 # Autoconf 2.61a.99 and earlier don't support linking a file only
127131 [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
128132 [GNUmakefile=$GNUmakefile])])
129133 gl_INLINE
134 gl___INLINE
130135 gl_LIMITS_H
131136 AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
132137 [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
133138 AC_REQUIRE([AC_PROG_SED])
139 AC_REQUIRE([AC_PROG_GREP])
134140 gl_MULTIARCH
135141 gt_TYPE_SSIZE_T
136142 gl_STDALIGN_H
198204 gl_INTTYPES_INCOMPLETE
199205 AC_REQUIRE([gt_TYPE_WCHAR_T])
200206 AC_REQUIRE([gt_TYPE_WINT_T])
207 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
208 AC_SUBST([abs_aux_dir])
201209 gl_VALGRIND_TESTS
202210 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
203211 AC_SUBST([abs_aux_dir])
294302 # This macro records the list of files which have been installed by
295303 # gnulib-tool and may be removed by future gnulib-tool invocations.
296304 AC_DEFUN([gl_FILE_LIST], [
305 build-aux/update-copyright
297306 build-aux/useless-if-before-free
298307 build-aux/vc-list-files
299308 lib/arg-nonnull.h
300309 lib/byteswap.in.h
301310 lib/c++defs.h
311 lib/cdefs.h
302312 lib/check-version.c
303313 lib/check-version.h
304314 lib/des.c
305315 lib/des.h
316 lib/libc-config.h
306317 lib/limits.in.h
307318 lib/md4.c
308319 lib/md4.h
317328 lib/unistd.in.h
318329 lib/warn-on-use.h
319330 m4/00gnulib.m4
331 m4/__inline.m4
320332 m4/absolute-header.m4
321333 m4/autobuild.m4
322334 m4/byteswap.m4
328340 m4/inttypes-pri.m4
329341 m4/inttypes.m4
330342 m4/limits-h.m4
331 m4/longlong.m4
332343 m4/manywarnings-c++.m4
333344 m4/manywarnings.m4
334345 m4/md4.m4
349360 m4/wchar_h.m4
350361 m4/wchar_t.m4
351362 m4/wint_t.m4
363 m4/zzgnulib.m4
352364 tests/init.sh
353365 tests/macros.h
354366 tests/signature.h
367379 tests/test-strverscmp.c
368380 tests/test-sys_types.c
369381 tests/test-unistd.c
382 tests/test-update-copyright.sh
370383 tests/test-vc-list-files-cvs.sh
371384 tests/test-vc-list-files-git.sh
372385 tests/test-verify-try.c
00 # include_next.m4 serial 24
1 dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
00 # inline.m4 serial 4
1 dnl Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
00 # inttypes-pri.m4 serial 7 (gettext-0.18.2)
1 dnl Copyright (C) 1997-2002, 2006, 2008-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 1997-2002, 2006, 2008-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
0 # inttypes.m4 serial 27
1 dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
0 # inttypes.m4 serial 29
1 dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
2727 dnl corresponding gnulib module is not in use.
2828 gl_WARN_ON_USE_PREPARE([[#include <inttypes.h>
2929 ]], [imaxabs imaxdiv strtoimax strtoumax])
30
31 AC_REQUIRE([AC_C_RESTRICT])
3032 ])
3133
3234 # Ensure that the PRI* and SCN* macros are defined appropriately.
112114
113115 #if $2
114116 #define CONDITION ($3)
115 #elif HAVE_LONG_LONG_INT
117 #else
116118 #define CONDITION ($4)
117 #else
118 #define CONDITION 0
119119 #endif
120120 int test[CONDITION ? 1 : -1];]])],
121121 [gl_cv_test_$1=yes],
00 dnl Check whether limits.h has needed features.
11
2 dnl Copyright 2016-2018 Free Software Foundation, Inc.
2 dnl Copyright 2016-2020 Free Software Foundation, Inc.
33 dnl This file is free software; the Free Software Foundation
44 dnl gives unlimited permission to copy and/or distribute it,
55 dnl with or without modifications, as long as this notice is preserved.
1010 [
1111 gl_CHECK_NEXT_HEADERS([limits.h])
1212
13 AC_CACHE_CHECK([whether limits.h has ULLONG_WIDTH etc.],
13 AC_CACHE_CHECK([whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.],
1414 [gl_cv_header_limits_width],
1515 [AC_COMPILE_IFELSE(
16 [AC_LANG_PROGRAM([[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
17 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
18 #endif
19 #include <limits.h>
20 int ullw = ULLONG_WIDTH;]])],
16 [AC_LANG_PROGRAM(
17 [[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
18 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
19 #endif
20 #include <limits.h>
21 long long llm = LLONG_MAX;
22 int wb = WORD_BIT;
23 int ullw = ULLONG_WIDTH;
24 ]])],
2125 [gl_cv_header_limits_width=yes],
2226 [gl_cv_header_limits_width=no])])
2327 if test "$gl_cv_header_limits_width" = yes; then
+0
-113
gl/m4/longlong.m4 less more
0 # longlong.m4 serial 17
1 dnl Copyright (C) 1999-2007, 2009-2018 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Paul Eggert.
7
8 # Define HAVE_LONG_LONG_INT if 'long long int' works.
9 # This fixes a bug in Autoconf 2.61, and can be faster
10 # than what's in Autoconf 2.62 through 2.68.
11
12 # Note: If the type 'long long int' exists but is only 32 bits large
13 # (as on some very old compilers), HAVE_LONG_LONG_INT will not be
14 # defined. In this case you can treat 'long long int' like 'long int'.
15
16 AC_DEFUN([AC_TYPE_LONG_LONG_INT],
17 [
18 AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
19 AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
20 [ac_cv_type_long_long_int=yes
21 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
22 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
23 if test $ac_cv_type_long_long_int = yes; then
24 dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
25 dnl If cross compiling, assume the bug is not important, since
26 dnl nobody cross compiles for this platform as far as we know.
27 AC_RUN_IFELSE(
28 [AC_LANG_PROGRAM(
29 [[@%:@include <limits.h>
30 @%:@ifndef LLONG_MAX
31 @%:@ define HALF \
32 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
33 @%:@ define LLONG_MAX (HALF - 1 + HALF)
34 @%:@endif]],
35 [[long long int n = 1;
36 int i;
37 for (i = 0; ; i++)
38 {
39 long long int m = n << i;
40 if (m >> i != n)
41 return 1;
42 if (LLONG_MAX / 2 < m)
43 break;
44 }
45 return 0;]])],
46 [],
47 [ac_cv_type_long_long_int=no],
48 [:])
49 fi
50 fi])
51 if test $ac_cv_type_long_long_int = yes; then
52 AC_DEFINE([HAVE_LONG_LONG_INT], [1],
53 [Define to 1 if the system has the type 'long long int'.])
54 fi
55 ])
56
57 # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
58 # This fixes a bug in Autoconf 2.61, and can be faster
59 # than what's in Autoconf 2.62 through 2.68.
60
61 # Note: If the type 'unsigned long long int' exists but is only 32 bits
62 # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
63 # will not be defined. In this case you can treat 'unsigned long long int'
64 # like 'unsigned long int'.
65
66 AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
67 [
68 AC_CACHE_CHECK([for unsigned long long int],
69 [ac_cv_type_unsigned_long_long_int],
70 [ac_cv_type_unsigned_long_long_int=yes
71 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
72 AC_LINK_IFELSE(
73 [_AC_TYPE_LONG_LONG_SNIPPET],
74 [],
75 [ac_cv_type_unsigned_long_long_int=no])
76 fi])
77 if test $ac_cv_type_unsigned_long_long_int = yes; then
78 AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
79 [Define to 1 if the system has the type 'unsigned long long int'.])
80 fi
81 ])
82
83 # Expands to a C program that can be used to test for simultaneous support
84 # of 'long long' and 'unsigned long long'. We don't want to say that
85 # 'long long' is available if 'unsigned long long' is not, or vice versa,
86 # because too many programs rely on the symmetry between signed and unsigned
87 # integer types (excluding 'bool').
88 AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
89 [
90 AC_LANG_PROGRAM(
91 [[/* For now, do not test the preprocessor; as of 2007 there are too many
92 implementations with broken preprocessors. Perhaps this can
93 be revisited in 2012. In the meantime, code should not expect
94 #if to work with literals wider than 32 bits. */
95 /* Test literals. */
96 long long int ll = 9223372036854775807ll;
97 long long int nll = -9223372036854775807LL;
98 unsigned long long int ull = 18446744073709551615ULL;
99 /* Test constant expressions. */
100 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
101 ? 1 : -1)];
102 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
103 ? 1 : -1)];
104 int i = 63;]],
105 [[/* Test availability of runtime routines for shift and division. */
106 long long int llmax = 9223372036854775807ll;
107 unsigned long long int ullmax = 18446744073709551615ull;
108 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
109 | (llmax / ll) | (llmax % ll)
110 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
111 | (ullmax / ull) | (ullmax % ull));]])
112 ])
0 # manywarnings.m4 serial 16
1 dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
0 # manywarnings.m4 serial 18
1 dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
5050
5151 dnl Check if -W -Werror -Wno-missing-field-initializers is supported
5252 dnl with the current $CC $CFLAGS $CPPFLAGS.
53 AC_MSG_CHECKING([whether -Wno-missing-field-initializers is supported])
54 AC_CACHE_VAL([gl_cv_cc_nomfi_supported], [
55 gl_save_CFLAGS="$CFLAGS"
56 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
57 AC_COMPILE_IFELSE(
58 [AC_LANG_PROGRAM([[]], [[]])],
59 [gl_cv_cc_nomfi_supported=yes],
60 [gl_cv_cc_nomfi_supported=no])
61 CFLAGS="$gl_save_CFLAGS"])
62 AC_MSG_RESULT([$gl_cv_cc_nomfi_supported])
53 AC_CACHE_CHECK([whether -Wno-missing-field-initializers is supported],
54 [gl_cv_cc_nomfi_supported],
55 [gl_save_CFLAGS="$CFLAGS"
56 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
57 AC_COMPILE_IFELSE(
58 [AC_LANG_PROGRAM([[]], [[]])],
59 [gl_cv_cc_nomfi_supported=yes],
60 [gl_cv_cc_nomfi_supported=no])
61 CFLAGS="$gl_save_CFLAGS"
62 ])
6363
6464 if test "$gl_cv_cc_nomfi_supported" = yes; then
6565 dnl Now check whether -Wno-missing-field-initializers is needed
6666 dnl for the { 0, } construct.
67 AC_MSG_CHECKING([whether -Wno-missing-field-initializers is needed])
68 AC_CACHE_VAL([gl_cv_cc_nomfi_needed], [
69 gl_save_CFLAGS="$CFLAGS"
70 CFLAGS="$CFLAGS -W -Werror"
71 AC_COMPILE_IFELSE(
72 [AC_LANG_PROGRAM(
73 [[int f (void)
74 {
75 typedef struct { int a; int b; } s_t;
76 s_t s1 = { 0, };
77 return s1.b;
78 }
79 ]],
80 [[]])],
81 [gl_cv_cc_nomfi_needed=no],
82 [gl_cv_cc_nomfi_needed=yes])
83 CFLAGS="$gl_save_CFLAGS"
84 ])
85 AC_MSG_RESULT([$gl_cv_cc_nomfi_needed])
67 AC_CACHE_CHECK([whether -Wno-missing-field-initializers is needed],
68 [gl_cv_cc_nomfi_needed],
69 [gl_save_CFLAGS="$CFLAGS"
70 CFLAGS="$CFLAGS -W -Werror"
71 AC_COMPILE_IFELSE(
72 [AC_LANG_PROGRAM(
73 [[int f (void)
74 {
75 typedef struct { int a; int b; } s_t;
76 s_t s1 = { 0, };
77 return s1.b;
78 }
79 ]],
80 [[]])],
81 [gl_cv_cc_nomfi_needed=no],
82 [gl_cv_cc_nomfi_needed=yes])
83 CFLAGS="$gl_save_CFLAGS"
84 ])
8685 fi
8786
8887 dnl Next, check if -Werror -Wuninitialized is useful with the
8988 dnl user's choice of $CFLAGS; some versions of gcc warn that it
9089 dnl has no effect if -O is not also used
91 AC_MSG_CHECKING([whether -Wuninitialized is supported])
92 AC_CACHE_VAL([gl_cv_cc_uninitialized_supported], [
93 gl_save_CFLAGS="$CFLAGS"
94 CFLAGS="$CFLAGS -Werror -Wuninitialized"
95 AC_COMPILE_IFELSE(
96 [AC_LANG_PROGRAM([[]], [[]])],
97 [gl_cv_cc_uninitialized_supported=yes],
98 [gl_cv_cc_uninitialized_supported=no])
99 CFLAGS="$gl_save_CFLAGS"])
100 AC_MSG_RESULT([$gl_cv_cc_uninitialized_supported])
90 AC_CACHE_CHECK([whether -Wuninitialized is supported],
91 [gl_cv_cc_uninitialized_supported],
92 [gl_save_CFLAGS="$CFLAGS"
93 CFLAGS="$CFLAGS -Werror -Wuninitialized"
94 AC_COMPILE_IFELSE(
95 [AC_LANG_PROGRAM([[]], [[]])],
96 [gl_cv_cc_uninitialized_supported=yes],
97 [gl_cv_cc_uninitialized_supported=no])
98 CFLAGS="$gl_save_CFLAGS"
99 ])
101100
102101 fi
103102
112111 gl_manywarn_set=
113112 for gl_manywarn_item in -fno-common \
114113 -W \
114 -Wabsolute-value \
115115 -Waddress \
116 -Waddress-of-packed-member \
116117 -Waggressive-loop-optimizations \
117118 -Wall \
118 -Wattribute-alias \
119 -Wattribute-warning \
119120 -Wattributes \
120121 -Wbad-function-cast \
121122 -Wbool-compare \
122123 -Wbool-operation \
123124 -Wbuiltin-declaration-mismatch \
124125 -Wbuiltin-macro-redefined \
126 -Wcannot-profile \
125127 -Wcast-align \
126128 -Wcast-align=strict \
127129 -Wcast-function-type \
186188 -Wmissing-field-initializers \
187189 -Wmissing-include-dirs \
188190 -Wmissing-parameter-type \
191 -Wmissing-profile \
189192 -Wmissing-prototypes \
190193 -Wmultichar \
191194 -Wmultistatement-macros \
292295 AC_MSG_RESULT([$gl_alloc_max])
293296 gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$gl_alloc_max"
294297 gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
298 gl_manywarn_set="$gl_manywarn_set -Wattribute-alias=2"
295299 gl_manywarn_set="$gl_manywarn_set -Wformat-overflow=2"
296300 gl_manywarn_set="$gl_manywarn_set -Wformat-truncation=2"
297301 gl_manywarn_set="$gl_manywarn_set -Wimplicit-fallthrough=5"
00 # md4.m4 serial 7
1 dnl Copyright (C) 2002-2006, 2008-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2002-2006, 2008-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
00 # multiarch.m4 serial 7
1 dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
00 # off_t.m4 serial 1
1 dnl Copyright (C) 2012-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2012-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
00 # ssize_t.m4 serial 5 (gettext-0.18.2)
1 dnl Copyright (C) 2001-2003, 2006, 2010-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2001-2003, 2006, 2010-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
00 # Check for stdalign.h that conforms to C11.
11
2 dnl Copyright 2011-2018 Free Software Foundation, Inc.
2 dnl Copyright 2011-2020 Free Software Foundation, Inc.
33 dnl This file is free software; the Free Software Foundation
44 dnl gives unlimited permission to copy and/or distribute it,
55 dnl with or without modifications, as long as this notice is preserved.
00 # Check for stdbool.h that conforms to C99.
11
2 dnl Copyright (C) 2002-2006, 2009-2018 Free Software Foundation, Inc.
2 dnl Copyright (C) 2002-2006, 2009-2020 Free Software Foundation, Inc.
33 dnl This file is free software; the Free Software Foundation
44 dnl gives unlimited permission to copy and/or distribute it,
55 dnl with or without modifications, as long as this notice is preserved.
66
7 #serial 7
7 #serial 8
88
99 # Prepare for substituting <stdbool.h> if it is not supported.
1010
1111 AC_DEFUN([AM_STDBOOL_H],
1212 [
1313 AC_REQUIRE([AC_CHECK_HEADER_STDBOOL])
14 AC_REQUIRE([AC_CANONICAL_HOST])
1415
15 # Define two additional variables used in the Makefile substitution.
16
16 dnl On some platforms, <stdbool.h> does not exist or does not conform to C99.
17 dnl On Solaris 10 with CC=cc CXX=CC, <stdbool.h> exists but is not usable
18 dnl in C++ mode (and no <cstdbool> exists). In this case, we use our
19 dnl replacement, also in C mode (for binary compatibility between C and C++).
1720 if test "$ac_cv_header_stdbool_h" = yes; then
18 STDBOOL_H=''
21 case "$host_os" in
22 solaris*)
23 if test -z "$GCC"; then
24 STDBOOL_H='stdbool.h'
25 else
26 STDBOOL_H=''
27 fi
28 ;;
29 *)
30 STDBOOL_H=''
31 ;;
32 esac
1933 else
2034 STDBOOL_H='stdbool.h'
2135 fi
00 dnl A placeholder for <stddef.h>, for platforms that have issues.
1 # stddef_h.m4 serial 5
2 dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
1 # stddef_h.m4 serial 6
2 dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
33 dnl This file is free software; the Free Software Foundation
44 dnl gives unlimited permission to copy and/or distribute it,
55 dnl with or without modifications, as long as this notice is preserved.
99 AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
1010 AC_REQUIRE([gt_TYPE_WCHAR_T])
1111 STDDEF_H=
12 AC_CHECK_TYPE([max_align_t], [], [HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h],
13 [[#include <stddef.h>
14 ]])
12
13 dnl Test whether the type max_align_t exists and whether its alignment
14 dnl "is as great as is supported by the implementation in all contexts".
15 AC_CACHE_CHECK([for good max_align_t],
16 [gl_cv_type_max_align_t],
17 [AC_COMPILE_IFELSE(
18 [AC_LANG_PROGRAM(
19 [[#include <stddef.h>
20 unsigned int s = sizeof (max_align_t);
21 #if defined __GNUC__ || defined __IBM__ALIGNOF__
22 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
23 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
24 #endif
25 ]])],
26 [gl_cv_type_max_align_t=yes],
27 [gl_cv_type_max_align_t=no])
28 ])
29 if test $gl_cv_type_max_align_t = no; then
30 HAVE_MAX_ALIGN_T=0
31 STDDEF_H=stddef.h
32 fi
33
1534 if test $gt_cv_c_wchar_t = no; then
1635 HAVE_WCHAR_T=0
1736 STDDEF_H=stddef.h
1837 fi
38
1939 AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions],
2040 [gl_cv_decl_null_works],
2141 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
2747 REPLACE_NULL=1
2848 STDDEF_H=stddef.h
2949 fi
50
3051 AC_SUBST([STDDEF_H])
3152 AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"])
3253 if test -n "$STDDEF_H"; then
0 # stdint.m4 serial 52
1 dnl Copyright (C) 2001-2018 Free Software Foundation, Inc.
0 # stdint.m4 serial 54
1 dnl Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
66 dnl From Paul Eggert and Bruno Haible.
77 dnl Test whether <stdint.h> is supported or must be substituted.
88
9 AC_PREREQ([2.61])
10
911 AC_DEFUN_ONCE([gl_STDINT_H],
1012 [
1113 AC_PREREQ([2.59])dnl
1416 AC_REQUIRE([gl_LIMITS_H])
1517 AC_REQUIRE([gt_TYPE_WINT_T])
1618
17 dnl Check for long long int and unsigned long long int.
18 AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
19 if test $ac_cv_type_long_long_int = yes; then
20 HAVE_LONG_LONG_INT=1
21 else
22 HAVE_LONG_LONG_INT=0
23 fi
24 AC_SUBST([HAVE_LONG_LONG_INT])
25 AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
26 if test $ac_cv_type_unsigned_long_long_int = yes; then
27 HAVE_UNSIGNED_LONG_LONG_INT=1
28 else
29 HAVE_UNSIGNED_LONG_LONG_INT=0
30 fi
31 AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT])
19 dnl For backward compatibility. Some packages may still be testing these
20 dnl macros.
21 AC_DEFINE([HAVE_LONG_LONG_INT], [1],
22 [Define to 1 if the system has the type 'long long int'.])
23 AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
24 [Define to 1 if the system has the type 'unsigned long long int'.])
3225
3326 dnl Check for <wchar.h>, in the same way as gl_WCHAR_H does.
3427 AC_CHECK_HEADERS_ONCE([wchar.h])
539532 BITSIZEOF_WINT_T=32
540533 fi
541534 ])
542
543 dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
544 dnl Remove this when we can assume autoconf >= 2.61.
545 m4_ifdef([AC_COMPUTE_INT], [], [
546 AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
547 ])
00 # Configure a GNU-like replacement for <string.h>.
11
2 # Copyright (C) 2007-2018 Free Software Foundation, Inc.
2 # Copyright (C) 2007-2020 Free Software Foundation, Inc.
33 # This file is free software; the Free Software Foundation
44 # gives unlimited permission to copy and/or distribute it,
55 # with or without modifications, as long as this notice is preserved.
66
7 # serial 22
7 # serial 23
88
99 # Written by Paul Eggert.
1010
1717
1818 AC_DEFUN([gl_HEADER_STRING_H_BODY],
1919 [
20 AC_REQUIRE([AC_C_RESTRICT])
2120 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
2221 gl_NEXT_HEADERS([string.h])
2322
2928 [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
3029 strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
3130 strerror_r strsignal strverscmp])
31
32 AC_REQUIRE([AC_C_RESTRICT])
3233 ])
3334
3435 AC_DEFUN([gl_STRING_MODULE_INDICATOR],
00 # strverscmp.m4 serial 8
1 dnl Copyright (C) 2002, 2005-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2002, 2005-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
00 # sys_types_h.m4 serial 9
1 dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
0 # unistd_h.m4 serial 74
1 dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
0 # unistd_h.m4 serial 78
1 dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
4040 # include <io.h>
4141 # endif
4242 #endif
43 ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat
44 fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups
45 gethostname getlogin getlogin_r getpagesize getpass
43 ]], [access chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir
44 fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize
45 getgroups gethostname getlogin getlogin_r getpagesize getpass
4646 getusershell setusershell endusershell
4747 group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
4848 readlink readlinkat rmdir sethostname sleep symlink symlinkat
4949 truncate ttyname_r unlink unlinkat usleep])
50
51 AC_REQUIRE([AC_C_RESTRICT])
5052 ])
5153
5254 AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
6062
6163 AC_DEFUN([gl_UNISTD_H_DEFAULTS],
6264 [
65 GNULIB_ACCESS=0; AC_SUBST([GNULIB_ACCESS])
6366 GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR])
6467 GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
6568 GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE])
69 GNULIB_COPY_FILE_RANGE=0; AC_SUBST([GNULIB_COPY_FILE_RANGE])
6670 GNULIB_DUP=0; AC_SUBST([GNULIB_DUP])
6771 GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
6872 GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3])
8185 GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME])
8286 GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN])
8387 GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
88 GNULIB_GETOPT_POSIX=0; AC_SUBST([GNULIB_GETOPT_POSIX])
8489 GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
8590 GNULIB_GETPASS=0; AC_SUBST([GNULIB_GETPASS])
8691 GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL])
112117 GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE])
113118 dnl Assume proper GNU behavior unless another module says otherwise.
114119 HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN])
120 HAVE_COPY_FILE_RANGE=1; AC_SUBST([HAVE_COPY_FILE_RANGE])
115121 HAVE_DUP2=1; AC_SUBST([HAVE_DUP2])
116122 HAVE_DUP3=1; AC_SUBST([HAVE_DUP3])
117123 HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS])
156162 HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R])
157163 HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
158164 HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
165 REPLACE_ACCESS=0; AC_SUBST([REPLACE_ACCESS])
159166 REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
160167 REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE])
161168 REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
00 # valgrind-tests.m4 serial 4
1 dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
00 # warn-on-use.m4 serial 6
1 dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2010-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
00 # warnings.m4 serial 14
1 dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
00 dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
11
2 dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
2 dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
33 dnl This file is free software; the Free Software Foundation
44 dnl gives unlimited permission to copy and/or distribute it,
55 dnl with or without modifications, as long as this notice is preserved.
66
77 dnl Written by Eric Blake.
88
9 # wchar_h.m4 serial 43
9 # wchar_h.m4 serial 45
1010
1111 AC_DEFUN([gl_WCHAR_H],
1212 [
5656 wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr
5757 wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth wcsftime
5858 ])
59
60 AC_REQUIRE([AC_C_RESTRICT])
5961 ])
6062
6163 dnl Check whether <wchar.h> is usable at all.
236238 REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
237239 REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH])
238240 REPLACE_WCSFTIME=0; AC_SUBST([REPLACE_WCSFTIME])
239 ])
241 REPLACE_WCSTOK=0; AC_SUBST([REPLACE_WCSTOK])
242 ])
00 # wchar_t.m4 serial 4 (gettext-0.18.2)
1 dnl Copyright (C) 2002-2003, 2008-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2002-2003, 2008-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
00 # wint_t.m4 serial 7
1 dnl Copyright (C) 2003, 2007-2018 Free Software Foundation, Inc.
1 dnl Copyright (C) 2003, 2007-2020 Free Software Foundation, Inc.
22 dnl This file is free software; the Free Software Foundation
33 dnl gives unlimited permission to copy and/or distribute it,
44 dnl with or without modifications, as long as this notice is preserved.
0 # zzgnulib.m4 serial 1
1 dnl Copyright (C) 2020 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl This file must be named something that sorts after all other
7 dnl package- or gnulib-provided .m4 files - at least for those packages
8 dnl that redefine AC_PROG_CC.
9
10 dnl Redefine AC_PROG_CC so that it ends with invocations of gl_COMPILER_CLANG
11 dnl and gl_COMPILER_PREPARE_CHECK_DECL.
12 m4_define([AC_PROG_CC],
13 m4_defn([AC_PROG_CC])[
14 gl_COMPILER_CLANG
15 gl_COMPILER_PREPARE_CHECK_DECL
16 ])
17
18 # gl_ZZGNULIB
19 # -----------
20 # Witness macro that this file has been included. Needed to force
21 # Automake to include this file after all other gnulib .m4 files.
22 AC_DEFUN([gl_ZZGNULIB])
00 /* Functions to compute MD4 message digest of files or memory blocks.
11 according to the definition of MD4 in RFC 1320 from April 1992.
2 Copyright (C) 1995-1997, 1999-2003, 2005-2006, 2008-2018 Free Software
2 Copyright (C) 1995-1997, 1999-2003, 2005-2006, 2008-2020 Free Software
33 Foundation, Inc.
44
55 This program is free software; you can redistribute it and/or modify it
00 /* Declarations of functions and data types used for MD4 sum
11 library functions.
2 Copyright (C) 2000-2001, 2003, 2005, 2008-2018 Free Software Foundation,
2 Copyright (C) 2000-2001, 2003, 2005, 2008-2020 Free Software Foundation,
33 Inc.
44
55 This program is free software; you can redistribute it and/or modify it
6262 in first 16 bytes following RESBUF. The result is always in little
6363 endian byte order, so that a byte-wise output yields to the wanted
6464 ASCII representation of the message digest. */
65 extern void *md4_finish_ctx (struct md4_ctx *ctx, void *resbuf);
65 extern void *md4_finish_ctx (struct md4_ctx *ctx, void *restrict resbuf);
6666
6767
6868 /* Put result from CTX in first 16 bytes following RESBUF. The result is
6969 always in little endian byte order, so that a byte-wise output yields
7070 to the wanted ASCII representation of the message digest. */
71 extern void *md4_read_ctx (const struct md4_ctx *ctx, void *resbuf);
71 extern void *md4_read_ctx (const struct md4_ctx *ctx, void *restrict resbuf);
7272
7373
7474 /* Compute MD4 message digest for bytes read from STREAM. The
8080 result is always in little endian byte order, so that a byte-wise
8181 output yields to the wanted ASCII representation of the message
8282 digest. */
83 extern void *md4_buffer (const char *buffer, size_t len, void *resblock);
83 extern void *md4_buffer (const char *buffer, size_t len,
84 void *restrict resblock);
8485
8586 # ifdef __cplusplus
8687 }
00 /* A substitute for ISO C11 <stdalign.h>.
11
2 Copyright 2011-2018 Free Software Foundation, Inc.
2 Copyright 2011-2020 Free Software Foundation, Inc.
33
44 This program is free software; you can redistribute it and/or modify
55 it under the terms of the GNU Lesser General Public License as published by
101101 # define _Alignas(a) alignas (a)
102102 # elif ((defined __APPLE__ && defined __MACH__ \
103103 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
104 : __GNUC__) \
104 : __GNUC__ && !defined __ibmxl__) \
105105 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
106106 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__)
107107 # define _Alignas(a) __attribute__ ((__aligned__ (a)))
0 /* Copyright (C) 2001-2003, 2006-2018 Free Software Foundation, Inc.
0 /* Copyright (C) 2001-2003, 2006-2020 Free Software Foundation, Inc.
11 Written by Bruno Haible <haible@clisp.cons.org>, 2001.
22
33 This program is free software; you can redistribute it and/or modify
00 /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
11
2 Copyright (C) 2009-2018 Free Software Foundation, Inc.
2 Copyright (C) 2009-2020 Free Software Foundation, Inc.
33
44 This program is free software; you can redistribute it and/or modify
55 it under the terms of the GNU Lesser General Public License as published by
1818
1919 /*
2020 * POSIX 2008 <stddef.h> for platforms that have issues.
21 * <http://www.opengroup.org/susv3xbd/stddef.h.html>
21 * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html>
2222 */
2323
2424 #if __GNUC__ >= 3
8282
8383 /* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is
8484 a hack in case the configure-time test was done with g++ even though
85 we are currently compiling with gcc. */
86 #if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T)
87 # if !GNULIB_defined_max_align_t
85 we are currently compiling with gcc.
86 On MSVC, max_align_t is defined only in C++ mode, after <cstddef> was
87 included. Its definition is good since it has an alignment of 8 (on x86
88 and x86_64). */
89 #if defined _MSC_VER && defined __cplusplus
90 # include <cstddef>
91 #else
92 # if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T)
93 # if !GNULIB_defined_max_align_t
8894 /* On the x86, the maximum storage alignment of double, long, etc. is 4,
8995 but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
9096 and the C11 standard allows this. Work around this problem by
9197 using __alignof__ (which returns 8 for double) rather than _Alignof
9298 (which returns 4), and align each union member accordingly. */
93 # ifdef __GNUC__
94 # define _GL_STDDEF_ALIGNAS(type) \
95 __attribute__ ((__aligned__ (__alignof__ (type))))
96 # else
97 # define _GL_STDDEF_ALIGNAS(type) /* */
98 # endif
99 # ifdef __GNUC__
100 # define _GL_STDDEF_ALIGNAS(type) \
101 __attribute__ ((__aligned__ (__alignof__ (type))))
102 # else
103 # define _GL_STDDEF_ALIGNAS(type) /* */
104 # endif
99105 typedef union
100106 {
101107 char *__p _GL_STDDEF_ALIGNAS (char *);
103109 long double __ld _GL_STDDEF_ALIGNAS (long double);
104110 long int __i _GL_STDDEF_ALIGNAS (long int);
105111 } rpl_max_align_t;
106 # define max_align_t rpl_max_align_t
107 # define GNULIB_defined_max_align_t 1
112 # define max_align_t rpl_max_align_t
113 # define GNULIB_defined_max_align_t 1
114 # endif
108115 # endif
109116 #endif
110117
0 /* Copyright (C) 2001-2002, 2004-2018 Free Software Foundation, Inc.
0 /* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc.
11 Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
22 This file is part of gnulib.
33
1616
1717 /*
1818 * ISO C 99 <stdint.h> for platforms that lack it.
19 * <http://www.opengroup.org/susv3xbd/stdint.h.html>
19 * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdint.h.html>
2020 */
2121
2222 #ifndef _@GUARD_PREFIX@_STDINT_H
187187 typedef __int64 gl_int64_t;
188188 # define int64_t gl_int64_t
189189 # define GL_INT64_T
190 # elif @HAVE_LONG_LONG_INT@
190 # else
191191 # undef int64_t
192192 typedef long long int gl_int64_t;
193193 # define int64_t gl_int64_t
208208 typedef unsigned __int64 gl_uint64_t;
209209 # define uint64_t gl_uint64_t
210210 # define GL_UINT64_T
211 # elif @HAVE_UNSIGNED_LONG_LONG_INT@
211 # else
212212 # undef uint64_t
213213 typedef unsigned long long int gl_uint64_t;
214214 # define uint64_t gl_uint64_t
298298
299299 /* 7.18.1.4. Integer types capable of holding object pointers */
300300
301 /* kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own
301 /* kLIBC's <stdint.h> defines _INTPTR_T_DECLARED and needs its own
302302 definitions of intptr_t and uintptr_t (which use int and unsigned)
303 to avoid clashes with declarations of system functions like sbrk. */
304 # ifndef _INTPTR_T_DECLARED
305 # undef intptr_t
306 # undef uintptr_t
303 to avoid clashes with declarations of system functions like sbrk.
304 Similarly, mingw 5.22 <crtdefs.h> defines _INTPTR_T_DEFINED and
305 _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and
306 uintptr_t to avoid conflicting declarations of system functions like
307 _findclose in <io.h>. */
308 # if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \
309 || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED))
310 # undef intptr_t
311 # undef uintptr_t
312 # ifdef _WIN64
313 typedef long long int gl_intptr_t;
314 typedef unsigned long long int gl_uintptr_t;
315 # else
307316 typedef long int gl_intptr_t;
308317 typedef unsigned long int gl_uintptr_t;
309 # define intptr_t gl_intptr_t
310 # define uintptr_t gl_uintptr_t
318 # endif
319 # define intptr_t gl_intptr_t
320 # define uintptr_t gl_uintptr_t
311321 # endif
312322
313323 /* 7.18.1.5. Greatest-width integer types */
322332 # ifndef INTMAX_MAX
323333 # undef INTMAX_C
324334 # undef intmax_t
325 # if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
335 # if LONG_MAX >> 30 == 1
326336 typedef long long int gl_intmax_t;
327337 # define intmax_t gl_intmax_t
328338 # elif defined GL_INT64_T
336346 # ifndef UINTMAX_MAX
337347 # undef UINTMAX_C
338348 # undef uintmax_t
339 # if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
349 # if ULONG_MAX >> 31 == 1
340350 typedef unsigned long long int gl_uintmax_t;
341351 # define uintmax_t gl_uintmax_t
342352 # elif defined GL_UINT64_T
484494 # undef INTPTR_MIN
485495 # undef INTPTR_MAX
486496 # undef UINTPTR_MAX
487 # define INTPTR_MIN LONG_MIN
488 # define INTPTR_MAX LONG_MAX
489 # define UINTPTR_MAX ULONG_MAX
497 # ifdef _WIN64
498 # define INTPTR_MIN LLONG_MIN
499 # define INTPTR_MAX LLONG_MAX
500 # define UINTPTR_MAX ULLONG_MAX
501 # else
502 # define INTPTR_MIN LONG_MIN
503 # define INTPTR_MAX LONG_MAX
504 # define UINTPTR_MAX ULONG_MAX
505 # endif
490506
491507 /* 7.18.2.5. Limits of greatest-width integer types */
492508
585601 _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
586602
587603 /* wint_t limits */
588 # undef WINT_MIN
589 # undef WINT_MAX
590 # if @HAVE_SIGNED_WINT_T@
591 # define WINT_MIN \
592 _STDINT_SIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
593 # else
594 # define WINT_MIN \
595 _STDINT_UNSIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
596 # endif
597 # define WINT_MAX \
598 _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
604 /* If gnulib's <wchar.h> or <wctype.h> overrides wint_t, @WINT_T_SUFFIX@ is not
605 accurate, therefore use the definitions from above. */
606 # if !@GNULIB_OVERRIDES_WINT_T@
607 # undef WINT_MIN
608 # undef WINT_MAX
609 # if @HAVE_SIGNED_WINT_T@
610 # define WINT_MIN \
611 _STDINT_SIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
612 # else
613 # define WINT_MIN \
614 _STDINT_UNSIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
615 # endif
616 # define WINT_MAX \
617 _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
618 # endif
599619
600620 /* 7.18.4. Macros for integer constants */
601621
626646 # define INT64_C(x) x##L
627647 # elif defined _MSC_VER
628648 # define INT64_C(x) x##i64
629 # elif @HAVE_LONG_LONG_INT@
649 # else
630650 # define INT64_C(x) x##LL
631651 # endif
632652 # if ULONG_MAX >> 31 >> 31 >> 1 == 1
633653 # define UINT64_C(x) x##UL
634654 # elif defined _MSC_VER
635655 # define UINT64_C(x) x##ui64
636 # elif @HAVE_UNSIGNED_LONG_LONG_INT@
656 # else
637657 # define UINT64_C(x) x##ULL
638658 # endif
639659
640660 /* 7.18.4.2. Macros for greatest-width integer constants */
641661
642662 # ifndef INTMAX_C
643 # if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
663 # if LONG_MAX >> 30 == 1
644664 # define INTMAX_C(x) x##LL
645665 # elif defined GL_INT64_T
646666 # define INTMAX_C(x) INT64_C(x)
650670 # endif
651671
652672 # ifndef UINTMAX_C
653 # if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
673 # if ULONG_MAX >> 31 == 1
654674 # define UINTMAX_C(x) x##ULL
655675 # elif defined GL_UINT64_T
656676 # define UINTMAX_C(x) UINT64_C(x)
00 /* A GNU-like <string.h>.
11
2 Copyright (C) 1995-1996, 2001-2018 Free Software Foundation, Inc.
2 Copyright (C) 1995-1996, 2001-2020 Free Software Foundation, Inc.
33
44 This program is free software; you can redistribute it and/or modify
55 it under the terms of the GNU Lesser General Public License as published by
148148 _GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n));
149149 _GL_CXXALIASWARN1 (memchr, void const *,
150150 (void const *__s, int __c, size_t __n));
151 # else
151 # elif __GLIBC__ >= 2
152152 _GL_CXXALIASWARN (memchr);
153153 # endif
154154 #elif defined GNULIB_POSIXCHECK
410410 # undef strncat
411411 # define strncat rpl_strncat
412412 # endif
413 _GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n)
414 _GL_ARG_NONNULL ((1, 2)));
415 _GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n));
416 # else
417 _GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n));
418 # endif
413 _GL_FUNCDECL_RPL (strncat, char *,
414 (char *restrict dest, const char *restrict src, size_t n)
415 _GL_ARG_NONNULL ((1, 2)));
416 _GL_CXXALIAS_RPL (strncat, char *,
417 (char *restrict dest, const char *restrict src, size_t n));
418 # else
419 _GL_CXXALIAS_SYS (strncat, char *,
420 (char *restrict dest, const char *restrict src, size_t n));
421 # endif
422 # if __GLIBC__ >= 2
419423 _GL_CXXALIASWARN (strncat);
424 # endif
420425 #elif defined GNULIB_POSIXCHECK
421426 # undef strncat
422427 # if HAVE_RAW_DECL_STRNCAT
511516 _GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept));
512517 _GL_CXXALIASWARN1 (strpbrk, char const *,
513518 (char const *__s, char const *__accept));
514 # else
519 # elif __GLIBC__ >= 2
515520 _GL_CXXALIASWARN (strpbrk);
516521 # endif
517522 # if defined GNULIB_POSIXCHECK
613618 _GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle));
614619 _GL_CXXALIASWARN1 (strstr, const char *,
615620 (const char *haystack, const char *needle));
616 # else
621 # elif __GLIBC__ >= 2
617622 _GL_CXXALIASWARN (strstr);
618623 # endif
619624 #elif defined GNULIB_POSIXCHECK
692697 This is a variant of strtok() that is multithread-safe.
693698
694699 For the POSIX documentation for this function, see:
695 http://www.opengroup.org/susv3xsh/strtok.html
700 https://pubs.opengroup.org/onlinepubs/9699919799/functions/strtok.html
696701
697702 Caveat: It modifies the original string.
698703 Caveat: These functions cannot be used on constant strings.
963968 Caveat: The identity of the delimiting character is lost.
964969
965970 See also mbssep(). */
966 _GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr)
971 _GL_EXTERN_C char * mbstok_r (char *restrict string, const char *delim,
972 char **save_ptr)
967973 _GL_ARG_NONNULL ((2, 3));
968974 #endif
969975
979985 # else
980986 _GL_CXXALIAS_SYS (strerror, char *, (int));
981987 # endif
988 # if __GLIBC__ >= 2
982989 _GL_CXXALIASWARN (strerror);
990 # endif
983991 #elif defined GNULIB_POSIXCHECK
984992 # undef strerror
985993 /* Assume strerror is always declared. */
00 /* Compare strings while treating digits characters numerically.
1 Copyright (C) 1997-2018 Free Software Foundation, Inc.
1 Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
44
1616 License along with the GNU C Library; if not, see
1717 <https://www.gnu.org/licenses/>. */
1818
19 #if !_LIBC
20 # include <config.h>
19 #ifndef _LIBC
20 # include <libc-config.h>
21 # define __strverscmp strverscmp
2122 #endif
2223
24 #include <stdint.h>
2325 #include <string.h>
2426 #include <ctype.h>
2527
3436 #define CMP 2
3537 #define LEN 3
3638
37 #ifndef weak_alias
38 # define __strverscmp strverscmp
39 #endif
4039
4140 /* Compare S1 and S2 as strings holding indices/version numbers,
4241 returning less than, equal to or greater than zero if S1 is less than,
4847 {
4948 const unsigned char *p1 = (const unsigned char *) s1;
5049 const unsigned char *p2 = (const unsigned char *) s2;
51 unsigned char c1, c2;
52 int state;
53 int diff;
5450
5551 /* Symbol(s) 0 [1-9] others
5652 Transition (10) 0 (01) d (00) x */
57 static const unsigned char next_state[] =
53 static const uint_least8_t next_state[] =
5854 {
5955 /* state x d 0 */
6056 /* S_N */ S_N, S_I, S_Z,
6359 /* S_Z */ S_N, S_F, S_Z
6460 };
6561
66 static const signed char result_type[] =
62 static const int_least8_t result_type[] =
6763 {
6864 /* state x/x x/d x/0 d/x d/d d/0 0/x 0/d 0/0 */
6965
7672 if (p1 == p2)
7773 return 0;
7874
79 c1 = *p1++;
80 c2 = *p2++;
75 unsigned char c1 = *p1++;
76 unsigned char c2 = *p2++;
8177 /* Hint: '0' is a digit too. */
82 state = S_N + ((c1 == '0') + (isdigit (c1) != 0));
78 int state = S_N + ((c1 == '0') + (isdigit (c1) != 0));
8379
80 int diff;
8481 while ((diff = c1 - c2) == 0)
8582 {
8683 if (c1 == '\0')
87 return diff;
84 return diff;
8885
8986 state = next_state[state];
9087 c1 = *p1++;
9592 state = result_type[state * 3 + (((c2 == '0') + (isdigit (c2) != 0)))];
9693
9794 switch (state)
98 {
95 {
9996 case CMP:
10097 return diff;
10198
10299 case LEN:
103100 while (isdigit (*p1++))
104 if (!isdigit (*p2++))
105 return 1;
101 if (!isdigit (*p2++))
102 return 1;
106103
107104 return isdigit (*p2) ? -1 : diff;
108105
109106 default:
110107 return state;
111 }
108 }
112109 }
113 #ifdef weak_alias
114110 libc_hidden_def (__strverscmp)
115111 weak_alias (__strverscmp, strverscmp)
116 #endif
00 /* Provide a more complete sys/types.h.
11
2 Copyright (C) 2011-2018 Free Software Foundation, Inc.
2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
33
44 This program is free software; you can redistribute it and/or modify
55 it under the terms of the GNU Lesser General Public License as published by
00 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
11 ## Process this file with automake to produce Makefile.in.
2 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
2 # Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 #
44 # This file is free software; you can redistribute it and/or modify
55 # it under the terms of the GNU General Public License as published by
2121 #
2222 # Generated by gnulib-tool.
2323
24 AUTOMAKE_OPTIONS = 1.9.6 foreign
24 AUTOMAKE_OPTIONS = 1.11 foreign
2525
2626 SUBDIRS = .
2727 TESTS =
113113 -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
114114 -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
115115 -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
116 -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
117 -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
118116 -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
119117 -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
120118 -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
266264 EXTRA_DIST += test-unistd.c
267265
268266 ## end gnulib module unistd-tests
267
268 ## begin gnulib module update-copyright-tests
269
270 TESTS += test-update-copyright.sh
271 TESTS_ENVIRONMENT += abs_aux_dir='$(abs_aux_dir)'
272 EXTRA_DIST += test-update-copyright.sh
273
274 ## end gnulib module update-copyright-tests
269275
270276 ## begin gnulib module vc-list-files-tests
271277
415421 -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
416422 -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
417423 -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \
424 -e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \
418425 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
419426 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
420427 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
0 # Makefile.in generated by automake 1.15 from Makefile.am.
0 # Makefile.in generated by automake 1.16.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2018 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
1313
1414 @SET_MAKE@
1515
16 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
16 # Copyright (C) 2002-2020 Free Software Foundation, Inc.
1717 #
1818 # This file is free software; you can redistribute it and/or modify
1919 # it under the terms of the GNU General Public License as published by
117117 test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \
118118 test-stdint$(EXEEXT) test-string$(EXEEXT) \
119119 test-strverscmp$(EXEEXT) test-sys_types$(EXEEXT) test-init.sh \
120 test-unistd$(EXEEXT) test-vc-list-files-git.sh \
121 test-vc-list-files-cvs.sh test-verify$(EXEEXT) test-verify.sh \
122 test-wchar$(EXEEXT)
120 test-unistd$(EXEEXT) test-update-copyright.sh \
121 test-vc-list-files-git.sh test-vc-list-files-cvs.sh \
122 test-verify$(EXEEXT) test-verify.sh test-wchar$(EXEEXT)
123123 XFAIL_TESTS =
124124 noinst_PROGRAMS =
125125 check_PROGRAMS = test-byteswap$(EXEEXT) test-des$(EXEEXT) \
133133 subdir = gl/tests
134134 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
135135 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \
136 $(top_srcdir)/gl/m4/__inline.m4 \
136137 $(top_srcdir)/gl/m4/absolute-header.m4 \
137138 $(top_srcdir)/gl/m4/autobuild.m4 \
138139 $(top_srcdir)/gl/m4/byteswap.m4 \
145146 $(top_srcdir)/gl/m4/inttypes-pri.m4 \
146147 $(top_srcdir)/gl/m4/inttypes.m4 \
147148 $(top_srcdir)/gl/m4/limits-h.m4 \
148 $(top_srcdir)/gl/m4/longlong.m4 \
149149 $(top_srcdir)/gl/m4/manywarnings.m4 $(top_srcdir)/gl/m4/md4.m4 \
150150 $(top_srcdir)/gl/m4/multiarch.m4 $(top_srcdir)/gl/m4/off_t.m4 \
151151 $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdalign.m4 \
158158 $(top_srcdir)/gl/m4/warn-on-use.m4 \
159159 $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \
160160 $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wint_t.m4 \
161 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
162 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
163 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
161 $(top_srcdir)/gl/m4/zzgnulib.m4 $(top_srcdir)/m4/libtool.m4 \
162 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
163 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
164 $(top_srcdir)/configure.ac
164165 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
165166 $(ACLOCAL_M4)
166167 DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
169170 CONFIG_HEADER = $(top_builddir)/config.h
170171 CONFIG_CLEAN_FILES =
171172 CONFIG_CLEAN_VPATH_FILES =
173 PROGRAMS = $(noinst_PROGRAMS)
172174 LIBRARIES = $(noinst_LIBRARIES)
173175 AM_V_AR = $(am__v_AR_@AM_V@)
174176 am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
178180 am__DEPENDENCIES_1 =
179181 am_libtests_a_OBJECTS = dummy.$(OBJEXT)
180182 libtests_a_OBJECTS = $(am_libtests_a_OBJECTS)
181 PROGRAMS = $(noinst_PROGRAMS)
182183 test_byteswap_SOURCES = test-byteswap.c
183184 test_byteswap_OBJECTS = test-byteswap.$(OBJEXT)
184185 test_byteswap_LDADD = $(LDADD)
282283 am__v_at_1 =
283284 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
284285 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
285 am__depfiles_maybe = depfiles
286 am__maybe_remake_depfiles = depfiles
287 am__depfiles_remade = ./$(DEPDIR)/dummy.Po \
288 ./$(DEPDIR)/test-byteswap.Po ./$(DEPDIR)/test-des.Po \
289 ./$(DEPDIR)/test-intprops.Po ./$(DEPDIR)/test-inttypes.Po \
290 ./$(DEPDIR)/test-limits-h.Po ./$(DEPDIR)/test-md4.Po \
291 ./$(DEPDIR)/test-stdalign.Po ./$(DEPDIR)/test-stdbool.Po \
292 ./$(DEPDIR)/test-stddef.Po ./$(DEPDIR)/test-stdint.Po \
293 ./$(DEPDIR)/test-string.Po ./$(DEPDIR)/test-strverscmp.Po \
294 ./$(DEPDIR)/test-sys_types.Po ./$(DEPDIR)/test-unistd.Po \
295 ./$(DEPDIR)/test-verify-try.Po ./$(DEPDIR)/test-verify.Po \
296 ./$(DEPDIR)/test-wchar.Po
286297 am__mv = mv -f
287298 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
288299 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
335346 $(RECURSIVE_CLEAN_TARGETS) \
336347 $(am__extra_recursive_targets)
337348 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
338 check recheck distdir
349 check recheck distdir distdir-am
339350 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
340351 # Read a list of newline-separated strings from the standard input,
341352 # and print each of them once, without duplicates. Input order is
623634 EGREP = @EGREP@
624635 EXEEXT = @EXEEXT@
625636 FGREP = @FGREP@
637 GNULIB_ACCESS = @GNULIB_ACCESS@
626638 GNULIB_BTOWC = @GNULIB_BTOWC@
627639 GNULIB_CHDIR = @GNULIB_CHDIR@
628640 GNULIB_CHOWN = @GNULIB_CHOWN@
629641 GNULIB_CLOSE = @GNULIB_CLOSE@
642 GNULIB_COPY_FILE_RANGE = @GNULIB_COPY_FILE_RANGE@
630643 GNULIB_DUP = @GNULIB_DUP@
631644 GNULIB_DUP2 = @GNULIB_DUP2@
632645 GNULIB_DUP3 = @GNULIB_DUP3@
648661 GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
649662 GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
650663 GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
664 GNULIB_GETOPT_POSIX = @GNULIB_GETOPT_POSIX@
651665 GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
652666 GNULIB_GETPASS = @GNULIB_GETPASS@
653667 GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
760774 HAVE_BTOWC = @HAVE_BTOWC@
761775 HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
762776 HAVE_CHOWN = @HAVE_CHOWN@
777 HAVE_COPY_FILE_RANGE = @HAVE_COPY_FILE_RANGE@
763778 HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
764779 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
765780 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
811826 HAVE_LCHOWN = @HAVE_LCHOWN@
812827 HAVE_LINK = @HAVE_LINK@
813828 HAVE_LINKAT = @HAVE_LINKAT@
814 HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
815829 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
816830 HAVE_MBRLEN = @HAVE_MBRLEN@
817831 HAVE_MBRTOWC = @HAVE_MBRTOWC@
850864 HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
851865 HAVE_UNISTD_H = @HAVE_UNISTD_H@
852866 HAVE_UNLINKAT = @HAVE_UNLINKAT@
853 HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
854867 HAVE_USLEEP = @HAVE_USLEEP@
855868 HAVE_WCHAR_H = @HAVE_WCHAR_H@
856869 HAVE_WCHAR_T = @HAVE_WCHAR_T@
950963 PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
951964 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
952965 RANLIB = @RANLIB@
966 REPLACE_ACCESS = @REPLACE_ACCESS@
953967 REPLACE_BTOWC = @REPLACE_BTOWC@
954968 REPLACE_CHOWN = @REPLACE_CHOWN@
955969 REPLACE_CLOSE = @REPLACE_CLOSE@
10111025 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
10121026 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
10131027 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
1028 REPLACE_WCSTOK = @REPLACE_WCSTOK@
10141029 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
10151030 REPLACE_WCTOB = @REPLACE_WCTOB@
10161031 REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
10961111 top_build_prefix = @top_build_prefix@
10971112 top_builddir = @top_builddir@
10981113 top_srcdir = @top_srcdir@
1099 AUTOMAKE_OPTIONS = 1.9.6 foreign
1114 AUTOMAKE_OPTIONS = 1.11 foreign
11001115 SUBDIRS = .
11011116 TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \
1102 abs_aux_dir='$(abs_aux_dir)' MAKE='$(MAKE)'
1117 abs_aux_dir='$(abs_aux_dir)' abs_aux_dir='$(abs_aux_dir)' \
1118 MAKE='$(MAKE)'
11031119 noinst_HEADERS =
11041120 noinst_LIBRARIES =
11051121 check_LIBRARIES = libtests.a
11091125 test-stdalign.c macros.h test-stdbool.c test-stddef.c \
11101126 test-stdint.c test-string.c test-strverscmp.c signature.h \
11111127 macros.h test-sys_types.c init.sh test-init.sh test-unistd.c \
1112 test-vc-list-files-git.sh test-vc-list-files-cvs.sh verify.h \
1113 test-verify.c test-verify-try.c test-verify.sh wchar.in.h \
1114 test-wchar.c
1128 test-update-copyright.sh test-vc-list-files-git.sh \
1129 test-vc-list-files-cvs.sh verify.h test-verify.c \
1130 test-verify-try.c test-verify.sh wchar.in.h test-wchar.c
11151131 BUILT_SOURCES = inttypes.h wchar.h
11161132 SUFFIXES =
11171133
11731189 *config.status*) \
11741190 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
11751191 *) \
1176 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
1177 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
1192 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
1193 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
11781194 esac;
11791195
11801196 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
11851201 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
11861202 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
11871203 $(am__aclocal_m4_deps):
1188
1189 clean-checkLIBRARIES:
1190 -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES)
1191
1192 clean-noinstLIBRARIES:
1193 -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
1194
1195 libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES)
1196 $(AM_V_at)-rm -f libtests.a
1197 $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD)
1198 $(AM_V_at)$(RANLIB) libtests.a
11991204
12001205 clean-checkPROGRAMS:
12011206 @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
12151220 echo " rm -f" $$list; \
12161221 rm -f $$list
12171222
1223 clean-checkLIBRARIES:
1224 -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES)
1225
1226 clean-noinstLIBRARIES:
1227 -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
1228
1229 libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES)
1230 $(AM_V_at)-rm -f libtests.a
1231 $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD)
1232 $(AM_V_at)$(RANLIB) libtests.a
1233
12181234 test-byteswap$(EXEEXT): $(test_byteswap_OBJECTS) $(test_byteswap_DEPENDENCIES) $(EXTRA_test_byteswap_DEPENDENCIES)
12191235 @rm -f test-byteswap$(EXEEXT)
12201236 $(AM_V_CCLD)$(LINK) $(test_byteswap_OBJECTS) $(test_byteswap_LDADD) $(LIBS)
12891305 distclean-compile:
12901306 -rm -f *.tab.c
12911307
1292 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Po@am__quote@
1293 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-byteswap.Po@am__quote@
1294 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-des.Po@am__quote@
1295 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-intprops.Po@am__quote@
1296 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inttypes.Po@am__quote@
1297 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-limits-h.Po@am__quote@
1298 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-md4.Po@am__quote@
1299 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdalign.Po@am__quote@
1300 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdbool.Po@am__quote@
1301 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stddef.Po@am__quote@
1302 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdint.Po@am__quote@
1303 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-string.Po@am__quote@
1304 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strverscmp.Po@am__quote@
1305 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_types.Po@am__quote@
1306 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unistd.Po@am__quote@
1307 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-verify-try.Po@am__quote@
1308 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-verify.Po@am__quote@
1309 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wchar.Po@am__quote@
1308 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Po@am__quote@ # am--include-marker
1309 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-byteswap.Po@am__quote@ # am--include-marker
1310 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-des.Po@am__quote@ # am--include-marker
1311 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-intprops.Po@am__quote@ # am--include-marker
1312 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inttypes.Po@am__quote@ # am--include-marker
1313 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-limits-h.Po@am__quote@ # am--include-marker
1314 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-md4.Po@am__quote@ # am--include-marker
1315 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdalign.Po@am__quote@ # am--include-marker
1316 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdbool.Po@am__quote@ # am--include-marker
1317 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stddef.Po@am__quote@ # am--include-marker
1318 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdint.Po@am__quote@ # am--include-marker
1319 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-string.Po@am__quote@ # am--include-marker
1320 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strverscmp.Po@am__quote@ # am--include-marker
1321 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_types.Po@am__quote@ # am--include-marker
1322 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unistd.Po@am__quote@ # am--include-marker
1323 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-verify-try.Po@am__quote@ # am--include-marker
1324 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-verify.Po@am__quote@ # am--include-marker
1325 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wchar.Po@am__quote@ # am--include-marker
1326
1327 $(am__depfiles_remade):
1328 @$(MKDIR_P) $(@D)
1329 @echo '# dummy' >$@-t && $(am__mv) $@-t $@
1330
1331 am--depfiles: $(am__depfiles_remade)
13101332
13111333 .c.o:
13121334 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
15541576 fi; \
15551577 $$success || exit 1
15561578
1557 check-TESTS:
1579 check-TESTS: $(check_PROGRAMS) $(check_LIBRARIES)
15581580 @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
15591581 @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
15601582 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
15641586 log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
15651587 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
15661588 exit $$?;
1567 recheck: all $(check_LIBRARIES) $(check_PROGRAMS)
1589 recheck: all $(check_PROGRAMS) $(check_LIBRARIES)
15681590 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
15691591 @set +e; $(am__set_TESTS_bases); \
15701592 bases=`for i in $$bases; do echo $$i; done \
16801702 --log-file $$b.log --trs-file $$b.trs \
16811703 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
16821704 "$$tst" $(AM_TESTS_FD_REDIRECT)
1705 test-update-copyright.sh.log: test-update-copyright.sh
1706 @p='test-update-copyright.sh'; \
1707 b='test-update-copyright.sh'; \
1708 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
1709 --log-file $$b.log --trs-file $$b.trs \
1710 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1711 "$$tst" $(AM_TESTS_FD_REDIRECT)
16831712 test-vc-list-files-git.sh.log: test-vc-list-files-git.sh
16841713 @p='test-vc-list-files-git.sh'; \
16851714 b='test-vc-list-files-git.sh'; \
17301759 @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
17311760 @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
17321761
1733 distdir: $(DISTFILES)
1762 distdir: $(BUILT_SOURCES)
1763 $(MAKE) $(AM_MAKEFLAGS) distdir-am
1764
1765 distdir-am: $(DISTFILES)
17341766 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
17351767 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
17361768 list='$(DISTFILES)'; \
17861818 fi; \
17871819 done
17881820 check-am: all-am
1789 $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS)
1821 $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_LIBRARIES)
17901822 $(MAKE) $(AM_MAKEFLAGS) check-TESTS
17911823 check: $(BUILT_SOURCES)
17921824 $(MAKE) $(AM_MAKEFLAGS) check-recursive
1793 all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS)
1825 all-am: Makefile $(PROGRAMS) $(LIBRARIES) $(HEADERS)
17941826 installdirs: installdirs-recursive
17951827 installdirs-am:
17961828 install: $(BUILT_SOURCES)
18391871 clean-noinstPROGRAMS mostlyclean-am
18401872
18411873 distclean: distclean-recursive
1842 -rm -rf ./$(DEPDIR)
1874 -rm -f ./$(DEPDIR)/dummy.Po
1875 -rm -f ./$(DEPDIR)/test-byteswap.Po
1876 -rm -f ./$(DEPDIR)/test-des.Po
1877 -rm -f ./$(DEPDIR)/test-intprops.Po
1878 -rm -f ./$(DEPDIR)/test-inttypes.Po
1879 -rm -f ./$(DEPDIR)/test-limits-h.Po
1880 -rm -f ./$(DEPDIR)/test-md4.Po
1881 -rm -f ./$(DEPDIR)/test-stdalign.Po
1882 -rm -f ./$(DEPDIR)/test-stdbool.Po
1883 -rm -f ./$(DEPDIR)/test-stddef.Po
1884 -rm -f ./$(DEPDIR)/test-stdint.Po
1885 -rm -f ./$(DEPDIR)/test-string.Po
1886 -rm -f ./$(DEPDIR)/test-strverscmp.Po
1887 -rm -f ./$(DEPDIR)/test-sys_types.Po
1888 -rm -f ./$(DEPDIR)/test-unistd.Po
1889 -rm -f ./$(DEPDIR)/test-verify-try.Po
1890 -rm -f ./$(DEPDIR)/test-verify.Po
1891 -rm -f ./$(DEPDIR)/test-wchar.Po
18431892 -rm -f Makefile
18441893 distclean-am: clean-am distclean-compile distclean-generic \
18451894 distclean-tags
18851934 installcheck-am:
18861935
18871936 maintainer-clean: maintainer-clean-recursive
1888 -rm -rf ./$(DEPDIR)
1937 -rm -f ./$(DEPDIR)/dummy.Po
1938 -rm -f ./$(DEPDIR)/test-byteswap.Po
1939 -rm -f ./$(DEPDIR)/test-des.Po
1940 -rm -f ./$(DEPDIR)/test-intprops.Po
1941 -rm -f ./$(DEPDIR)/test-inttypes.Po
1942 -rm -f ./$(DEPDIR)/test-limits-h.Po
1943 -rm -f ./$(DEPDIR)/test-md4.Po
1944 -rm -f ./$(DEPDIR)/test-stdalign.Po
1945 -rm -f ./$(DEPDIR)/test-stdbool.Po
1946 -rm -f ./$(DEPDIR)/test-stddef.Po
1947 -rm -f ./$(DEPDIR)/test-stdint.Po
1948 -rm -f ./$(DEPDIR)/test-string.Po
1949 -rm -f ./$(DEPDIR)/test-strverscmp.Po
1950 -rm -f ./$(DEPDIR)/test-sys_types.Po
1951 -rm -f ./$(DEPDIR)/test-unistd.Po
1952 -rm -f ./$(DEPDIR)/test-verify-try.Po
1953 -rm -f ./$(DEPDIR)/test-verify.Po
1954 -rm -f ./$(DEPDIR)/test-wchar.Po
18891955 -rm -f Makefile
18901956 maintainer-clean-am: distclean-am maintainer-clean-generic
18911957
19071973 .MAKE: $(am__recursive_targets) all check check-am install install-am \
19081974 install-strip
19091975
1910 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
1911 check-TESTS check-am clean clean-checkLIBRARIES \
1912 clean-checkPROGRAMS clean-generic clean-libtool clean-local \
1913 clean-noinstLIBRARIES clean-noinstPROGRAMS cscopelist-am ctags \
1914 ctags-am distclean distclean-compile distclean-generic \
1915 distclean-libtool distclean-tags distdir dvi dvi-am html \
1916 html-am info info-am install install-am install-data \
1917 install-data-am install-dvi install-dvi-am install-exec \
1918 install-exec-am install-html install-html-am install-info \
1919 install-info-am install-man install-pdf install-pdf-am \
1920 install-ps install-ps-am install-strip installcheck \
1921 installcheck-am installdirs installdirs-am maintainer-clean \
1922 maintainer-clean-generic mostlyclean mostlyclean-compile \
1923 mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
1924 pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am
1976 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
1977 am--depfiles check check-TESTS check-am clean \
1978 clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \
1979 clean-libtool clean-local clean-noinstLIBRARIES \
1980 clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
1981 distclean-compile distclean-generic distclean-libtool \
1982 distclean-tags distdir dvi dvi-am html html-am info info-am \
1983 install install-am install-data install-data-am install-dvi \
1984 install-dvi-am install-exec install-exec-am install-html \
1985 install-html-am install-info install-info-am install-man \
1986 install-pdf install-pdf-am install-ps install-ps-am \
1987 install-strip installcheck installcheck-am installdirs \
1988 installdirs-am maintainer-clean maintainer-clean-generic \
1989 mostlyclean mostlyclean-compile mostlyclean-generic \
1990 mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am \
1991 recheck tags tags-am uninstall uninstall-am
19251992
19261993 .PRECIOUS: Makefile
19271994
19382005 -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
19392006 -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
19402007 -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
1941 -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
1942 -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
19432008 -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
19442009 -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
19452010 -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
20742139 -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
20752140 -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
20762141 -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \
2142 -e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \
20772143 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
20782144 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
20792145 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
00 /* A C macro for declaring that specific arguments must not be NULL.
1 Copyright (C) 2009-2018 Free Software Foundation, Inc.
1 Copyright (C) 2009-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify it
44 under the terms of the GNU General Public License as published
00 /* C++ compatible function declaration macros.
1 Copyright (C) 2010-2018 Free Software Foundation, Inc.
1 Copyright (C) 2010-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify it
44 under the terms of the GNU General Public License as published
300300 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
301301 "The symbol ::" #func " refers to the system function. " \
302302 "Use " #namespace "::" #func " instead.")
303 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
304 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
305 extern __typeof__ (func) func
306303 # else
307304 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
308305 _GL_EXTERN_C int _gl_cxxalias_dummy
00 /* A dummy file, to prevent empty libraries from breaking builds.
1 Copyright (C) 2004, 2007, 2009-2018 Free Software Foundation, Inc.
1 Copyright (C) 2004, 2007, 2009-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
00 # source this file; set up for tests
11
2 # Copyright (C) 2009-2018 Free Software Foundation, Inc.
2 # Copyright (C) 2009-2020 Free Software Foundation, Inc.
33
44 # This program is free software: you can redistribute it and/or modify
55 # it under the terms of the GNU General Public License as published by
5959 # 4. Finally
6060 # $ exit
6161
62 # =============================================================================
63 # Elementary diagnostics
64
6265 ME_=`expr "./$0" : '.*/\(.*\)$'`
6366
6467 # Prepare PATH_SEPARATOR.
108111 fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; }
109112 framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }
110113
111 # This is used to simplify checking of the return value
112 # which is useful when ensuring a command fails as desired.
113 # I.e., just doing `command ... &&fail=1` will not catch
114 # a segfault in command for example. With this helper you
115 # instead check an explicit exit code like
116 # returns_ 1 command ... || fail
117 returns_ () {
118 # Disable tracing so it doesn't interfere with stderr of the wrapped command
119 { set +x; } 2>/dev/null
120
121 local exp_exit="$1"
122 shift
123 "$@"
124 test $? -eq $exp_exit && ret_=0 || ret_=1
125
126 if test "$VERBOSE" = yes && test "$gl_set_x_corrupts_stderr_" = false; then
127 set -x
128 fi
129 { return $ret_; } 2>/dev/null
130 }
114 # =============================================================================
115 # Ensure the shell supports modern syntax.
131116
132117 # Sanitize this shell to POSIX mode, if possible.
133118 DUALCASE=1; export DUALCASE
143128 fi
144129
145130 # We require $(...) support unconditionally.
131 # We require that the printf built-in work correctly regarding octal escapes;
132 # this eliminates /bin/sh on AIX 7.2.
146133 # We require non-surprising "local" semantics (this eliminates dash).
147134 # This takes the admittedly draconian step of eliminating dash, because the
148135 # assignment tab=$(printf '\t') works fine, yet preceding it with "local "
172159 # ? - not ok
173160 gl_shell_test_script_='
174161 test $(echo y) = y || exit 1
162 LC_ALL=en_US.UTF-8 printf "\\351" 2>/dev/null \
163 | LC_ALL=C tr "\\351" x | LC_ALL=C grep "^x$" > /dev/null \
164 || exit 1
165 printf "\\351" 2>/dev/null \
166 | LC_ALL=C tr "\\351" x | LC_ALL=C grep "^x$" > /dev/null \
167 || exit 1
175168 f_local_() { local v=1; }; f_local_ || exit 1
176169 f_dash_local_fail_() { local t=$(printf " 1"); }; f_dash_local_fail_
177170 score_=10
254247 fi
255248 fi
256249
250 # =============================================================================
251 # Ensure the shell behaves reasonably.
252
257253 # If this is bash, turn off all aliases.
258254 test -n "$BASH_VERSION" && unalias -a
259255
264260 # widespread than that for hyphen-containing function names.
265261 test -n "$EXEEXT" && test -n "$BASH_VERSION" && shopt -s expand_aliases
266262
267 # Enable glibc's malloc-perturbing option.
268 # This is useful for exposing code that depends on the fact that
269 # malloc-related functions often return memory that is mostly zeroed.
270 # If you have the time and cycles, use valgrind to do an even better job.
271 : ${MALLOC_PERTURB_=87}
272 export MALLOC_PERTURB_
263 # =============================================================================
264 # Creating a temporary directory (needed by the core test framework)
265
266 # Create a temporary directory, much like mktemp -d does.
267 # Written by Jim Meyering.
268 #
269 # Usage: mktempd_ /tmp phoey.XXXXXXXXXX
270 #
271 # First, try to use the mktemp program.
272 # Failing that, we'll roll our own mktemp-like function:
273 # - try to get random bytes from /dev/urandom
274 # - failing that, generate output from a combination of quickly-varying
275 # sources and gzip. Ignore non-varying gzip header, and extract
276 # "random" bits from there.
277 # - given those bits, map to file-name bytes using tr, and try to create
278 # the desired directory.
279 # - make only $MAX_TRIES_ attempts
280
281 # Helper function. Print $N pseudo-random bytes from a-zA-Z0-9.
282 rand_bytes_ ()
283 {
284 n_=$1
285
286 # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first?
287 # But if they have openssl, they probably have mktemp, too.
288
289 chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
290 dev_rand_=/dev/urandom
291 if test -r "$dev_rand_"; then
292 # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194.
293 dd ibs=$n_ count=1 if=$dev_rand_ 2>/dev/null \
294 | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
295 return
296 fi
297
298 n_plus_50_=`expr $n_ + 50`
299 cmds_='date; date +%N; free; who -a; w; ps auxww; ps -ef'
300 data_=` (eval "$cmds_") 2>&1 | gzip `
301
302 # Ensure that $data_ has length at least 50+$n_
303 while :; do
304 len_=`echo "$data_"|wc -c`
305 test $n_plus_50_ -le $len_ && break;
306 data_=` (echo "$data_"; eval "$cmds_") 2>&1 | gzip `
307 done
308
309 echo "$data_" \
310 | dd bs=1 skip=50 count=$n_ 2>/dev/null \
311 | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
312 }
313
314 mktempd_ ()
315 {
316 case $# in
317 2);;
318 *) fail_ "Usage: mktempd_ DIR TEMPLATE";;
319 esac
320
321 destdir_=$1
322 template_=$2
323
324 MAX_TRIES_=4
325
326 # Disallow any trailing slash on specified destdir:
327 # it would subvert the post-mktemp "case"-based destdir test.
328 case $destdir_ in
329 / | //) destdir_slash_=$destdir;;
330 */) fail_ "invalid destination dir: remove trailing slash(es)";;
331 *) destdir_slash_=$destdir_/;;
332 esac
333
334 case $template_ in
335 *XXXX) ;;
336 *) fail_ \
337 "invalid template: $template_ (must have a suffix of at least 4 X's)";;
338 esac
339
340 # First, try to use mktemp.
341 d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` &&
342
343 # The resulting name must be in the specified directory.
344 case $d in "$destdir_slash_"*) :;; *) false;; esac &&
345
346 # It must have created the directory.
347 test -d "$d" &&
348
349 # It must have 0700 permissions. Handle sticky "S" bits.
350 perms=`ls -dgo "$d" 2>/dev/null` &&
351 case $perms in drwx--[-S]---*) :;; *) false;; esac && {
352 echo "$d"
353 return
354 }
355
356 # If we reach this point, we'll have to create a directory manually.
357
358 # Get a copy of the template without its suffix of X's.
359 base_template_=`echo "$template_"|sed 's/XX*$//'`
360
361 # Calculate how many X's we've just removed.
362 template_length_=`echo "$template_" | wc -c`
363 nx_=`echo "$base_template_" | wc -c`
364 nx_=`expr $template_length_ - $nx_`
365
366 err_=
367 i_=1
368 while :; do
369 X_=`rand_bytes_ $nx_`
370 candidate_dir_="$destdir_slash_$base_template_$X_"
371 err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \
372 && { echo "$candidate_dir_"; return; }
373 test $MAX_TRIES_ -le $i_ && break;
374 i_=`expr $i_ + 1`
375 done
376 fail_ "$err_"
377 }
378
379 # =============================================================================
380 # Core test framework
381
382 # An arbitrary prefix to help distinguish test directories.
383 testdir_prefix_ () { printf gt; }
384
385 # Set up the environment for the test to run in.
386 setup_ ()
387 {
388 if test "$VERBOSE" = yes; then
389 # Test whether set -x may cause the selected shell to corrupt an
390 # application's stderr. Many do, including zsh-4.3.10 and the /bin/sh
391 # from SunOS 5.11, OpenBSD 4.7 and Irix 5.x and 6.5.
392 # If enabling verbose output this way would cause trouble, simply
393 # issue a warning and refrain.
394 if $gl_set_x_corrupts_stderr_; then
395 warn_ "using SHELL=$SHELL with 'set -x' corrupts stderr"
396 else
397 set -x
398 fi
399 fi
400
401 initial_cwd_=$PWD
402
403 # Create and enter the temporary directory.
404 pfx_=`testdir_prefix_`
405 test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
406 || fail_ "failed to create temporary directory in $initial_cwd_"
407 cd "$test_dir_" || fail_ "failed to cd to temporary directory"
408 # Set variables srcdir, builddir, for the convenience of the test.
409 case $srcdir in
410 /* | ?:*) ;;
411 *) srcdir="../$srcdir" ;;
412 esac
413 builddir=".."
414 export srcdir builddir
415
416 # As autoconf-generated configure scripts do, ensure that IFS
417 # is defined initially, so that saving and restoring $IFS works.
418 gl_init_sh_nl_='
419 '
420 IFS=" "" $gl_init_sh_nl_"
421
422 # This trap statement, along with a trap on 0 below, ensure that the
423 # temporary directory, $test_dir_, is removed upon exit as well as
424 # upon receipt of any of the listed signals.
425 for sig_ in 1 2 3 13 15; do
426 eval "trap 'Exit $(expr $sig_ + 128)' $sig_"
427 done
428 }
273429
274430 # This is a stub function that is run upon trap (upon regular exit and
275431 # interrupt). Override it with a per-test function, e.g., to unmount
276432 # a partition, or to undo any other global state changes.
277433 cleanup_ () { :; }
278
279 # Emit a header similar to that from diff -u; Print the simulated "diff"
280 # command so that the order of arguments is clear. Don't bother with @@ lines.
281 emit_diff_u_header_ ()
282 {
283 printf '%s\n' "diff -u $*" \
284 "--- $1 1970-01-01" \
285 "+++ $2 1970-01-01"
286 }
287
288 # Arrange not to let diff or cmp operate on /dev/null,
289 # since on some systems (at least OSF/1 5.1), that doesn't work.
290 # When there are not two arguments, or no argument is /dev/null, return 2.
291 # When one argument is /dev/null and the other is not empty,
292 # cat the nonempty file to stderr and return 1.
293 # Otherwise, return 0.
294 compare_dev_null_ ()
295 {
296 test $# = 2 || return 2
297
298 if test "x$1" = x/dev/null; then
299 test -s "$2" || return 0
300 emit_diff_u_header_ "$@"; sed 's/^/+/' "$2"
301 return 1
302 fi
303
304 if test "x$2" = x/dev/null; then
305 test -s "$1" || return 0
306 emit_diff_u_header_ "$@"; sed 's/^/-/' "$1"
307 return 1
308 fi
309
310 return 2
311 }
312
313 for diff_opt_ in -u -U3 -c '' no; do
314 test "$diff_opt_" != no &&
315 diff_out_=`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" < /dev/null` &&
316 break
317 done
318 if test "$diff_opt_" != no; then
319 if test -z "$diff_out_"; then
320 compare_ () { diff $diff_opt_ "$@"; }
321 else
322 compare_ ()
323 {
324 # If no differences were found, AIX and HP-UX 'diff' produce output
325 # like "No differences encountered". Hide this output.
326 diff $diff_opt_ "$@" > diff.out
327 diff_status_=$?
328 test $diff_status_ -eq 0 || cat diff.out || diff_status_=2
329 rm -f diff.out || diff_status_=2
330 return $diff_status_
331 }
332 fi
333 elif cmp -s /dev/null /dev/null 2>/dev/null; then
334 compare_ () { cmp -s "$@"; }
335 else
336 compare_ () { cmp "$@"; }
337 fi
338
339 # Usage: compare EXPECTED ACTUAL
340 #
341 # Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more.
342 # Otherwise, propagate $? to caller: any diffs have already been printed.
343 compare ()
344 {
345 # This looks like it can be factored to use a simple "case $?"
346 # after unchecked compare_dev_null_ invocation, but that would
347 # fail in a "set -e" environment.
348 if compare_dev_null_ "$@"; then
349 return 0
350 else
351 case $? in
352 1) return 1;;
353 *) compare_ "$@";;
354 esac
355 fi
356 }
357
358 # An arbitrary prefix to help distinguish test directories.
359 testdir_prefix_ () { printf gt; }
360434
361435 # Run the user-overridable cleanup_ function, remove the temporary
362436 # directory and exit with the incoming value of $?.
375449 fi
376450 exit $__st
377451 }
452
453 # =============================================================================
454 # Prepending directories to PATH
378455
379456 # Given a directory name, DIR, if every entry in it that matches *.exe
380457 # contains only the specified bytes (see the case stmt below), then print
457534 export PATH
458535 }
459536
460 setup_ ()
461 {
462 if test "$VERBOSE" = yes; then
463 # Test whether set -x may cause the selected shell to corrupt an
464 # application's stderr. Many do, including zsh-4.3.10 and the /bin/sh
465 # from SunOS 5.11, OpenBSD 4.7 and Irix 5.x and 6.5.
466 # If enabling verbose output this way would cause trouble, simply
467 # issue a warning and refrain.
468 if $gl_set_x_corrupts_stderr_; then
469 warn_ "using SHELL=$SHELL with 'set -x' corrupts stderr"
470 else
471 set -x
472 fi
473 fi
474
475 initial_cwd_=$PWD
476
477 pfx_=`testdir_prefix_`
478 test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
479 || fail_ "failed to create temporary directory in $initial_cwd_"
480 cd "$test_dir_" || fail_ "failed to cd to temporary directory"
481
482 # As autoconf-generated configure scripts do, ensure that IFS
483 # is defined initially, so that saving and restoring $IFS works.
484 gl_init_sh_nl_='
485 '
486 IFS=" "" $gl_init_sh_nl_"
487
488 # This trap statement, along with a trap on 0 below, ensure that the
489 # temporary directory, $test_dir_, is removed upon exit as well as
490 # upon receipt of any of the listed signals.
491 for sig_ in 1 2 3 13 15; do
492 eval "trap 'Exit $(expr $sig_ + 128)' $sig_"
493 done
494 }
495
496 # Create a temporary directory, much like mktemp -d does.
497 # Written by Jim Meyering.
498 #
499 # Usage: mktempd_ /tmp phoey.XXXXXXXXXX
500 #
501 # First, try to use the mktemp program.
502 # Failing that, we'll roll our own mktemp-like function:
503 # - try to get random bytes from /dev/urandom
504 # - failing that, generate output from a combination of quickly-varying
505 # sources and gzip. Ignore non-varying gzip header, and extract
506 # "random" bits from there.
507 # - given those bits, map to file-name bytes using tr, and try to create
508 # the desired directory.
509 # - make only $MAX_TRIES_ attempts
510
511 # Helper function. Print $N pseudo-random bytes from a-zA-Z0-9.
512 rand_bytes_ ()
513 {
514 n_=$1
515
516 # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first?
517 # But if they have openssl, they probably have mktemp, too.
518
519 chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
520 dev_rand_=/dev/urandom
521 if test -r "$dev_rand_"; then
522 # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194.
523 dd ibs=$n_ count=1 if=$dev_rand_ 2>/dev/null \
524 | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
525 return
526 fi
527
528 n_plus_50_=`expr $n_ + 50`
529 cmds_='date; date +%N; free; who -a; w; ps auxww; ps -ef'
530 data_=` (eval "$cmds_") 2>&1 | gzip `
531
532 # Ensure that $data_ has length at least 50+$n_
533 while :; do
534 len_=`echo "$data_"|wc -c`
535 test $n_plus_50_ -le $len_ && break;
536 data_=` (echo "$data_"; eval "$cmds_") 2>&1 | gzip `
537 done
538
539 echo "$data_" \
540 | dd bs=1 skip=50 count=$n_ 2>/dev/null \
541 | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
542 }
543
544 mktempd_ ()
545 {
546 case $# in
547 2);;
548 *) fail_ "Usage: mktempd_ DIR TEMPLATE";;
549 esac
550
551 destdir_=$1
552 template_=$2
553
554 MAX_TRIES_=4
555
556 # Disallow any trailing slash on specified destdir:
557 # it would subvert the post-mktemp "case"-based destdir test.
558 case $destdir_ in
559 / | //) destdir_slash_=$destdir;;
560 */) fail_ "invalid destination dir: remove trailing slash(es)";;
561 *) destdir_slash_=$destdir_/;;
562 esac
563
564 case $template_ in
565 *XXXX) ;;
566 *) fail_ \
567 "invalid template: $template_ (must have a suffix of at least 4 X's)";;
568 esac
569
570 # First, try to use mktemp.
571 d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` &&
572
573 # The resulting name must be in the specified directory.
574 case $d in "$destdir_slash_"*) :;; *) false;; esac &&
575
576 # It must have created the directory.
577 test -d "$d" &&
578
579 # It must have 0700 permissions. Handle sticky "S" bits.
580 perms=`ls -dgo "$d" 2>/dev/null` &&
581 case $perms in drwx--[-S]---*) :;; *) false;; esac && {
582 echo "$d"
583 return
584 }
585
586 # If we reach this point, we'll have to create a directory manually.
587
588 # Get a copy of the template without its suffix of X's.
589 base_template_=`echo "$template_"|sed 's/XX*$//'`
590
591 # Calculate how many X's we've just removed.
592 template_length_=`echo "$template_" | wc -c`
593 nx_=`echo "$base_template_" | wc -c`
594 nx_=`expr $template_length_ - $nx_`
595
596 err_=
597 i_=1
598 while :; do
599 X_=`rand_bytes_ $nx_`
600 candidate_dir_="$destdir_slash_$base_template_$X_"
601 err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \
602 && { echo "$candidate_dir_"; return; }
603 test $MAX_TRIES_ -le $i_ && break;
604 i_=`expr $i_ + 1`
605 done
606 fail_ "$err_"
607 }
537 # =============================================================================
538 # Convenience environment variables for the tests
539
540 # -----------------------------------------------------------------------------
541
542 # Enable glibc's malloc-perturbing option.
543 # This is useful for exposing code that depends on the fact that
544 # malloc-related functions often return memory that is mostly zeroed.
545 # If you have the time and cycles, use valgrind to do an even better job.
546 : ${MALLOC_PERTURB_=87}
547 export MALLOC_PERTURB_
548
549 # -----------------------------------------------------------------------------
550
551 # The interpreter for Bourne-shell scripts.
552 # No special standards compatibility requirements.
553 # Some environments, such as Android, don't have /bin/sh.
554 if test -f /bin/sh$EXEEXT; then
555 BOURNE_SHELL=/bin/sh
556 else
557 BOURNE_SHELL=sh
558 fi
559
560 # =============================================================================
561 # Convenience functions for the tests
562
563 # -----------------------------------------------------------------------------
564 # Return value checking
565
566 # This is used to simplify checking of the return value
567 # which is useful when ensuring a command fails as desired.
568 # I.e., just doing `command ... &&fail=1` will not catch
569 # a segfault in command for example. With this helper you
570 # instead check an explicit exit code like
571 # returns_ 1 command ... || fail
572 returns_ () {
573 # Disable tracing so it doesn't interfere with stderr of the wrapped command
574 { set +x; } 2>/dev/null
575
576 local exp_exit="$1"
577 shift
578 "$@"
579 test $? -eq $exp_exit && ret_=0 || ret_=1
580
581 if test "$VERBOSE" = yes && test "$gl_set_x_corrupts_stderr_" = false; then
582 set -x
583 fi
584 { return $ret_; } 2>/dev/null
585 }
586
587 # -----------------------------------------------------------------------------
588 # Text file comparison
589
590 # Emit a header similar to that from diff -u; Print the simulated "diff"
591 # command so that the order of arguments is clear. Don't bother with @@ lines.
592 emit_diff_u_header_ ()
593 {
594 printf '%s\n' "diff -u $*" \
595 "--- $1 1970-01-01" \
596 "+++ $2 1970-01-01"
597 }
598
599 # Arrange not to let diff or cmp operate on /dev/null,
600 # since on some systems (at least OSF/1 5.1), that doesn't work.
601 # When there are not two arguments, or no argument is /dev/null, return 2.
602 # When one argument is /dev/null and the other is not empty,
603 # cat the nonempty file to stderr and return 1.
604 # Otherwise, return 0.
605 compare_dev_null_ ()
606 {
607 test $# = 2 || return 2
608
609 if test "x$1" = x/dev/null; then
610 test -s "$2" || return 0
611 emit_diff_u_header_ "$@"; sed 's/^/+/' "$2"
612 return 1
613 fi
614
615 if test "x$2" = x/dev/null; then
616 test -s "$1" || return 0
617 emit_diff_u_header_ "$@"; sed 's/^/-/' "$1"
618 return 1
619 fi
620
621 return 2
622 }
623
624 for diff_opt_ in -u -U3 -c '' no; do
625 test "$diff_opt_" != no &&
626 diff_out_=`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" < /dev/null` &&
627 break
628 done
629 if test "$diff_opt_" != no; then
630 if test -z "$diff_out_"; then
631 compare_ () { diff $diff_opt_ "$@"; }
632 else
633 compare_ ()
634 {
635 # If no differences were found, AIX and HP-UX 'diff' produce output
636 # like "No differences encountered". Hide this output.
637 diff $diff_opt_ "$@" > diff.out
638 diff_status_=$?
639 test $diff_status_ -eq 0 || cat diff.out || diff_status_=2
640 rm -f diff.out || diff_status_=2
641 return $diff_status_
642 }
643 fi
644 elif cmp -s /dev/null /dev/null 2>/dev/null; then
645 compare_ () { cmp -s "$@"; }
646 else
647 compare_ () { cmp "$@"; }
648 fi
649
650 # Usage: compare EXPECTED ACTUAL
651 #
652 # Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more.
653 # Otherwise, propagate $? to caller: any diffs have already been printed.
654 compare ()
655 {
656 # This looks like it can be factored to use a simple "case $?"
657 # after unchecked compare_dev_null_ invocation, but that would
658 # fail in a "set -e" environment.
659 if compare_dev_null_ "$@"; then
660 return 0
661 else
662 case $? in
663 1) return 1;;
664 *) compare_ "$@";;
665 esac
666 fi
667 }
668
669 # -----------------------------------------------------------------------------
608670
609671 # If you want to override the testdir_prefix_ function,
610672 # or to add more utility functions, use this file.
611673 test -f "$srcdir/init.cfg" \
612674 && . "$srcdir/init.cfg"
613675
676 # =============================================================================
677 # Set up the environment for the test to run in.
678
614679 setup_ "$@"
615680 # This trap is here, rather than in the setup_ function, because some
616681 # shells run the exit trap at shell function exit, rather than script exit.
00 /* intprops.h -- properties of integer types
11
2 Copyright (C) 2001-2018 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33
44 This program is free software: you can redistribute it and/or modify it
55 under the terms of the GNU General Public License as published
2121
2222 #include <limits.h>
2323
24 /* Return a value with the common real type of E and V and the value of V. */
25 #define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
24 /* Return a value with the common real type of E and V and the value of V.
25 Do not evaluate E. */
26 #define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v))
2627
2728 /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
2829 <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>. */
29 #define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
30 #define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v))
3031
3132 /* The extra casts in the following macros work around compiler bugs,
3233 e.g., in Cray C 5.0.3.0. */
3940 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
4041
4142 /* Return 1 if the real expression E, after promotion, has a
42 signed or floating type. */
43 signed or floating type. Do not evaluate E. */
4344 #define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
4445
4546
4647 /* Minimum and maximum values for integer types and expressions. */
4748
4849 /* The width in bits of the integer type or expression T.
50 Do not evaluate T.
4951 Padding bits are not supported; this is checked at compile-time below. */
5052 #define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
5153
5759 : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
5860
5961 /* The maximum and minimum values for the type of the expression E,
60 after integer promotion. E should not have side effects. */
62 after integer promotion. E is not evaluated. */
6163 #define _GL_INT_MINIMUM(e) \
6264 (EXPR_SIGNED (e) \
6365 ? ~ _GL_SIGNED_INT_MAXIMUM (e) \
108110 Subtract 1 for the sign bit if T is signed, and then add 1 more for
109111 a minus sign if needed.
110112
111 Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is
112 signed, this macro may overestimate the true bound by one byte when
113 Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 1 when its argument is
114 unsigned, this macro may overestimate the true bound by one byte when
113115 applied to unsigned types of size 2, 4, 16, ... bytes. */
114116 #define INT_STRLEN_BOUND(t) \
115117 (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \
217219 ? (a) < (min) >> (b) \
218220 : (max) >> (b) < (a))
219221
220 /* True if __builtin_add_overflow (A, B, P) works when P is non-null. */
222 /* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow
223 (A, B, P) work when P is non-null. */
221224 #if 5 <= __GNUC__ && !defined __ICC
222 # define _GL_HAS_BUILTIN_OVERFLOW 1
223 #else
224 # define _GL_HAS_BUILTIN_OVERFLOW 0
225 #endif
226
227 /* True if __builtin_add_overflow_p (A, B, C) works. */
225 # define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
226 #elif defined __has_builtin
227 # define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
228 #else
229 # define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
230 #endif
231
232 /* True if __builtin_mul_overflow (A, B, P) works when P is non-null. */
233 #ifdef __clang__
234 /* Work around Clang bug <https://bugs.llvm.org/show_bug.cgi?id=16404>. */
235 # define _GL_HAS_BUILTIN_MUL_OVERFLOW 0
236 #else
237 # define _GL_HAS_BUILTIN_MUL_OVERFLOW _GL_HAS_BUILTIN_ADD_OVERFLOW
238 #endif
239
240 /* True if __builtin_add_overflow_p (A, B, C) works, and similarly for
241 __builtin_mul_overflow_p and __builtin_mul_overflow_p. */
228242 #define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
229243
230244 /* The _GL*_OVERFLOW macros have the same restrictions as the
278292
279293 The INT_<op>_OVERFLOW macros return 1 if the corresponding C operators
280294 might not yield numerically correct answers due to arithmetic overflow.
281 The INT_<op>_WRAPV macros also store the low-order bits of the answer.
295 The INT_<op>_WRAPV macros compute the low-order bits of the sum,
296 difference, and product of two C integers, and return 1 if these
297 low-order bits are not numerically correct.
282298 These macros work correctly on all known practical hosts, and do not rely
283299 on undefined behavior due to signed arithmetic overflow.
284300
306322 arguments should not have side effects.
307323
308324 The WRAPV macros are not constant expressions. They support only
309 +, binary -, and *. The result type must be signed.
310
311 These macros are tuned for their last argument being a constant.
325 +, binary -, and *. Because the WRAPV macros convert the result,
326 they report overflow in different circumstances than the OVERFLOW
327 macros do.
328
329 These macros are tuned for their last input argument being a constant.
312330
313331 Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B,
314332 A % B, and A << B would overflow, respectively. */
339357 Arguments should be free of side effects. */
340358 #define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \
341359 op_result_overflow (a, b, \
342 _GL_INT_MINIMUM (0 * (b) + (a)), \
343 _GL_INT_MAXIMUM (0 * (b) + (a)))
360 _GL_INT_MINIMUM (_GL_INT_CONVERT (a, b)), \
361 _GL_INT_MAXIMUM (_GL_INT_CONVERT (a, b)))
344362
345363 /* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
346364 Return 1 if the result overflows. See above for restrictions. */
347 #define INT_ADD_WRAPV(a, b, r) \
348 _GL_INT_OP_WRAPV (a, b, r, +, __builtin_add_overflow, INT_ADD_OVERFLOW)
349 #define INT_SUBTRACT_WRAPV(a, b, r) \
350 _GL_INT_OP_WRAPV (a, b, r, -, __builtin_sub_overflow, INT_SUBTRACT_OVERFLOW)
351 #define INT_MULTIPLY_WRAPV(a, b, r) \
352 _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW)
365 #if _GL_HAS_BUILTIN_ADD_OVERFLOW
366 # define INT_ADD_WRAPV(a, b, r) __builtin_add_overflow (a, b, r)
367 # define INT_SUBTRACT_WRAPV(a, b, r) __builtin_sub_overflow (a, b, r)
368 #else
369 # define INT_ADD_WRAPV(a, b, r) \
370 _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW)
371 # define INT_SUBTRACT_WRAPV(a, b, r) \
372 _GL_INT_OP_WRAPV (a, b, r, -, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
373 #endif
374 #if _GL_HAS_BUILTIN_MUL_OVERFLOW
375 # if (9 < __GNUC__ + (3 <= __GNUC_MINOR__) \
376 || (__GNUC__ == 8 && 4 <= __GNUC_MINOR__))
377 # define INT_MULTIPLY_WRAPV(a, b, r) __builtin_mul_overflow (a, b, r)
378 # else
379 /* Work around GCC bug 91450. */
380 # define INT_MULTIPLY_WRAPV(a, b, r) \
381 ((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && EXPR_SIGNED (a) && EXPR_SIGNED (b) \
382 && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r))) -1)) \
383 ? ((void) __builtin_mul_overflow (a, b, r), 1) \
384 : __builtin_mul_overflow (a, b, r))
385 # endif
386 #else
387 # define INT_MULTIPLY_WRAPV(a, b, r) \
388 _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW)
389 #endif
353390
354391 /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See:
355392 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
356393 https://llvm.org/bugs/show_bug.cgi?id=25390
357394 For now, assume all versions of GCC-like compilers generate bogus
358 warnings for _Generic. This matters only for older compilers that
359 lack __builtin_add_overflow. */
395 warnings for _Generic. This matters only for compilers that
396 lack relevant builtins. */
360397 #if __GNUC__
361398 # define _GL__GENERIC_BOGUS 1
362399 #else
364401 #endif
365402
366403 /* Store the low-order bits of A <op> B into *R, where OP specifies
367 the operation. BUILTIN is the builtin operation, and OVERFLOW the
368 overflow predicate. Return 1 if the result overflows. See above
369 for restrictions. */
370 #if _GL_HAS_BUILTIN_OVERFLOW
371 # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r)
372 #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
373 # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
404 the operation and OVERFLOW the overflow predicate. Return 1 if the
405 result overflows. See above for restrictions. */
406 #if 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
407 # define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
374408 (_Generic \
375409 (*(r), \
376410 signed char: \
377411 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
378412 signed char, SCHAR_MIN, SCHAR_MAX), \
413 unsigned char: \
414 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
415 unsigned char, 0, UCHAR_MAX), \
379416 short int: \
380417 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
381418 short int, SHRT_MIN, SHRT_MAX), \
419 unsigned short int: \
420 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
421 unsigned short int, 0, USHRT_MAX), \
382422 int: \
383423 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
384424 int, INT_MIN, INT_MAX), \
425 unsigned int: \
426 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
427 unsigned int, 0, UINT_MAX), \
385428 long int: \
386429 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
387430 long int, LONG_MIN, LONG_MAX), \
431 unsigned long int: \
432 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
433 unsigned long int, 0, ULONG_MAX), \
388434 long long int: \
389435 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
390 long long int, LLONG_MIN, LLONG_MAX)))
391 #else
392 # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
436 long long int, LLONG_MIN, LLONG_MAX), \
437 unsigned long long int: \
438 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
439 unsigned long long int, 0, ULLONG_MAX)))
440 #else
441 /* Store the low-order bits of A <op> B into *R, where OP specifies
442 the operation and OVERFLOW the overflow predicate. If *R is
443 signed, its type is ST with bounds SMIN..SMAX; otherwise its type
444 is UT with bounds U..UMAX. ST and UT are narrower than int.
445 Return 1 if the result overflows. See above for restrictions. */
446 # if _GL_HAVE___TYPEOF__
447 # define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
448 (TYPE_SIGNED (__typeof__ (*(r))) \
449 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, st, smin, smax) \
450 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, ut, 0, umax))
451 # else
452 # define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
453 (overflow (a, b, smin, smax) \
454 ? (overflow (a, b, 0, umax) \
455 ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 1) \
456 : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) < 0) \
457 : (overflow (a, b, 0, umax) \
458 ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) >= 0 \
459 : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 0)))
460 # endif
461
462 # define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
393463 (sizeof *(r) == sizeof (signed char) \
394 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
395 signed char, SCHAR_MIN, SCHAR_MAX) \
464 ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
465 signed char, SCHAR_MIN, SCHAR_MAX, \
466 unsigned char, UCHAR_MAX) \
396467 : sizeof *(r) == sizeof (short int) \
397 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
398 short int, SHRT_MIN, SHRT_MAX) \
468 ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
469 short int, SHRT_MIN, SHRT_MAX, \
470 unsigned short int, USHRT_MAX) \
399471 : sizeof *(r) == sizeof (int) \
400 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
401 int, INT_MIN, INT_MAX) \
472 ? (EXPR_SIGNED (*(r)) \
473 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
474 int, INT_MIN, INT_MAX) \
475 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
476 unsigned int, 0, UINT_MAX)) \
402477 : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
403478 # ifdef LLONG_MAX
404479 # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
405480 (sizeof *(r) == sizeof (long int) \
481 ? (EXPR_SIGNED (*(r)) \
482 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
483 long int, LONG_MIN, LONG_MAX) \
484 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
485 unsigned long int, 0, ULONG_MAX)) \
486 : (EXPR_SIGNED (*(r)) \
487 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
488 long long int, LLONG_MIN, LLONG_MAX) \
489 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
490 unsigned long long int, 0, ULLONG_MAX)))
491 # else
492 # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
493 (EXPR_SIGNED (*(r)) \
406494 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
407495 long int, LONG_MIN, LONG_MAX) \
408 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
409 long long int, LLONG_MIN, LLONG_MAX))
410 # else
411 # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
412 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
413 long int, LONG_MIN, LONG_MAX)
496 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
497 unsigned long int, 0, ULONG_MAX))
414498 # endif
415499 #endif
416500
419503 overflow problems. *R's type is T, with extrema TMIN and TMAX.
420504 T must be a signed integer type. Return 1 if the result overflows. */
421505 #define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
422 (sizeof ((a) op (b)) < sizeof (t) \
423 ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \
424 : _GL_INT_OP_CALC1 (a, b, r, op, overflow, ut, t, tmin, tmax))
425 #define _GL_INT_OP_CALC1(a, b, r, op, overflow, ut, t, tmin, tmax) \
426 ((overflow (a, b) \
427 || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \
428 || (tmax) < ((a) op (b))) \
506 (overflow (a, b, tmin, tmax) \
429507 ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
430508 : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
431509
449527 #define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
450528 ((t) ((ut) (a) op (ut) (b)))
451529
530 /* Return true if the numeric values A + B, A - B, A * B fall outside
531 the range TMIN..TMAX. Arguments should be integer expressions
532 without side effects. TMIN should be signed and nonpositive.
533 TMAX should be positive, and should be signed unless TMIN is zero. */
534 #define _GL_INT_ADD_RANGE_OVERFLOW(a, b, tmin, tmax) \
535 ((b) < 0 \
536 ? (((tmin) \
537 ? ((EXPR_SIGNED (_GL_INT_CONVERT (a, (tmin) - (b))) || (b) < (tmin)) \
538 && (a) < (tmin) - (b)) \
539 : (a) <= -1 - (b)) \
540 || ((EXPR_SIGNED (a) ? 0 <= (a) : (tmax) < (a)) && (tmax) < (a) + (b))) \
541 : (a) < 0 \
542 ? (((tmin) \
543 ? ((EXPR_SIGNED (_GL_INT_CONVERT (b, (tmin) - (a))) || (a) < (tmin)) \
544 && (b) < (tmin) - (a)) \
545 : (b) <= -1 - (a)) \
546 || ((EXPR_SIGNED (_GL_INT_CONVERT (a, b)) || (tmax) < (b)) \
547 && (tmax) < (a) + (b))) \
548 : (tmax) < (b) || (tmax) - (b) < (a))
549 #define _GL_INT_SUBTRACT_RANGE_OVERFLOW(a, b, tmin, tmax) \
550 (((a) < 0) == ((b) < 0) \
551 ? ((a) < (b) \
552 ? !(tmin) || -1 - (tmin) < (b) - (a) - 1 \
553 : (tmax) < (a) - (b)) \
554 : (a) < 0 \
555 ? ((!EXPR_SIGNED (_GL_INT_CONVERT ((a) - (tmin), b)) && (a) - (tmin) < 0) \
556 || (a) - (tmin) < (b)) \
557 : ((! (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
558 && EXPR_SIGNED (_GL_INT_CONVERT ((tmax) + (b), a))) \
559 && (tmax) <= -1 - (b)) \
560 || (tmax) + (b) < (a)))
561 #define _GL_INT_MULTIPLY_RANGE_OVERFLOW(a, b, tmin, tmax) \
562 ((b) < 0 \
563 ? ((a) < 0 \
564 ? (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
565 ? (a) < (tmax) / (b) \
566 : ((INT_NEGATE_OVERFLOW (b) \
567 ? _GL_INT_CONVERT (b, tmax) >> (TYPE_WIDTH (b) - 1) \
568 : (tmax) / -(b)) \
569 <= -1 - (a))) \
570 : INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (b, tmin)) && (b) == -1 \
571 ? (EXPR_SIGNED (a) \
572 ? 0 < (a) + (tmin) \
573 : 0 < (a) && -1 - (tmin) < (a) - 1) \
574 : (tmin) / (b) < (a)) \
575 : (b) == 0 \
576 ? 0 \
577 : ((a) < 0 \
578 ? (INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (a, tmin)) && (a) == -1 \
579 ? (EXPR_SIGNED (b) ? 0 < (b) + (tmin) : -1 - (tmin) < (b) - 1) \
580 : (tmin) / (a) < (b)) \
581 : (tmax) / (b) < (a)))
582
452583 #endif /* _GL_INTPROPS_H */
0 /* Copyright (C) 2006-2018 Free Software Foundation, Inc.
0 /* Copyright (C) 2006-2020 Free Software Foundation, Inc.
11 Written by Paul Eggert, Bruno Haible, Derek Price.
22 This file is part of gnulib.
33
1616
1717 /*
1818 * ISO C 99 <inttypes.h> for platforms that lack it.
19 * <http://www.opengroup.org/susv3xbd/inttypes.h.html>
19 * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/inttypes.h.html>
2020 */
2121
2222 #if __GNUC__ >= 3
3737 # endif
3838
3939 # @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
40
41 # define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H
4042 # endif
4143 #endif
4244
4850 #ifndef __GLIBC__
4951 # include <stdint.h>
5052 #endif
51 /* Get CHAR_BIT. */
53 /* Get CHAR_BIT, INT_MAX, LONG_MAX, etc. */
5254 #include <limits.h>
5355 /* On mingw, __USE_MINGW_ANSI_STDIO only works if <stdio.h> is also included */
5456 #if defined _WIN32 && ! defined __CYGWIN__
5557 # include <stdio.h>
5658 #endif
5759
58 #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
59 # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
60 #if !(INT_MAX == 0x7fffffff && INT_MIN + INT_MAX == -1)
61 # error "This file assumes that 'int' is 32-bit two's complement. Please report your platform and compiler to <bug-gnulib@gnu.org>."
6062 #endif
6163
6264 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
188190 # define _PRI64_PREFIX "l"
189191 # elif defined _MSC_VER || defined __MINGW32__
190192 # define _PRI64_PREFIX "I64"
191 # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
193 # elif LONG_MAX >> 30 == 1
192194 # define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
193195 # endif
194196 # if !defined PRId64 || @PRI_MACROS_BROKEN@
205207 # define _PRIu64_PREFIX "l"
206208 # elif defined _MSC_VER || defined __MINGW32__
207209 # define _PRIu64_PREFIX "I64"
208 # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
210 # elif ULONG_MAX >> 31 == 1
209211 # define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
210212 # endif
211213 # if !defined PRIo64 || @PRI_MACROS_BROKEN@
681683 # define _SCN64_PREFIX "l"
682684 # elif defined _MSC_VER || defined __MINGW32__
683685 # define _SCN64_PREFIX "I64"
684 # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
686 # elif LONG_MAX >> 30 == 1
685687 # define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
686688 # endif
687689 # if !defined SCNd64 || @PRI_MACROS_BROKEN@
698700 # define _SCNu64_PREFIX "l"
699701 # elif defined _MSC_VER || defined __MINGW32__
700702 # define _SCNu64_PREFIX "I64"
701 # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
703 # elif ULONG_MAX >> 31 == 1
702704 # define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
703705 # endif
704706 # if !defined SCNo64 || @PRI_MACROS_BROKEN@
10901092 # define strtoimax rpl_strtoimax
10911093 # endif
10921094 _GL_FUNCDECL_RPL (strtoimax, intmax_t,
1093 (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1094 _GL_CXXALIAS_RPL (strtoimax, intmax_t, (const char *, char **, int));
1095 (const char *restrict, char **restrict, int)
1096 _GL_ARG_NONNULL ((1)));
1097 _GL_CXXALIAS_RPL (strtoimax, intmax_t,
1098 (const char *restrict, char **restrict, int));
10951099 # else
10961100 # if !@HAVE_DECL_STRTOIMAX@
10971101 # undef strtoimax
10981102 _GL_FUNCDECL_SYS (strtoimax, intmax_t,
1099 (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1103 (const char *restrict, char **restrict, int)
1104 _GL_ARG_NONNULL ((1)));
11001105 # endif
1101 _GL_CXXALIAS_SYS (strtoimax, intmax_t, (const char *, char **, int));
1106 _GL_CXXALIAS_SYS (strtoimax, intmax_t,
1107 (const char *restrict, char **restrict, int));
11021108 # endif
11031109 _GL_CXXALIASWARN (strtoimax);
11041110 #elif defined GNULIB_POSIXCHECK
11161122 # define strtoumax rpl_strtoumax
11171123 # endif
11181124 _GL_FUNCDECL_RPL (strtoumax, uintmax_t,
1119 (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1120 _GL_CXXALIAS_RPL (strtoumax, uintmax_t, (const char *, char **, int));
1125 (const char *restrict, char **restrict, int)
1126 _GL_ARG_NONNULL ((1)));
1127 _GL_CXXALIAS_RPL (strtoumax, uintmax_t,
1128 (const char *restrict, char **restrict, int));
11211129 # else
11221130 # if !@HAVE_DECL_STRTOUMAX@
11231131 # undef strtoumax
11241132 _GL_FUNCDECL_SYS (strtoumax, uintmax_t,
1125 (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1133 (const char *restrict, char **restrict, int)
1134 _GL_ARG_NONNULL ((1)));
11261135 # endif
1127 _GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int));
1136 _GL_CXXALIAS_SYS (strtoumax, uintmax_t,
1137 (const char *restrict, char **restrict, int));
11281138 # endif
11291139 _GL_CXXALIASWARN (strtoumax);
11301140 #elif defined GNULIB_POSIXCHECK
00 /* Common macros used by gnulib tests.
1 Copyright (C) 2006-2018 Free Software Foundation, Inc.
1 Copyright (C) 2006-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
00 /* Macro for checking that a function declaration is compliant.
1 Copyright (C) 2009-2018 Free Software Foundation, Inc.
1 Copyright (C) 2009-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
00 /* Test of <byteswap.h> substitute.
1 Copyright (C) 2007-2018 Free Software Foundation, Inc.
1 Copyright (C) 2007-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
00 /*
1 * Copyright (C) 2005, 2007, 2010-2018 Free Software Foundation, Inc.
1 * Copyright (C) 2005, 2007, 2010-2020 Free Software Foundation, Inc.
22 * Written by Simon Josefsson
33 *
44 * This program is free software; you can redistribute it and/or modify
00 #!/bin/sh
11 # Unit tests for init.sh
2 # Copyright (C) 2011-2018 Free Software Foundation, Inc.
2 # Copyright (C) 2011-2020 Free Software Foundation, Inc.
33 # This file is part of the GNUlib Library.
44 #
55 # This program is free software: you can redistribute it and/or modify
00 /* Test intprops.h.
1 Copyright (C) 2011-2018 Free Software Foundation, Inc.
1 Copyright (C) 2011-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
3737 #include <limits.h>
3838
3939 #include "macros.h"
40
41 /* Compile-time verification of expression X.
42 In this file, we need it as a statement, rather than as a declaration. */
43 #define verify_stmt(x) do { verify (x); } while (0)
4044
4145 /* VERIFY (X) uses a static assertion for compilers that are known to work,
4246 and falls back on a dynamic assertion for other compilers.
4448 using 'verify' would run into a bug with HP-UX 11.23 cc; see
4549 <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>. */
4650 #if __GNUC__ || __SUNPRO_C
47 # define VERIFY(x) do { verify (x); } while (0)
51 # define VERIFY(x) verify_stmt (x)
4852 #else
4953 # define VERIFY(x) ASSERT (x)
5054 #endif
5155
5256 #define DONTCARE __LINE__
57
58 int int_minus_2 = -2;
59 int int_1 = 1;
5360
5461 int
5562 main (void)
113120 VERIFY (TYPE_MINIMUM (unsigned long int) == 0);
114121 VERIFY (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX);
115122 #ifdef LLONG_MAX
116 verify (TYPE_MINIMUM (long long int) == LLONG_MIN);
117 verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
123 verify_stmt (TYPE_MINIMUM (long long int) == LLONG_MIN);
124 verify_stmt (TYPE_MAXIMUM (long long int) == LLONG_MAX);
125 verify_stmt (TYPE_MINIMUM (unsigned long long int) == 0);
126 verify_stmt (TYPE_MAXIMUM (unsigned long long int) == ULLONG_MAX);
118127 #endif
119128 VERIFY (TYPE_MINIMUM (intmax_t) == INTMAX_MIN);
120129 VERIFY (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX);
123132
124133 /* TYPE_WIDTH. */
125134 #ifdef CHAR_WIDTH
126 verify (TYPE_WIDTH (char) == CHAR_WIDTH);
127 verify (TYPE_WIDTH (signed char) == SCHAR_WIDTH);
128 verify (TYPE_WIDTH (unsigned char) == UCHAR_WIDTH);
129 verify (TYPE_WIDTH (short int) == SHRT_WIDTH);
130 verify (TYPE_WIDTH (unsigned short int) == USHRT_WIDTH);
131 verify (TYPE_WIDTH (int) == INT_WIDTH);
132 verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
133 verify (TYPE_WIDTH (long int) == LONG_WIDTH);
134 verify (TYPE_WIDTH (unsigned long int) == ULONG_WIDTH);
135 verify_stmt (TYPE_WIDTH (char) == CHAR_WIDTH);
136 verify_stmt (TYPE_WIDTH (signed char) == SCHAR_WIDTH);
137 verify_stmt (TYPE_WIDTH (unsigned char) == UCHAR_WIDTH);
138 verify_stmt (TYPE_WIDTH (short int) == SHRT_WIDTH);
139 verify_stmt (TYPE_WIDTH (unsigned short int) == USHRT_WIDTH);
140 verify_stmt (TYPE_WIDTH (int) == INT_WIDTH);
141 verify_stmt (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
142 verify_stmt (TYPE_WIDTH (long int) == LONG_WIDTH);
143 verify_stmt (TYPE_WIDTH (unsigned long int) == ULONG_WIDTH);
135144 #ifdef LLONG_WIDTH
136 verify (TYPE_WIDTH (long long int) == LLONG_WIDTH);
137 verify (TYPE_WIDTH (unsigned long long int) == ULLONG_WIDTH);
145 verify_stmt (TYPE_WIDTH (long long int) == LLONG_WIDTH);
146 verify_stmt (TYPE_WIDTH (unsigned long long int) == ULLONG_WIDTH);
138147 #endif
139148 #endif
140149
208217 CHECK_SBINOP (*, MULTIPLY, INT_MIN, INT_MIN, int, true, 0);
209218 CHECK_SBINOP (*, MULTIPLY, -1, INT_MIN, int,
210219 INT_NEGATE_OVERFLOW (INT_MIN), INT_MIN);
220 #if !defined __HP_cc
211221 CHECK_SBINOP (*, MULTIPLY, LONG_MIN / INT_MAX, (long int) INT_MAX,
212222 long int, false, LONG_MIN - LONG_MIN % INT_MAX);
223 #endif
213224
214225 CHECK_BINOP (/, DIVIDE, INT_MIN, -1, int,
215226 INT_NEGATE_OVERFLOW (INT_MIN), INT_MIN);
230241
231242 /* INT_<op>_OVERFLOW and INT_<op>_WRAPV with mixed types. */
232243 #define CHECK_SUM(a, b, t, v, vres) \
233 CHECK_SUM1(a, b, t, v, vres); \
234 CHECK_SUM1(b, a, t, v, vres)
235 #define CHECK_SSUM(a, b, t, v, vres) \
236 CHECK_SSUM1(a, b, t, v, vres); \
237 CHECK_SSUM1(b, a, t, v, vres)
244 CHECK_SUM1 (a, b, t, v, vres); \
245 CHECK_SUM1 (b, a, t, v, vres)
246 #define CHECK_SUM_WRAPV(a, b, t, v, vres, okres) \
247 CHECK_SUM_WRAPV1 (a, b, t, v, vres, okres); \
248 CHECK_SUM_WRAPV1 (b, a, t, v, vres, okres)
238249 #define CHECK_SUM1(a, b, t, v, vres) \
239 VERIFY (INT_ADD_OVERFLOW (a, b) == (v))
240 #define CHECK_SSUM1(a, b, t, v, vres) \
241 CHECK_SUM1(a, b, t, v, vres); \
250 VERIFY (INT_ADD_OVERFLOW (a, b) == (v)); \
251 CHECK_SUM_WRAPV1 (a, b, t, v, vres, (a) + (b))
252 #define CHECK_SUM_WRAPV1(a, b, t, v, vres, okres) \
242253 { \
243254 t result; \
244255 ASSERT (INT_ADD_WRAPV (a, b, &result) == (v)); \
245 ASSERT (result == ((v) ? (vres) : ((a) + (b)))); \
256 ASSERT (result == ((v) ? (vres) : (okres))); \
246257 }
247 CHECK_SSUM (-1, LONG_MIN, long int, true, LONG_MAX);
258 CHECK_SUM (-1, LONG_MIN, long int, true, LONG_MAX);
248259 CHECK_SUM (-1, UINT_MAX, unsigned int, false, DONTCARE);
249 CHECK_SSUM (-1L, INT_MIN, long int, INT_MIN == LONG_MIN,
260 CHECK_SUM (-1L, INT_MIN, long int, INT_MIN == LONG_MIN,
250261 INT_MIN == LONG_MIN ? INT_MAX : DONTCARE);
251262 CHECK_SUM (0u, -1, unsigned int, true, 0u + -1);
252263 CHECK_SUM (0u, 0, unsigned int, false, DONTCARE);
253264 CHECK_SUM (0u, 1, unsigned int, false, DONTCARE);
254 CHECK_SSUM (1, LONG_MAX, long int, true, LONG_MIN);
265 CHECK_SUM (1, LONG_MAX, long int, true, LONG_MIN);
255266 CHECK_SUM (1, UINT_MAX, unsigned int, true, 0u);
256 CHECK_SSUM (1L, INT_MAX, long int, INT_MAX == LONG_MAX,
267 CHECK_SUM (1L, INT_MAX, long int, INT_MAX == LONG_MAX,
257268 INT_MAX == LONG_MAX ? INT_MIN : DONTCARE);
258269 CHECK_SUM (1u, INT_MAX, unsigned int, INT_MAX == UINT_MAX, 1u + INT_MAX);
259270 CHECK_SUM (1u, INT_MIN, unsigned int, true, 1u + INT_MIN);
271 CHECK_SUM_WRAPV (-1, 1u, int, false, DONTCARE, 0);
272 CHECK_SUM_WRAPV (-1, 1ul, int, false, DONTCARE, 0);
273 CHECK_SUM_WRAPV (-1l, 1u, int, false, DONTCARE, 0);
274 CHECK_SUM_WRAPV (-100, 1000u, int, false, DONTCARE, 900);
275 CHECK_SUM_WRAPV (INT_MIN, UINT_MAX, int, false, DONTCARE, INT_MAX);
276 CHECK_SUM_WRAPV (1u, INT_MAX, int, true, INT_MIN, DONTCARE);
277 CHECK_SUM_WRAPV (INT_MAX, 1, long int, LONG_MAX <= INT_MAX, INT_MIN,
278 INT_MAX + 1L);
279 CHECK_SUM_WRAPV (UINT_MAX, 1, long int, LONG_MAX <= UINT_MAX, 0,
280 UINT_MAX + 1L);
281 CHECK_SUM_WRAPV (INT_MAX, 1, unsigned long int, ULONG_MAX <= INT_MAX, 0,
282 INT_MAX + 1uL);
283 CHECK_SUM_WRAPV (UINT_MAX, 1, unsigned long int, ULONG_MAX <= UINT_MAX, 0,
284 UINT_MAX + 1uL);
285
260286 {
261287 long int result;
262288 ASSERT (INT_ADD_WRAPV (1, INT_MAX, &result) == (INT_MAX == LONG_MAX));
266292 #define CHECK_DIFFERENCE(a, b, t, v, vres) \
267293 VERIFY (INT_SUBTRACT_OVERFLOW (a, b) == (v))
268294 #define CHECK_SDIFFERENCE(a, b, t, v, vres) \
269 CHECK_DIFFERENCE(a, b, t, v, vres); \
295 CHECK_DIFFERENCE (a, b, t, v, vres); \
296 CHECK_SDIFFERENCE_WRAPV (a, b, t, v, vres)
297 #define CHECK_SDIFFERENCE_WRAPV(a, b, t, v, vres) \
270298 { \
271299 t result; \
272300 ASSERT (INT_SUBTRACT_WRAPV (a, b, &result) == (v)); \
283311 CHECK_SDIFFERENCE (-1, INT_MAX, int, false, -1 - INT_MAX);
284312 CHECK_SDIFFERENCE (0, INT_MIN, int, INT_MIN < -INT_MAX, INT_MIN);
285313 CHECK_SDIFFERENCE (0, INT_MAX, int, false, 0 - INT_MAX);
314 CHECK_SDIFFERENCE_WRAPV (-1, 1u, int, false, DONTCARE);
315 CHECK_SDIFFERENCE_WRAPV (-1, 1ul, int, false, DONTCARE);
316 CHECK_SDIFFERENCE_WRAPV (-1l, 1u, int, false, DONTCARE);
317 CHECK_SDIFFERENCE_WRAPV (0u, INT_MAX, int, false, DONTCARE);
318 CHECK_SDIFFERENCE_WRAPV (1u, INT_MIN, int, true, 1u - INT_MIN);
286319 {
287320 long int result;
288321 ASSERT (INT_SUBTRACT_WRAPV (INT_MAX, -1, &result) == (INT_MAX == LONG_MAX));
290323 }
291324
292325 #define CHECK_PRODUCT(a, b, t, v, vres) \
293 CHECK_PRODUCT1(a, b, t, v, vres); \
294 CHECK_PRODUCT1(b, a, t, v, vres)
326 CHECK_PRODUCT1 (a, b, t, v, vres); \
327 CHECK_PRODUCT1 (b, a, t, v, vres)
295328 #define CHECK_SPRODUCT(a, b, t, v, vres) \
296 CHECK_SPRODUCT1(a, b, t, v, vres); \
297 CHECK_SPRODUCT1(b, a, t, v, vres)
329 CHECK_SPRODUCT1 (a, b, t, v, vres); \
330 CHECK_SPRODUCT1 (b, a, t, v, vres)
331 #define CHECK_SPRODUCT_WRAPV(a, b, t, v, vres) \
332 CHECK_SPRODUCT_WRAPV1 (a, b, t, v, vres); \
333 CHECK_SPRODUCT_WRAPV1 (b, a, t, v, vres)
298334 #define CHECK_PRODUCT1(a, b, t, v, vres) \
299335 VERIFY (INT_MULTIPLY_OVERFLOW (a, b) == (v))
300336 #define CHECK_SPRODUCT1(a, b, t, v, vres) \
301 CHECK_PRODUCT1(a, b, t, v, vres); \
337 CHECK_PRODUCT1 (a, b, t, v, vres); \
338 CHECK_SPRODUCT_WRAPV1 (a, b, t, v, vres)
339 #define CHECK_SPRODUCT_WRAPV1(a, b, t, v, vres) \
302340 { \
303341 t result; \
304342 ASSERT (INT_MULTIPLY_WRAPV (a, b, &result) == (v)); \
331369 CHECK_PRODUCT (INT_MAX, UINT_MAX, unsigned int, true, INT_MAX * UINT_MAX);
332370 CHECK_PRODUCT (INT_MAX, ULONG_MAX, unsigned long int, true,
333371 INT_MAX * ULONG_MAX);
372 #if !defined __HP_cc
334373 CHECK_SPRODUCT (INT_MIN, LONG_MAX / INT_MIN - 1, long int, true, LONG_MIN);
335374 CHECK_SPRODUCT (INT_MIN, LONG_MAX / INT_MIN, long int, false, DONTCARE);
375 #endif
336376 CHECK_PRODUCT (INT_MIN, UINT_MAX, unsigned int, true, INT_MIN * UINT_MAX);
337377 CHECK_PRODUCT (INT_MIN, ULONG_MAX, unsigned long int, true,
338378 INT_MIN * ULONG_MAX);
379 CHECK_SPRODUCT_WRAPV (-1, INT_MAX + 1u, int, false, DONTCARE);
380 CHECK_SPRODUCT_WRAPV (-1, 1u, int, false, DONTCARE);
381 CHECK_SPRODUCT (0, ULONG_MAX, int, false, DONTCARE);
382 CHECK_SPRODUCT (0u, LONG_MIN, int, false, DONTCARE);
339383 {
340384 long int result;
341385 ASSERT (INT_MULTIPLY_WRAPV (INT_MAX, INT_MAX, &result)
357401 || result == LONG_MIN * (long long int) LONG_MIN);
358402 }
359403 # endif
404
405 /* Check for GCC bug 91450. */
406 {
407 unsigned long long result;
408 ASSERT (INT_MULTIPLY_WRAPV (int_minus_2, int_1, &result) && result == -2);
409 }
360410
361411 #define CHECK_QUOTIENT(a, b, v) VERIFY (INT_DIVIDE_OVERFLOW (a, b) == (v))
362412
00 /* Test of <inttypes.h> substitute.
1 Copyright (C) 2006-2007, 2009-2018 Free Software Foundation, Inc.
1 Copyright (C) 2006-2007, 2009-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
00 /* Test of <limits.h> substitute.
1 Copyright 2016-2018 Free Software Foundation, Inc.
1 Copyright 2016-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
2525 # pragma GCC diagnostic ignored "-Woverlength-strings"
2626 #endif
2727
28 /* Macros specified by ISO/IEC TS 18661-1:2014. */
29
3028 #define verify_width(width, min, max) \
3129 verify ((max) >> ((width) - 1 - ((min) < 0)) == 1)
30
31 /* Macros borrowed from intprops.h. */
32 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
33 #define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
34 #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
35 #define TYPE_MAXIMUM(t) \
36 ((t) (! TYPE_SIGNED (t) \
37 ? (t) -1 \
38 : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
39
40 /* Type width macros. */
41
42 int type_bits[] =
43 {
44 CHAR_BIT,
45 WORD_BIT,
46 LONG_BIT
47 };
48 verify_width (CHAR_BIT, CHAR_MIN, CHAR_MAX);
49 verify_width (WORD_BIT, INT_MIN, INT_MAX);
50 verify_width (LONG_BIT, LONG_MIN, LONG_MAX);
51
52 /* Numerical limit macros. */
53
54 char limits1[] = { CHAR_MIN, CHAR_MAX };
55 verify (TYPE_MINIMUM (char) == CHAR_MIN);
56 verify (TYPE_MAXIMUM (char) == CHAR_MAX);
57
58 signed char limits2[] = { SCHAR_MIN, SCHAR_MAX };
59 verify (TYPE_MINIMUM (signed char) == SCHAR_MIN);
60 verify (TYPE_MAXIMUM (signed char) == SCHAR_MAX);
61
62 unsigned char limits3[] = { UCHAR_MAX };
63 verify (TYPE_MINIMUM (unsigned char) == 0);
64 verify (TYPE_MAXIMUM (unsigned char) == UCHAR_MAX);
65
66 short limits4[] = { SHRT_MIN, SHRT_MAX };
67 verify (TYPE_MINIMUM (short int) == SHRT_MIN);
68 verify (TYPE_MAXIMUM (short int) == SHRT_MAX);
69
70 unsigned short limits5[] = { USHRT_MAX };
71 verify (TYPE_MINIMUM (unsigned short int) == 0);
72 verify (TYPE_MAXIMUM (unsigned short int) == USHRT_MAX);
73
74 int limits6[] = { INT_MIN, INT_MAX };
75 verify (TYPE_MINIMUM (int) == INT_MIN);
76 verify (TYPE_MAXIMUM (int) == INT_MAX);
77
78 unsigned int limits7[] = { UINT_MAX };
79 verify (TYPE_MINIMUM (unsigned int) == 0);
80 verify (TYPE_MAXIMUM (unsigned int) == UINT_MAX);
81
82 long limits8[] = { LONG_MIN, LONG_MAX };
83 verify (TYPE_MINIMUM (long int) == LONG_MIN);
84 verify (TYPE_MAXIMUM (long int) == LONG_MAX);
85
86 unsigned long limits9[] = { ULONG_MAX };
87 verify (TYPE_MINIMUM (unsigned long int) == 0);
88 verify (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX);
89
90 long long limits10[] = { LLONG_MIN, LLONG_MAX };
91 verify (TYPE_MINIMUM (long long int) == LLONG_MIN);
92 verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
93
94 unsigned long long limits11[] = { ULLONG_MAX };
95 verify (TYPE_MINIMUM (unsigned long long int) == 0);
96 verify (TYPE_MAXIMUM (unsigned long long int) == ULLONG_MAX);
97
98 /* Macros specified by ISO/IEC TS 18661-1:2014. */
3299
33100 verify_width (CHAR_WIDTH, CHAR_MIN, CHAR_MAX);
34101 verify_width (SCHAR_WIDTH, SCHAR_MIN, SCHAR_MAX);
00 /*
1 * Copyright (C) 2005, 2010-2018 Free Software Foundation, Inc.
1 * Copyright (C) 2005, 2010-2020 Free Software Foundation, Inc.
22 * Written by Simon Josefsson
33 *
44 * This program is free software; you can redistribute it and/or modify
00 /* Test of <stdalign.h>.
1 Copyright 2009-2018 Free Software Foundation, Inc.
1 Copyright 2009-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
00 /* Test of <stdbool.h> substitute.
1 Copyright (C) 2002-2007, 2009-2018 Free Software Foundation, Inc.
1 Copyright (C) 2002-2007, 2009-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
00 /* Test of <stddef.h> substitute.
1 Copyright (C) 2009-2018 Free Software Foundation, Inc.
1 Copyright (C) 2009-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
00 /* Test of <stdint.h> substitute.
1 Copyright (C) 2006-2018 Free Software Foundation, Inc.
1 Copyright (C) 2006-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
216216 /* 7.18.2.4. Limits of integer types capable of holding object pointers */
217217
218218 intptr_t g[3] = { 17, INTPTR_MIN, INTPTR_MAX };
219 verify (sizeof (void *) <= sizeof (intptr_t));
219220 verify (TYPE_MINIMUM (intptr_t) == INTPTR_MIN);
220221 verify (TYPE_MAXIMUM (intptr_t) == INTPTR_MAX);
221222 verify_same_types (INTPTR_MIN, (intptr_t) 0 + 0);
222223 verify_same_types (INTPTR_MAX, (intptr_t) 0 + 0);
223224
224225 uintptr_t h[2] = { 17, UINTPTR_MAX };
226 verify (sizeof (void *) <= sizeof (uintptr_t));
225227 verify (TYPE_MAXIMUM (uintptr_t) == UINTPTR_MAX);
226228 verify_same_types (UINTPTR_MAX, (uintptr_t) 0 + 0);
227229
00 /* Test of <string.h> substitute.
1 Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
1 Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
00 /* Test of strverscmp() function.
1 Copyright (C) 2008-2018 Free Software Foundation, Inc.
1 Copyright (C) 2008-2020 Free Software Foundation, Inc.
22
33 This program is free software; you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
00 /* Test of <sys/types.h> substitute.
1 Copyright (C) 2011-2018 Free Software Foundation, Inc.
1 Copyright (C) 2011-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
00 /* Test of <unistd.h> substitute.
1 Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
1 Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
0 #!/bin/sh
1 # Test suite for update-copyright.
2 # Copyright (C) 2009-2020 Free Software Foundation, Inc.
3 # This file is part of the GNUlib Library.
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <https://www.gnu.org/licenses/>.
17
18 diffout=`diff -u /dev/null /dev/null 2>&1`
19 if test x"$diffout" = x"" && test $? -eq 0; then
20 compare() { diff -u "$@"; }
21 else
22 compare() { cmp "$@"; }
23 fi
24
25 # Ensure the update-copyright program gets found.
26 PATH=$abs_aux_dir:$PATH
27 export PATH
28
29 TMP_BASE=update-copyright.test
30 trap 'rm -f $TMP_BASE*' 0 1 2 3 15
31
32 ## --------------------------------- ##
33 ## Skip if user does not have perl. ##
34 ## --------------------------------- ##
35
36 TMP=$TMP_BASE
37 s=$TMP-script
38 cat <<\EOF > $s
39 #!/bin/sh
40 #! -*-perl-*-
41 # This is a prologue that allows to run a perl script as an executable
42 # on systems that are compliant to a POSIX version before POSIX:2017.
43 # On such systems, the usual invocation of an executable through execlp()
44 # or execvp() fails with ENOEXEC if it is a script that does not start
45 # with a #! line. The script interpreter mentioned in the #! line has
46 # to be /bin/sh, because on GuixSD systems that is the only program that
47 # has a fixed file name. The second line is essential for perl and is
48 # also useful for editing this file in Emacs. The next two lines below
49 # are valid code in both sh and perl. When executed by sh, they re-execute
50 # the script through the perl program found in $PATH. The '-x' option
51 # is essential as well; without it, perl would re-execute the script
52 # through /bin/sh. When executed by perl, the next two lines are a no-op.
53 eval 'exec perl -wSx -pi "$0" "$@"'
54 if 0;
55
56 s/a/b/
57 EOF
58 chmod a+x $s
59 echo a > $TMP-in
60 ./$s $TMP-in 2>/dev/null && test b = "`cat $TMP-in 2>/dev/null`" ||
61 {
62 printf '%s\n' "$0: skipping this test;" \
63 'your system has insufficient support for Perl' 1>&2
64 exit 77
65 }
66
67 # Skip this test if Perl is too old. FIXME: 5.8.0 is just a guess.
68 # We have a report that 5.6.1 is inadequate and that 5.8.0 works.
69 perl -e 'require 5.8.0' || {
70 echo '$0: skipping this test; Perl version is too old' 1>&2
71 exit 77
72 }
73
74 # Do not let a different envvar setting perturb results.
75 UPDATE_COPYRIGHT_MAX_LINE_LENGTH=72
76 export UPDATE_COPYRIGHT_MAX_LINE_LENGTH
77
78 ## ----------------------------- ##
79 ## Examples from documentation. ##
80 ## ----------------------------- ##
81
82 TMP=$TMP_BASE-ex
83 cat > $TMP.1 <<EOF
84 Copyright @copyright{} 1990-2005, 2007-2009 Free Software
85 Foundation, Inc.
86 EOF
87 cat > $TMP.2 <<EOF
88 # Copyright (C) 1990-2005, 2007-2009 Free Software
89 # Foundation, Inc.
90 EOF
91 cat > $TMP.3 <<EOF
92 /*
93 * Copyright &copy; 90,2005,2007-2009
94 * Free Software Foundation, Inc.
95 */
96 EOF
97 cat > $TMP.4 <<EOF
98 ## Copyright (C) 1990-2005, 2007-2009 Free Software
99 # Foundation, Inc.
100 EOF
101 cat > $TMP.5 <<EOF
102 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
103 EOF
104 cat > $TMP.6 <<EOF
105 ## Copyright (C) 1990-2005, 2007-2009 Free Software
106 # Foundation, Inc.
107
108 Copyright (C) 1990-2005, 2007-2009 Free Software Foundation,
109 Inc.
110 EOF
111 cat > $TMP.7 <<EOF
112 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
113
114 # Copyright (C) 1990-2005, 2007-2009 Free Software
115 # Foundation, Inc.
116 EOF
117
118 UPDATE_COPYRIGHT_YEAR=2009 \
119 update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
120 compare /dev/null $TMP-stdout || exit 1
121 compare - $TMP-stderr <<EOF || exit 1
122 $TMP.4: warning: copyright statement not found
123 $TMP.5: warning: copyright statement not found
124 EOF
125 compare - $TMP.1 <<EOF || exit 1
126 Copyright @copyright{} 1990-2005, 2007-2009 Free Software
127 Foundation, Inc.
128 EOF
129 compare - $TMP.2 <<EOF || exit 1
130 # Copyright (C) 1990-2005, 2007-2009 Free Software
131 # Foundation, Inc.
132 EOF
133 compare - $TMP.3 <<EOF || exit 1
134 /*
135 * Copyright &copy; 90,2005,2007-2009
136 * Free Software Foundation, Inc.
137 */
138 EOF
139 compare - $TMP.4 <<EOF || exit 1
140 ## Copyright (C) 1990-2005, 2007-2009 Free Software
141 # Foundation, Inc.
142 EOF
143 compare - $TMP.5 <<EOF || exit 1
144 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
145 EOF
146 compare - $TMP.6 <<EOF || exit 1
147 ## Copyright (C) 1990-2005, 2007-2009 Free Software
148 # Foundation, Inc.
149
150 Copyright (C) 1990-2005, 2007-2009 Free Software Foundation,
151 Inc.
152 EOF
153 compare - $TMP.7 <<EOF || exit 1
154 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
155
156 # Copyright (C) 1990-2005, 2007-2009 Free Software
157 # Foundation, Inc.
158 EOF
159
160 UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
161 update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
162 compare /dev/null $TMP-stdout || exit 1
163 compare - $TMP-stderr <<EOF || exit 1
164 $TMP.4: warning: copyright statement not found
165 $TMP.5: warning: copyright statement not found
166 EOF
167 compare - $TMP.1 <<EOF || exit 1
168 Copyright @copyright{} 1990-2005, 2007-2010 Free Software Foundation,
169 Inc.
170 EOF
171 compare - $TMP.2 <<EOF || exit 1
172 # Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
173 EOF
174 compare - $TMP.3 <<EOF || exit 1
175 /*
176 * Copyright &copy; 1990, 2005, 2007-2010 Free Software Foundation, Inc.
177 */
178 EOF
179 compare - $TMP.4 <<EOF || exit 1
180 ## Copyright (C) 1990-2005, 2007-2009 Free Software
181 # Foundation, Inc.
182 EOF
183 compare - $TMP.5 <<EOF || exit 1
184 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
185 EOF
186 compare - $TMP.6 <<EOF || exit 1
187 ## Copyright (C) 1990-2005, 2007-2009 Free Software
188 # Foundation, Inc.
189
190 Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
191 EOF
192 compare - $TMP.7 <<EOF || exit 1
193 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
194
195 # Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
196 EOF
197
198 UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_FORCE=1 \
199 update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
200 compare /dev/null $TMP-stdout || exit 1
201 compare - $TMP-stderr <<EOF || exit 1
202 $TMP.4: warning: copyright statement not found
203 $TMP.5: warning: copyright statement not found
204 EOF
205 compare - $TMP.1 <<EOF || exit 1
206 Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
207 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
208 Free Software Foundation, Inc.
209 EOF
210 compare - $TMP.2 <<EOF || exit 1
211 # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
212 # 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
213 # Software Foundation, Inc.
214 EOF
215 compare - $TMP.3 <<EOF || exit 1
216 /*
217 * Copyright &copy; 1990, 2005, 2007, 2008, 2009, 2010 Free Software
218 * Foundation, Inc.
219 */
220 EOF
221 compare - $TMP.4 <<EOF || exit 1
222 ## Copyright (C) 1990-2005, 2007-2009 Free Software
223 # Foundation, Inc.
224 EOF
225 compare - $TMP.5 <<EOF || exit 1
226 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
227 EOF
228 compare - $TMP.6 <<EOF || exit 1
229 ## Copyright (C) 1990-2005, 2007-2009 Free Software
230 # Foundation, Inc.
231
232 Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
233 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
234 Software Foundation, Inc.
235 EOF
236 compare - $TMP.7 <<EOF || exit 1
237 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
238
239 # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
240 # 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
241 # Software Foundation, Inc.
242 EOF
243
244 rm $TMP*
245
246 ## -------------- ##
247 ## Current year. ##
248 ## -------------- ##
249
250 TMP=$TMP_BASE-current-year
251 YEAR=`date +%Y`
252 cat > $TMP <<EOF
253 '\" Copyright (C) 2006
254 '\" Free Software Foundation,
255 '\" Inc.
256 EOF
257 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
258 compare /dev/null $TMP-stdout || exit 1
259 compare /dev/null $TMP-stderr || exit 1
260 compare - $TMP <<EOF || exit 1
261 '\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc.
262 EOF
263 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
264 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
265 compare /dev/null $TMP-stdout || exit 1
266 compare /dev/null $TMP-stderr || exit 1
267 compare - $TMP <<EOF || exit 1
268 '\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc.
269 EOF
270 rm $TMP*
271
272 ## ------------------ ##
273 ## Surrounding text. ##
274 ## ------------------ ##
275
276 TMP=$TMP_BASE-surrounding-text
277 cat > $TMP <<EOF
278 Undisturbed text.
279 dnl Undisturbed text.
280 dnl Copyright (C) 89
281 dnl Free Software Foundation, Inc.
282 dnl Undisturbed text.
283 EOF
284 UPDATE_COPYRIGHT_YEAR=2010 \
285 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
286 compare /dev/null $TMP-stdout || exit 1
287 compare /dev/null $TMP-stderr || exit 1
288 compare - $TMP <<EOF || exit 1
289 Undisturbed text.
290 dnl Undisturbed text.
291 dnl Copyright (C) 1989, 2010 Free Software Foundation, Inc.
292 dnl Undisturbed text.
293 EOF
294 rm $TMP*
295
296 ## --------------- ##
297 ## Widest prefix. ##
298 ## --------------- ##
299
300 TMP=$TMP_BASE-widest-prefix
301 cat > $TMP <<EOF
302 #### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
303 #### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
304 #### 2008 Free Software Foundation, Inc.
305 EOF
306 UPDATE_COPYRIGHT_YEAR=2010 \
307 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
308 compare /dev/null $TMP-stdout || exit 1
309 compare /dev/null $TMP-stderr || exit 1
310 compare - $TMP <<EOF || exit 1
311 #### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984,
312 #### 1985, 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
313 #### 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
314 EOF
315 UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
316 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
317 compare /dev/null $TMP-stdout || exit 1
318 compare /dev/null $TMP-stderr || exit 1
319 compare - $TMP <<EOF || exit 1
320 #### Copyright (C) 1976-1988, 1999-2008, 2010-2011 Free Software
321 #### Foundation, Inc.
322 EOF
323 rm $TMP*
324
325 ## ------------------- ##
326 ## Prefix too large. ##
327 ## ------------------- ##
328
329 TMP=$TMP_BASE-prefix-too-large
330 cat > $TMP <<EOF
331 #### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
332 #### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
333 #### 2008 Free Software Foundation, Inc.
334 EOF
335 UPDATE_COPYRIGHT_YEAR=2010 \
336 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
337 compare /dev/null $TMP-stdout || exit 1
338 compare - $TMP-stderr <<EOF || exit 1
339 $TMP: warning: copyright statement not found
340 EOF
341 compare - $TMP <<EOF || exit 1
342 #### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
343 #### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
344 #### 2008 Free Software Foundation, Inc.
345 EOF
346 rm $TMP*
347
348 ## ------------- ##
349 ## Blank lines. ##
350 ## ------------- ##
351
352 TMP=$TMP_BASE-blank-lines
353 cat > $TMP <<EOF
354 #Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
355 #
356 #1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
357 #2008 Free Software Foundation, Inc.
358
359 Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
360
361 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
362 2008 Free Software Foundation, Inc.
363 EOF
364 UPDATE_COPYRIGHT_YEAR=2010 \
365 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
366 compare /dev/null $TMP-stdout || exit 1
367 compare - $TMP-stderr <<EOF || exit 1
368 $TMP: warning: copyright statement not found
369 EOF
370 compare - $TMP <<EOF || exit 1
371 #Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
372 #
373 #1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
374 #2008 Free Software Foundation, Inc.
375
376 Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
377
378 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
379 2008 Free Software Foundation, Inc.
380 EOF
381 rm $TMP*
382
383 ## -------------- ##
384 ## Leading tabs. ##
385 ## -------------- ##
386
387 TMP=$TMP_BASE-leading-tabs
388 cat > $TMP <<EOF
389 Copyright (C) 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 98,
390 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
391 Software Foundation, Inc.
392 EOF
393 UPDATE_COPYRIGHT_YEAR=2010 \
394 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
395 compare /dev/null $TMP-stdout || exit 1
396 compare /dev/null $TMP-stderr || exit 1
397 compare - $TMP <<EOF || exit 1
398 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
399 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
400 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
401 EOF
402 UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
403 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
404 compare /dev/null $TMP-stdout || exit 1
405 compare /dev/null $TMP-stderr || exit 1
406 compare - $TMP <<EOF || exit 1
407 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
408 Inc.
409 EOF
410 rm $TMP*
411
412 ## -------------------- ##
413 ## Unusual whitespace. ##
414 ## -------------------- ##
415
416 TMP=$TMP_BASE-unusual-ws
417 cat > $TMP <<EOF
418 # Copyright (C) 87-88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
419 # 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
420 # 2009 Free Software Foundation, Inc.
421 EOF
422 UPDATE_COPYRIGHT_YEAR=2010 \
423 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
424 compare /dev/null $TMP-stdout || exit 1
425 compare /dev/null $TMP-stderr || exit 1
426 compare - $TMP <<EOF || exit 1
427 # Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994,
428 # 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
429 # 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
430 # Foundation, Inc.
431 EOF
432 UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
433 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
434 compare /dev/null $TMP-stdout || exit 1
435 compare /dev/null $TMP-stderr || exit 1
436 compare - $TMP <<EOF || exit 1
437 # Copyright (C) 1987-1988, 1991-2011 Free Software
438 # Foundation, Inc.
439 EOF
440 UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=2 \
441 UPDATE_COPYRIGHT_FORCE=1 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
442 compare /dev/null $TMP-stdout || exit 1
443 compare /dev/null $TMP-stderr || exit 1
444 compare - $TMP <<EOF || exit 1
445 # Copyright (C) 1987-2011 Free Software Foundation, Inc.
446 EOF
447 rm $TMP*
448
449 ## --------- ##
450 ## DOS EOL. ##
451 ## --------- ##
452
453 TMP=$TMP_BASE-dos-eol
454 tr @ '\015' > $TMP <<\EOF
455 Rem Copyright (C) 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,@
456 Rem 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@
457 Rem 2009 Free Software Foundation, Inc.@
458 EOF
459 UPDATE_COPYRIGHT_YEAR=2010 \
460 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
461 compare /dev/null $TMP-stdout || exit 1
462 compare /dev/null $TMP-stderr || exit 1
463 tr @ '\015' > $TMP-exp <<\EOF
464 Rem Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,@
465 Rem 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@
466 Rem 2009, 2010 Free Software Foundation, Inc.@
467 EOF
468 compare $TMP-exp $TMP || exit 1
469 rm $TMP*
470
471 ## --------------- ##
472 ## Omitted "(C)". ##
473 ## --------------- ##
474
475 TMP=$TMP_BASE-omitted-circle-c
476 cat > $TMP <<EOF
477 Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
478 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
479 2009 Free Software Foundation, Inc.
480 EOF
481 UPDATE_COPYRIGHT_YEAR=2010 \
482 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
483 compare /dev/null $TMP-stdout || exit 1
484 compare /dev/null $TMP-stderr || exit 1
485 compare - $TMP <<EOF || exit 1
486 Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
487 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
488 Free Software Foundation, Inc.
489 EOF
490 rm $TMP*
491
492 ## ------------------ ##
493 ## C-style comments. ##
494 ## ------------------ ##
495
496 TMP=$TMP_BASE-c-style-comments
497 cat > $TMP.star <<EOF
498 /* Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
499 * 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
500 * 2009 Free Software Foundation, Inc. */
501 EOF
502 cat > $TMP.space <<EOF
503 /*Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
504 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
505 2009 Free Software Foundation, Inc. */
506 EOF
507 cat > $TMP.single-line <<EOF
508 /* Copyright 87, 1991, 1992 Free Software Foundation, Inc. */
509 EOF
510 cat > $TMP.single-line-wrapped <<EOF
511 /* Copyright 1988, 1991, 1992, 1993 Free Software Foundation, Inc. */
512 EOF
513 cat > $TMP.extra-text-star <<EOF
514 /* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc. End
515 * More comments. */
516 EOF
517 cat > $TMP.extra-text-space <<EOF
518 /* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc. ***
519 * End of comments. */
520 EOF
521 cat > $TMP.two-digit-final-is-substr-of-first <<EOF
522 /* Copyright 1991, 99 Free Software Foundation, Inc. */
523 EOF
524 UPDATE_COPYRIGHT_YEAR=2010 \
525 update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
526 compare /dev/null $TMP-stdout || exit 1
527 compare /dev/null $TMP-stderr || exit 1
528 compare - $TMP.star <<EOF || exit 1
529 /* Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
530 * 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
531 * 2009, 2010 Free Software Foundation, Inc. */
532 EOF
533 compare - $TMP.space <<EOF || exit 1
534 /*Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
535 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
536 2009, 2010 Free Software Foundation, Inc. */
537 EOF
538 compare - $TMP.single-line <<EOF || exit 1
539 /* Copyright 1987, 1991, 1992, 2010 Free Software Foundation, Inc. */
540 EOF
541 compare - $TMP.single-line-wrapped <<EOF || exit 1
542 /* Copyright 1988, 1991, 1992, 1993, 2010 Free Software Foundation,
543 * Inc. */
544 EOF
545 compare - $TMP.extra-text-star <<EOF || exit 1
546 /* Copyright 1987, 1988, 1991, 1992, 2010 Free Software Foundation,
547 * Inc. End
548 * More comments. */
549 EOF
550 compare - $TMP.extra-text-space <<EOF || exit 1
551 /* Copyright 1987, 1988, 1991, 1992, 2010 Free Software Foundation,
552 Inc. ***
553 * End of comments. */
554 EOF
555 compare - $TMP.two-digit-final-is-substr-of-first <<EOF || exit 1
556 /* Copyright 1991, 1999, 2010 Free Software Foundation, Inc. */
557 EOF
558 rm $TMP*
559
560 exit 0
00 #!/bin/sh
11 # Unit tests for vc-list-files
2 # Copyright (C) 2008-2018 Free Software Foundation, Inc.
2 # Copyright (C) 2008-2020 Free Software Foundation, Inc.
33 # This file is part of the GNUlib Library.
44 #
55 # This program is free software: you can redistribute it and/or modify
1616 # along with this program. If not, see <https://www.gnu.org/licenses/>. */
1717
1818 : ${srcdir=.}
19 . "$srcdir/init.sh"; path_prepend_ "$abs_aux_dir" .
19 . "$srcdir/init.sh"; path_prepend_ .
2020
2121 tmpdir=vc-cvs
2222 repo=`pwd`/$tmpdir/repo
4343 cvs -Q -d "$repo" import -m imp m M M0 &&
4444 cvs -Q -d "$repo" co m && cd m &&
4545 printf '%s\n' b c d/a > expected &&
46 vc-list-files | sort > actual &&
46 $BOURNE_SHELL "$abs_aux_dir/vc-list-files" | sort > actual &&
4747 compare expected actual &&
4848 ok=1
4949 test $ok = 0 && fail=1
00 #!/bin/sh
11 # Unit tests for vc-list-files
2 # Copyright (C) 2008-2018 Free Software Foundation, Inc.
2 # Copyright (C) 2008-2020 Free Software Foundation, Inc.
33 # This file is part of the GNUlib Library.
44 #
55 # This program is free software: you can redistribute it and/or modify
1616 # along with this program. If not, see <https://www.gnu.org/licenses/>. */
1717
1818 : ${srcdir=.}
19 . "$srcdir/init.sh"; path_prepend_ "$abs_aux_dir" .
19 . "$srcdir/init.sh"; path_prepend_ .
2020
2121 tmpdir=vc-git-$$
2222 GIT_DIR= GIT_WORK_TREE=; unset GIT_DIR GIT_WORK_TREE
3434 git add . > /dev/null &&
3535 git commit -q -a -m log &&
3636 printf '%s\n' b c d/a > expected &&
37 vc-list-files > actual &&
37 $BOURNE_SHELL "$abs_aux_dir/vc-list-files" > actual &&
3838 compare expected actual &&
3939 fail=0
4040
00 /* Test the "verify" module.
11
2 Copyright (C) 2017-2018 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33
44 This program is free software: you can redistribute it and/or modify
55 it under the terms of the GNU General Public License as published by
00 /* Test the "verify" module.
11
2 Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc.
2 Copyright (C) 2005, 2009-2020 Free Software Foundation, Inc.
33
44 This program is free software: you can redistribute it and/or modify
55 it under the terms of the GNU General Public License as published by
3838
3939 enum
4040 {
41 item = verify_true (1 == 1) * 0 + 17 /* should be ok */
41 item = verify_expr (1 == 1, 10 * 0 + 17) /* should be ok */
4242 };
4343
4444 static int
00 /* Test of <wchar.h> substitute.
1 Copyright (C) 2007-2018 Free Software Foundation, Inc.
1 Copyright (C) 2007-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
00 /* Compile-time assert-like macros.
11
2 Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc.
2 Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc.
33
44 This program is free software: you can redistribute it and/or modify
55 it under the terms of the GNU General Public License as published by
2020 #define _GL_VERIFY_H
2121
2222
23 /* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11.
24 This is supported by GCC 4.6.0 and later, in C mode, and its use
25 here generates easier-to-read diagnostics when verify (R) fails.
26
27 Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11.
28 This will likely be supported by future GCC versions, in C++ mode.
29
30 Use this only with GCC. If we were willing to slow 'configure'
31 down we could also use it with other compilers, but since this
32 affects only the quality of diagnostics, why bother? */
33 #if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \
34 && (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \
35 && !defined __cplusplus)
36 # define _GL_HAVE__STATIC_ASSERT 1
37 #endif
38 /* The condition (99 < __GNUC__) is temporary, until we know about the
39 first G++ release that supports static_assert. */
40 #if (99 < __GNUC__) && defined __cplusplus
41 # define _GL_HAVE_STATIC_ASSERT 1
23 /* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert (R, DIAGNOSTIC)
24 works as per C11. This is supported by GCC 4.6.0 and later, in C
25 mode.
26
27 Define _GL_HAVE__STATIC_ASSERT1 to 1 if _Static_assert (R) works as
28 per C2X, and define _GL_HAVE_STATIC_ASSERT1 if static_assert (R)
29 works as per C++17. This is supported by GCC 9.1 and later.
30
31 Support compilers claiming conformance to the relevant standard,
32 and also support GCC when not pedantic. If we were willing to slow
33 'configure' down we could also use it with other compilers, but
34 since this affects only the quality of diagnostics, why bother? */
35 #ifndef __cplusplus
36 # if (201112L <= __STDC_VERSION__ \
37 || (!defined __STRICT_ANSI__ && 4 < __GNUC__ + (6 <= __GNUC_MINOR__)))
38 # define _GL_HAVE__STATIC_ASSERT 1
39 # endif
40 # if (202000L <= __STDC_VERSION__ \
41 || (!defined __STRICT_ANSI__ && 9 <= __GNUC__))
42 # define _GL_HAVE__STATIC_ASSERT1 1
43 # endif
44 #else
45 # if 201703L <= __cplusplus || 9 <= __GNUC__
46 # define _GL_HAVE_STATIC_ASSERT1 1
47 # endif
4248 #endif
4349
4450 /* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
4551 system headers, defines a conflicting _Static_assert that is no
4652 better than ours; override it. */
47 #ifndef _GL_HAVE_STATIC_ASSERT
53 #ifndef _GL_HAVE__STATIC_ASSERT
4854 # include <stddef.h>
4955 # undef _Static_assert
5056 #endif
142148 which do not support _Static_assert, also do not warn about the
143149 last declaration mentioned above.
144150
145 * GCC warns if -Wnested-externs is enabled and verify() is used
151 * GCC warns if -Wnested-externs is enabled and 'verify' is used
146152 within a function body; but inside a function, you can always
147 arrange to use verify_expr() instead.
153 arrange to use verify_expr instead.
148154
149155 * In C++, any struct definition inside sizeof is invalid.
150156 Use a template type to work around the problem. */
196202 #endif
197203
198204 /* Verify requirement R at compile-time, as a declaration without a
199 trailing ';'. If R is false, fail at compile-time, preferably
200 with a diagnostic that includes the string-literal DIAGNOSTIC.
205 trailing ';'. If R is false, fail at compile-time.
206
207 This macro requires three or more arguments but uses at most the first
208 two, so that the _Static_assert macro optionally defined below supports
209 both the C11 two-argument syntax and the C2X one-argument syntax.
201210
202211 Unfortunately, unlike C11, this implementation must appear as an
203212 ordinary declaration, and cannot appear inside struct { ... }. */
204213
205 #ifdef _GL_HAVE__STATIC_ASSERT
206 # define _GL_VERIFY _Static_assert
207 #else
208 # define _GL_VERIFY(R, DIAGNOSTIC) \
214 #if defined _GL_HAVE__STATIC_ASSERT
215 # define _GL_VERIFY(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC)
216 #else
217 # define _GL_VERIFY(R, DIAGNOSTIC, ...) \
209218 extern int (*_GL_GENSYM (_gl_verify_function) (void)) \
210219 [_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
211220 #endif
212221
213222 /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */
214223 #ifdef _GL_STATIC_ASSERT_H
215 # if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert
216 # define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
217 # endif
218 # if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
224 # if !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert
225 # define _Static_assert(...) \
226 _GL_VERIFY (__VA_ARGS__, "static assertion failed", -)
227 # endif
228 # if !defined _GL_HAVE_STATIC_ASSERT1 && !defined static_assert
219229 # define static_assert _Static_assert /* C11 requires this #define. */
220230 # endif
221231 #endif
222232
223233 /* @assert.h omit start@ */
234
235 #if 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))
236 # define _GL_HAS_BUILTIN_TRAP 1
237 #elif defined __has_builtin
238 # define _GL_HAS_BUILTIN_TRAP __has_builtin (__builtin_trap)
239 #else
240 # define _GL_HAS_BUILTIN_TRAP 0
241 #endif
242
243 #if 4 < __GNUC__ + (5 <= __GNUC_MINOR__)
244 # define _GL_HAS_BUILTIN_UNREACHABLE 1
245 #elif defined __has_builtin
246 # define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable)
247 #else
248 # define _GL_HAS_BUILTIN_UNREACHABLE 0
249 #endif
224250
225251 /* Each of these macros verifies that its argument R is nonzero. To
226252 be portable, R should be an integer constant expression. Unlike
227253 assert (R), there is no run-time overhead.
228254
229255 There are two macros, since no single macro can be used in all
230 contexts in C. verify_true (R) is for scalar contexts, including
256 contexts in C. verify_expr (R, E) is for scalar contexts, including
231257 integer constant expression contexts. verify (R) is for declaration
232258 contexts, e.g., the top level. */
233259
234 /* Verify requirement R at compile-time, as an integer constant expression.
235 Return 1. This is equivalent to verify_expr (R, 1).
236
237 verify_true is obsolescent; please use verify_expr instead. */
238
239 #define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
240
241260 /* Verify requirement R at compile-time. Return the value of the
242261 expression E. */
243262
245264 (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
246265
247266 /* Verify requirement R at compile-time, as a declaration without a
248 trailing ';'. */
249
250 #ifdef __GNUC__
251 # define verify(R) _GL_VERIFY (R, "verify (" #R ")")
252 #else
253 /* PGI barfs if R is long. Play it safe. */
254 # define verify(R) _GL_VERIFY (R, "verify (...)")
255 #endif
256
257 #ifndef __has_builtin
258 # define __has_builtin(x) 0
259 #endif
260
261 /* Assume that R always holds. This lets the compiler optimize
262 accordingly. R should not have side-effects; it may or may not be
263 evaluated. Behavior is undefined if R is false. */
264
265 #if (__has_builtin (__builtin_unreachable) \
266 || 4 < __GNUC__ + (5 <= __GNUC_MINOR__))
267 trailing ';'. verify (R) acts like static_assert (R) except that
268 it is portable to C11/C++14 and earlier, it can issue better
269 diagnostics, and its name is shorter and may be more convenient. */
270
271 #ifdef __PGI
272 /* PGI barfs if R is long. */
273 # define verify(R) _GL_VERIFY (R, "verify (...)", -)
274 #else
275 # define verify(R) _GL_VERIFY (R, "verify (" #R ")", -)
276 #endif
277
278 /* Assume that R always holds. Behavior is undefined if R is false,
279 fails to evaluate, or has side effects. Although assuming R can
280 help a compiler generate better code or diagnostics, performance
281 can suffer if R uses hard-to-optimize features such as function
282 calls not inlined by the compiler. */
283
284 #if _GL_HAS_BUILTIN_UNREACHABLE
267285 # define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
268286 #elif 1200 <= _MSC_VER
269287 # define assume(R) __assume (R)
270 #elif ((defined GCC_LINT || defined lint) \
271 && (__has_builtin (__builtin_trap) \
272 || 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))))
288 #elif (defined GCC_LINT || defined lint) && _GL_HAS_BUILTIN_TRAP
273289 /* Doing it this way helps various packages when configured with
274290 --enable-gcc-warnings, which compiles with -Dlint. It's nicer
275291 when 'assume' silences warnings even with older GCCs. */
00 /* A C macro for emitting warnings if a function is used.
1 Copyright (C) 2010-2018 Free Software Foundation, Inc.
1 Copyright (C) 2010-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify it
44 under the terms of the GNU General Public License as published
00 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
11
2 Copyright (C) 2007-2018 Free Software Foundation, Inc.
2 Copyright (C) 2007-2020 Free Software Foundation, Inc.
33
44 This program is free software; you can redistribute it and/or modify
55 it under the terms of the GNU General Public License as published by
1818
1919 /*
2020 * ISO C 99 <wchar.h> for platforms that have issues.
21 * <http://www.opengroup.org/susv3xbd/wchar.h.html>
21 * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/wchar.h.html>
2222 *
2323 * For now, this just ensures proper prerequisite inclusion order and
2424 * the declaration of wcwidth().
3232 #if (((defined __need_mbstate_t || defined __need_wint_t) \
3333 && !defined __MINGW32__) \
3434 || (defined __hpux \
35 && ((defined _INTTYPES_INCLUDED && !defined strtoimax) \
35 && ((defined _INTTYPES_INCLUDED \
36 && !defined _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H) \
3637 || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \
3738 || (defined __MINGW32__ && defined __STRING_H_SOURCED__) \
3839 || defined _GL_ALREADY_INCLUDING_WCHAR_H)
136137
137138 /* Override mbstate_t if it is too small.
138139 On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
139 implementing mbrtowc for encodings like UTF-8. */
140 #if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
140 implementing mbrtowc for encodings like UTF-8.
141 On AIX and MSVC, mbrtowc needs to be overridden, but mbstate_t exists and is
142 large enough and overriding it would cause problems in C++ mode. */
143 #if !(((defined _WIN32 && !defined __CYGWIN__) || @HAVE_MBSINIT@) && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
141144 # if !GNULIB_defined_mbstate_t
145 # if !(defined _AIX || defined _MSC_VER)
142146 typedef int rpl_mbstate_t;
143 # undef mbstate_t
144 # define mbstate_t rpl_mbstate_t
147 # undef mbstate_t
148 # define mbstate_t rpl_mbstate_t
149 # endif
145150 # define GNULIB_defined_mbstate_t 1
146151 # endif
147152 #endif
160165 # if !@HAVE_BTOWC@
161166 _GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
162167 # endif
163 _GL_CXXALIAS_SYS (btowc, wint_t, (int c));
164 # endif
168 /* Need to cast, because on mingw, the return type is 'unsigned short'. */
169 _GL_CXXALIAS_SYS_CAST (btowc, wint_t, (int c));
170 # endif
171 # if __GLIBC__ >= 2
165172 _GL_CXXALIASWARN (btowc);
173 # endif
166174 #elif defined GNULIB_POSIXCHECK
167175 # undef btowc
168176 # if HAVE_RAW_DECL_BTOWC
188196 # endif
189197 _GL_CXXALIAS_SYS (wctob, int, (wint_t wc));
190198 # endif
199 # if __GLIBC__ >= 2
191200 _GL_CXXALIASWARN (wctob);
201 # endif
192202 #elif defined GNULIB_POSIXCHECK
193203 # undef wctob
194204 # if HAVE_RAW_DECL_WCTOB
213223 # endif
214224 _GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps));
215225 # endif
226 # if __GLIBC__ >= 2
216227 _GL_CXXALIASWARN (mbsinit);
228 # endif
217229 #elif defined GNULIB_POSIXCHECK
218230 # undef mbsinit
219231 # if HAVE_RAW_DECL_MBSINIT
231243 # define mbrtowc rpl_mbrtowc
232244 # endif
233245 _GL_FUNCDECL_RPL (mbrtowc, size_t,
234 (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
246 (wchar_t *restrict pwc, const char *restrict s, size_t n,
247 mbstate_t *restrict ps));
235248 _GL_CXXALIAS_RPL (mbrtowc, size_t,
236 (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
249 (wchar_t *restrict pwc, const char *restrict s, size_t n,
250 mbstate_t *restrict ps));
237251 # else
238252 # if !@HAVE_MBRTOWC@
239253 _GL_FUNCDECL_SYS (mbrtowc, size_t,
240 (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
254 (wchar_t *restrict pwc, const char *restrict s, size_t n,
255 mbstate_t *restrict ps));
241256 # endif
242257 _GL_CXXALIAS_SYS (mbrtowc, size_t,
243 (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
244 # endif
258 (wchar_t *restrict pwc, const char *restrict s, size_t n,
259 mbstate_t *restrict ps));
260 # endif
261 # if __GLIBC__ >= 2
245262 _GL_CXXALIASWARN (mbrtowc);
263 # endif
246264 #elif defined GNULIB_POSIXCHECK
247265 # undef mbrtowc
248266 # if HAVE_RAW_DECL_MBRTOWC
259277 # undef mbrlen
260278 # define mbrlen rpl_mbrlen
261279 # endif
262 _GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
263 _GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
280 _GL_FUNCDECL_RPL (mbrlen, size_t,
281 (const char *restrict s, size_t n, mbstate_t *restrict ps));
282 _GL_CXXALIAS_RPL (mbrlen, size_t,
283 (const char *restrict s, size_t n, mbstate_t *restrict ps));
264284 # else
265285 # if !@HAVE_MBRLEN@
266 _GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
267 # endif
268 _GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
269 # endif
286 _GL_FUNCDECL_SYS (mbrlen, size_t,
287 (const char *restrict s, size_t n, mbstate_t *restrict ps));
288 # endif
289 _GL_CXXALIAS_SYS (mbrlen, size_t,
290 (const char *restrict s, size_t n, mbstate_t *restrict ps));
291 # endif
292 # if __GLIBC__ >= 2
270293 _GL_CXXALIASWARN (mbrlen);
294 # endif
271295 #elif defined GNULIB_POSIXCHECK
272296 # undef mbrlen
273297 # if HAVE_RAW_DECL_MBRLEN
285309 # define mbsrtowcs rpl_mbsrtowcs
286310 # endif
287311 _GL_FUNCDECL_RPL (mbsrtowcs, size_t,
288 (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
312 (wchar_t *restrict dest,
313 const char **restrict srcp, size_t len,
314 mbstate_t *restrict ps)
289315 _GL_ARG_NONNULL ((2)));
290316 _GL_CXXALIAS_RPL (mbsrtowcs, size_t,
291 (wchar_t *dest, const char **srcp, size_t len,
292 mbstate_t *ps));
317 (wchar_t *restrict dest,
318 const char **restrict srcp, size_t len,
319 mbstate_t *restrict ps));
293320 # else
294321 # if !@HAVE_MBSRTOWCS@
295322 _GL_FUNCDECL_SYS (mbsrtowcs, size_t,
296 (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
323 (wchar_t *restrict dest,
324 const char **restrict srcp, size_t len,
325 mbstate_t *restrict ps)
297326 _GL_ARG_NONNULL ((2)));
298327 # endif
299328 _GL_CXXALIAS_SYS (mbsrtowcs, size_t,
300 (wchar_t *dest, const char **srcp, size_t len,
301 mbstate_t *ps));
302 # endif
329 (wchar_t *restrict dest,
330 const char **restrict srcp, size_t len,
331 mbstate_t *restrict ps));
332 # endif
333 # if __GLIBC__ >= 2
303334 _GL_CXXALIASWARN (mbsrtowcs);
335 # endif
304336 #elif defined GNULIB_POSIXCHECK
305337 # undef mbsrtowcs
306338 # if HAVE_RAW_DECL_MBSRTOWCS
318350 # define mbsnrtowcs rpl_mbsnrtowcs
319351 # endif
320352 _GL_FUNCDECL_RPL (mbsnrtowcs, size_t,
321 (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
322 mbstate_t *ps)
353 (wchar_t *restrict dest,
354 const char **restrict srcp, size_t srclen, size_t len,
355 mbstate_t *restrict ps)
323356 _GL_ARG_NONNULL ((2)));
324357 _GL_CXXALIAS_RPL (mbsnrtowcs, size_t,
325 (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
326 mbstate_t *ps));
358 (wchar_t *restrict dest,
359 const char **restrict srcp, size_t srclen, size_t len,
360 mbstate_t *restrict ps));
327361 # else
328362 # if !@HAVE_MBSNRTOWCS@
329363 _GL_FUNCDECL_SYS (mbsnrtowcs, size_t,
330 (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
331 mbstate_t *ps)
364 (wchar_t *restrict dest,
365 const char **restrict srcp, size_t srclen, size_t len,
366 mbstate_t *restrict ps)
332367 _GL_ARG_NONNULL ((2)));
333368 # endif
334369 _GL_CXXALIAS_SYS (mbsnrtowcs, size_t,
335 (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
336 mbstate_t *ps));
370 (wchar_t *restrict dest,
371 const char **restrict srcp, size_t srclen, size_t len,
372 mbstate_t *restrict ps));
337373 # endif
338374 _GL_CXXALIASWARN (mbsnrtowcs);
339375 #elif defined GNULIB_POSIXCHECK
352388 # undef wcrtomb
353389 # define wcrtomb rpl_wcrtomb
354390 # endif
355 _GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
356 _GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
391 _GL_FUNCDECL_RPL (wcrtomb, size_t,
392 (char *restrict s, wchar_t wc, mbstate_t *restrict ps));
393 _GL_CXXALIAS_RPL (wcrtomb, size_t,
394 (char *restrict s, wchar_t wc, mbstate_t *restrict ps));
357395 # else
358396 # if !@HAVE_WCRTOMB@
359 _GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
360 # endif
361 _GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
362 # endif
397 _GL_FUNCDECL_SYS (wcrtomb, size_t,
398 (char *restrict s, wchar_t wc, mbstate_t *restrict ps));
399 # endif
400 _GL_CXXALIAS_SYS (wcrtomb, size_t,
401 (char *restrict s, wchar_t wc, mbstate_t *restrict ps));
402 # endif
403 # if __GLIBC__ >= 2
363404 _GL_CXXALIASWARN (wcrtomb);
405 # endif
364406 #elif defined GNULIB_POSIXCHECK
365407 # undef wcrtomb
366408 # if HAVE_RAW_DECL_WCRTOMB
378420 # define wcsrtombs rpl_wcsrtombs
379421 # endif
380422 _GL_FUNCDECL_RPL (wcsrtombs, size_t,
381 (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
423 (char *restrict dest, const wchar_t **restrict srcp,
424 size_t len,
425 mbstate_t *restrict ps)
382426 _GL_ARG_NONNULL ((2)));
383427 _GL_CXXALIAS_RPL (wcsrtombs, size_t,
384 (char *dest, const wchar_t **srcp, size_t len,
385 mbstate_t *ps));
428 (char *restrict dest, const wchar_t **restrict srcp,
429 size_t len,
430 mbstate_t *restrict ps));
386431 # else
387432 # if !@HAVE_WCSRTOMBS@
388433 _GL_FUNCDECL_SYS (wcsrtombs, size_t,
389 (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
434 (char *restrict dest, const wchar_t **restrict srcp,
435 size_t len,
436 mbstate_t *restrict ps)
390437 _GL_ARG_NONNULL ((2)));
391438 # endif
392439 _GL_CXXALIAS_SYS (wcsrtombs, size_t,
393 (char *dest, const wchar_t **srcp, size_t len,
394 mbstate_t *ps));
395 # endif
440 (char *restrict dest, const wchar_t **restrict srcp,
441 size_t len,
442 mbstate_t *restrict ps));
443 # endif
444 # if __GLIBC__ >= 2
396445 _GL_CXXALIASWARN (wcsrtombs);
446 # endif
397447 #elif defined GNULIB_POSIXCHECK
398448 # undef wcsrtombs
399449 # if HAVE_RAW_DECL_WCSRTOMBS
411461 # define wcsnrtombs rpl_wcsnrtombs
412462 # endif
413463 _GL_FUNCDECL_RPL (wcsnrtombs, size_t,
414 (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
415 mbstate_t *ps)
464 (char *restrict dest,
465 const wchar_t **restrict srcp, size_t srclen,
466 size_t len,
467 mbstate_t *restrict ps)
416468 _GL_ARG_NONNULL ((2)));
417469 _GL_CXXALIAS_RPL (wcsnrtombs, size_t,
418 (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
419 mbstate_t *ps));
420 # else
421 # if !@HAVE_WCSNRTOMBS@
470 (char *restrict dest,
471 const wchar_t **restrict srcp, size_t srclen,
472 size_t len,
473 mbstate_t *restrict ps));
474 # else
475 # if !@HAVE_WCSNRTOMBS@ || (defined __cplusplus && defined __sun)
422476 _GL_FUNCDECL_SYS (wcsnrtombs, size_t,
423 (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
424 mbstate_t *ps)
477 (char *restrict dest,
478 const wchar_t **restrict srcp, size_t srclen,
479 size_t len,
480 mbstate_t *restrict ps)
425481 _GL_ARG_NONNULL ((2)));
426482 # endif
427483 _GL_CXXALIAS_SYS (wcsnrtombs, size_t,
428 (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
429 mbstate_t *ps));
430 # endif
484 (char *restrict dest,
485 const wchar_t **restrict srcp, size_t srclen,
486 size_t len,
487 mbstate_t *restrict ps));
488 # endif
489 # if __GLIBC__ >= 2
431490 _GL_CXXALIASWARN (wcsnrtombs);
491 # endif
432492 #elif defined GNULIB_POSIXCHECK
433493 # undef wcsnrtombs
434494 # if HAVE_RAW_DECL_WCSNRTOMBS
454514 # endif
455515 _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
456516 # endif
517 # if __GLIBC__ >= 2
457518 _GL_CXXALIASWARN (wcwidth);
519 # endif
458520 #elif defined GNULIB_POSIXCHECK
459521 # undef wcwidth
460522 # if HAVE_RAW_DECL_WCWIDTH
483545 _GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
484546 _GL_CXXALIASWARN1 (wmemchr, const wchar_t *,
485547 (const wchar_t *s, wchar_t c, size_t n));
486 # else
548 # elif __GLIBC__ >= 2
487549 _GL_CXXALIASWARN (wmemchr);
488550 # endif
489551 #elif defined GNULIB_POSIXCHECK
504566 # endif
505567 _GL_CXXALIAS_SYS (wmemcmp, int,
506568 (const wchar_t *s1, const wchar_t *s2, size_t n));
569 # if __GLIBC__ >= 2
507570 _GL_CXXALIASWARN (wmemcmp);
571 # endif
508572 #elif defined GNULIB_POSIXCHECK
509573 # undef wmemcmp
510574 # if HAVE_RAW_DECL_WMEMCMP
518582 #if @GNULIB_WMEMCPY@
519583 # if !@HAVE_WMEMCPY@
520584 _GL_FUNCDECL_SYS (wmemcpy, wchar_t *,
521 (wchar_t *dest, const wchar_t *src, size_t n));
585 (wchar_t *restrict dest,
586 const wchar_t *restrict src, size_t n));
522587 # endif
523588 _GL_CXXALIAS_SYS (wmemcpy, wchar_t *,
524 (wchar_t *dest, const wchar_t *src, size_t n));
589 (wchar_t *restrict dest,
590 const wchar_t *restrict src, size_t n));
591 # if __GLIBC__ >= 2
525592 _GL_CXXALIASWARN (wmemcpy);
593 # endif
526594 #elif defined GNULIB_POSIXCHECK
527595 # undef wmemcpy
528596 # if HAVE_RAW_DECL_WMEMCPY
541609 # endif
542610 _GL_CXXALIAS_SYS (wmemmove, wchar_t *,
543611 (wchar_t *dest, const wchar_t *src, size_t n));
612 # if __GLIBC__ >= 2
544613 _GL_CXXALIASWARN (wmemmove);
614 # endif
545615 #elif defined GNULIB_POSIXCHECK
546616 # undef wmemmove
547617 # if HAVE_RAW_DECL_WMEMMOVE
557627 _GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
558628 # endif
559629 _GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
630 # if __GLIBC__ >= 2
560631 _GL_CXXALIASWARN (wmemset);
632 # endif
561633 #elif defined GNULIB_POSIXCHECK
562634 # undef wmemset
563635 # if HAVE_RAW_DECL_WMEMSET
573645 _GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE);
574646 # endif
575647 _GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s));
648 # if __GLIBC__ >= 2
576649 _GL_CXXALIASWARN (wcslen);
650 # endif
577651 #elif defined GNULIB_POSIXCHECK
578652 # undef wcslen
579653 # if HAVE_RAW_DECL_WCSLEN
603677 /* Copy SRC to DEST. */
604678 #if @GNULIB_WCSCPY@
605679 # if !@HAVE_WCSCPY@
606 _GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
607 # endif
608 _GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
680 _GL_FUNCDECL_SYS (wcscpy, wchar_t *,
681 (wchar_t *restrict dest, const wchar_t *restrict src));
682 # endif
683 _GL_CXXALIAS_SYS (wcscpy, wchar_t *,
684 (wchar_t *restrict dest, const wchar_t *restrict src));
685 # if __GLIBC__ >= 2
609686 _GL_CXXALIASWARN (wcscpy);
687 # endif
610688 #elif defined GNULIB_POSIXCHECK
611689 # undef wcscpy
612690 # if HAVE_RAW_DECL_WCSCPY
619697 /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */
620698 #if @GNULIB_WCPCPY@
621699 # if !@HAVE_WCPCPY@
622 _GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
623 # endif
624 _GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
700 _GL_FUNCDECL_SYS (wcpcpy, wchar_t *,
701 (wchar_t *restrict dest, const wchar_t *restrict src));
702 # endif
703 _GL_CXXALIAS_SYS (wcpcpy, wchar_t *,
704 (wchar_t *restrict dest, const wchar_t *restrict src));
625705 _GL_CXXALIASWARN (wcpcpy);
626706 #elif defined GNULIB_POSIXCHECK
627707 # undef wcpcpy
636716 #if @GNULIB_WCSNCPY@
637717 # if !@HAVE_WCSNCPY@
638718 _GL_FUNCDECL_SYS (wcsncpy, wchar_t *,
639 (wchar_t *dest, const wchar_t *src, size_t n));
719 (wchar_t *restrict dest,
720 const wchar_t *restrict src, size_t n));
640721 # endif
641722 _GL_CXXALIAS_SYS (wcsncpy, wchar_t *,
642 (wchar_t *dest, const wchar_t *src, size_t n));
723 (wchar_t *restrict dest,
724 const wchar_t *restrict src, size_t n));
725 # if __GLIBC__ >= 2
643726 _GL_CXXALIASWARN (wcsncpy);
727 # endif
644728 #elif defined GNULIB_POSIXCHECK
645729 # undef wcsncpy
646730 # if HAVE_RAW_DECL_WCSNCPY
655739 #if @GNULIB_WCPNCPY@
656740 # if !@HAVE_WCPNCPY@
657741 _GL_FUNCDECL_SYS (wcpncpy, wchar_t *,
658 (wchar_t *dest, const wchar_t *src, size_t n));
742 (wchar_t *restrict dest,
743 const wchar_t *restrict src, size_t n));
659744 # endif
660745 _GL_CXXALIAS_SYS (wcpncpy, wchar_t *,
661 (wchar_t *dest, const wchar_t *src, size_t n));
746 (wchar_t *restrict dest,
747 const wchar_t *restrict src, size_t n));
662748 _GL_CXXALIASWARN (wcpncpy);
663749 #elif defined GNULIB_POSIXCHECK
664750 # undef wcpncpy
672758 /* Append SRC onto DEST. */
673759 #if @GNULIB_WCSCAT@
674760 # if !@HAVE_WCSCAT@
675 _GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
676 # endif
677 _GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
761 _GL_FUNCDECL_SYS (wcscat, wchar_t *,
762 (wchar_t *restrict dest, const wchar_t *restrict src));
763 # endif
764 _GL_CXXALIAS_SYS (wcscat, wchar_t *,
765 (wchar_t *restrict dest, const wchar_t *restrict src));
766 # if __GLIBC__ >= 2
678767 _GL_CXXALIASWARN (wcscat);
768 # endif
679769 #elif defined GNULIB_POSIXCHECK
680770 # undef wcscat
681771 # if HAVE_RAW_DECL_WCSCAT
689779 #if @GNULIB_WCSNCAT@
690780 # if !@HAVE_WCSNCAT@
691781 _GL_FUNCDECL_SYS (wcsncat, wchar_t *,
692 (wchar_t *dest, const wchar_t *src, size_t n));
782 (wchar_t *restrict dest, const wchar_t *restrict src,
783 size_t n));
693784 # endif
694785 _GL_CXXALIAS_SYS (wcsncat, wchar_t *,
695 (wchar_t *dest, const wchar_t *src, size_t n));
786 (wchar_t *restrict dest, const wchar_t *restrict src,
787 size_t n));
788 # if __GLIBC__ >= 2
696789 _GL_CXXALIASWARN (wcsncat);
790 # endif
697791 #elif defined GNULIB_POSIXCHECK
698792 # undef wcsncat
699793 # if HAVE_RAW_DECL_WCSNCAT
710804 _GL_ATTRIBUTE_PURE);
711805 # endif
712806 _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
807 # if __GLIBC__ >= 2
713808 _GL_CXXALIASWARN (wcscmp);
809 # endif
714810 #elif defined GNULIB_POSIXCHECK
715811 # undef wcscmp
716812 # if HAVE_RAW_DECL_WCSCMP
729825 # endif
730826 _GL_CXXALIAS_SYS (wcsncmp, int,
731827 (const wchar_t *s1, const wchar_t *s2, size_t n));
828 # if __GLIBC__ >= 2
732829 _GL_CXXALIASWARN (wcsncmp);
830 # endif
733831 #elif defined GNULIB_POSIXCHECK
734832 # undef wcsncmp
735833 # if HAVE_RAW_DECL_WCSNCMP
782880 _GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
783881 # endif
784882 _GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
883 # if __GLIBC__ >= 2
785884 _GL_CXXALIASWARN (wcscoll);
885 # endif
786886 #elif defined GNULIB_POSIXCHECK
787887 # undef wcscoll
788888 # if HAVE_RAW_DECL_WCSCOLL
797897 original strings. */
798898 #if @GNULIB_WCSXFRM@
799899 # if !@HAVE_WCSXFRM@
800 _GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
801 # endif
802 _GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
900 _GL_FUNCDECL_SYS (wcsxfrm, size_t,
901 (wchar_t *restrict s1, const wchar_t *restrict s2, size_t n));
902 # endif
903 _GL_CXXALIAS_SYS (wcsxfrm, size_t,
904 (wchar_t *restrict s1, const wchar_t *restrict s2, size_t n));
905 # if __GLIBC__ >= 2
803906 _GL_CXXALIASWARN (wcsxfrm);
907 # endif
804908 #elif defined GNULIB_POSIXCHECK
805909 # undef wcsxfrm
806910 # if HAVE_RAW_DECL_WCSXFRM
844948 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
845949 _GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc));
846950 _GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
847 # else
951 # elif __GLIBC__ >= 2
848952 _GL_CXXALIASWARN (wcschr);
849953 # endif
850954 #elif defined GNULIB_POSIXCHECK
874978 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
875979 _GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc));
876980 _GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
877 # else
981 # elif __GLIBC__ >= 2
878982 _GL_CXXALIASWARN (wcsrchr);
879983 # endif
880984 #elif defined GNULIB_POSIXCHECK
894998 _GL_ATTRIBUTE_PURE);
895999 # endif
8961000 _GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
1001 # if __GLIBC__ >= 2
8971002 _GL_CXXALIASWARN (wcscspn);
1003 # endif
8981004 #elif defined GNULIB_POSIXCHECK
8991005 # undef wcscspn
9001006 # if HAVE_RAW_DECL_WCSCSPN
9121018 _GL_ATTRIBUTE_PURE);
9131019 # endif
9141020 _GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
1021 # if __GLIBC__ >= 2
9151022 _GL_CXXALIASWARN (wcsspn);
1023 # endif
9161024 #elif defined GNULIB_POSIXCHECK
9171025 # undef wcsspn
9181026 # if HAVE_RAW_DECL_WCSSPN
9431051 (wchar_t *wcs, const wchar_t *accept));
9441052 _GL_CXXALIASWARN1 (wcspbrk, const wchar_t *,
9451053 (const wchar_t *wcs, const wchar_t *accept));
946 # else
1054 # elif __GLIBC__ >= 2
9471055 _GL_CXXALIASWARN (wcspbrk);
9481056 # endif
9491057 #elif defined GNULIB_POSIXCHECK
9591067 #if @GNULIB_WCSSTR@
9601068 # if !@HAVE_WCSSTR@
9611069 _GL_FUNCDECL_SYS (wcsstr, wchar_t *,
962 (const wchar_t *haystack, const wchar_t *needle)
1070 (const wchar_t *restrict haystack,
1071 const wchar_t *restrict needle)
9631072 _GL_ATTRIBUTE_PURE);
9641073 # endif
9651074 /* On some systems, this function is defined as an overloaded function:
9681077 wchar_t * std::wcsstr (wchar_t *, const wchar_t *);
9691078 } */
9701079 _GL_CXXALIAS_SYS_CAST2 (wcsstr,
971 wchar_t *, (const wchar_t *, const wchar_t *),
972 const wchar_t *, (const wchar_t *, const wchar_t *));
1080 wchar_t *,
1081 (const wchar_t *restrict, const wchar_t *restrict),
1082 const wchar_t *,
1083 (const wchar_t *restrict, const wchar_t *restrict));
9731084 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
9741085 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
9751086 _GL_CXXALIASWARN1 (wcsstr, wchar_t *,
976 (wchar_t *haystack, const wchar_t *needle));
1087 (wchar_t *restrict haystack,
1088 const wchar_t *restrict needle));
9771089 _GL_CXXALIASWARN1 (wcsstr, const wchar_t *,
978 (const wchar_t *haystack, const wchar_t *needle));
979 # else
1090 (const wchar_t *restrict haystack,
1091 const wchar_t *restrict needle));
1092 # elif __GLIBC__ >= 2
9801093 _GL_CXXALIASWARN (wcsstr);
9811094 # endif
9821095 #elif defined GNULIB_POSIXCHECK
9901103
9911104 /* Divide WCS into tokens separated by characters in DELIM. */
9921105 #if @GNULIB_WCSTOK@
993 # if !@HAVE_WCSTOK@
1106 # if @REPLACE_WCSTOK@
1107 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1108 # undef wcstok
1109 # define wcstok rpl_wcstok
1110 # endif
1111 _GL_FUNCDECL_RPL (wcstok, wchar_t *,
1112 (wchar_t *restrict wcs, const wchar_t *restrict delim,
1113 wchar_t **restrict ptr));
1114 _GL_CXXALIAS_RPL (wcstok, wchar_t *,
1115 (wchar_t *restrict wcs, const wchar_t *restrict delim,
1116 wchar_t **restrict ptr));
1117 # else
1118 # if !@HAVE_WCSTOK@
9941119 _GL_FUNCDECL_SYS (wcstok, wchar_t *,
995 (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
996 # endif
1120 (wchar_t *restrict wcs, const wchar_t *restrict delim,
1121 wchar_t **restrict ptr));
1122 # endif
9971123 _GL_CXXALIAS_SYS (wcstok, wchar_t *,
998 (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
1124 (wchar_t *restrict wcs, const wchar_t *restrict delim,
1125 wchar_t **restrict ptr));
1126 # endif
1127 # if __GLIBC__ >= 2
9991128 _GL_CXXALIASWARN (wcstok);
1129 # endif
10001130 #elif defined GNULIB_POSIXCHECK
10011131 # undef wcstok
10021132 # if HAVE_RAW_DECL_WCSTOK
10241154 # endif
10251155 _GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n));
10261156 # endif
1157 # if __GLIBC__ >= 2
10271158 _GL_CXXALIASWARN (wcswidth);
1159 # endif
10281160 #elif defined GNULIB_POSIXCHECK
10291161 # undef wcswidth
10301162 # if HAVE_RAW_DECL_WCSWIDTH
10351167
10361168
10371169 /* Convert *TP to a date and time wide string. See
1038 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/wcsftime.html>. */
1170 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/wcsftime.html>. */
10391171 #if @GNULIB_WCSFTIME@
10401172 # if @REPLACE_WCSFTIME@
10411173 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
10421174 # undef wcsftime
10431175 # define wcsftime rpl_wcsftime
10441176 # endif
1045 _GL_FUNCDECL_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
1046 const wchar_t *__fmt, const struct tm *__tp)
1047 _GL_ARG_NONNULL ((1, 3, 4)));
1048 _GL_CXXALIAS_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
1049 const wchar_t *__fmt, const struct tm *__tp));
1177 _GL_FUNCDECL_RPL (wcsftime, size_t,
1178 (wchar_t *restrict __buf, size_t __bufsize,
1179 const wchar_t *restrict __fmt,
1180 const struct tm *restrict __tp)
1181 _GL_ARG_NONNULL ((1, 3, 4)));
1182 _GL_CXXALIAS_RPL (wcsftime, size_t,
1183 (wchar_t *restrict __buf, size_t __bufsize,
1184 const wchar_t *restrict __fmt,
1185 const struct tm *restrict __tp));
10501186 # else
10511187 # if !@HAVE_WCSFTIME@
1052 _GL_FUNCDECL_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
1053 const wchar_t *__fmt, const struct tm *__tp)
1054 _GL_ARG_NONNULL ((1, 3, 4)));
1055 # endif
1056 _GL_CXXALIAS_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
1057 const wchar_t *__fmt, const struct tm *__tp));
1058 # endif
1188 _GL_FUNCDECL_SYS (wcsftime, size_t,
1189 (wchar_t *restrict __buf, size_t __bufsize,
1190 const wchar_t *restrict __fmt,
1191 const struct tm *restrict __tp)
1192 _GL_ARG_NONNULL ((1, 3, 4)));
1193 # endif
1194 _GL_CXXALIAS_SYS (wcsftime, size_t,
1195 (wchar_t *restrict __buf, size_t __bufsize,
1196 const wchar_t *restrict __fmt,
1197 const struct tm *restrict __tp));
1198 # endif
1199 # if __GLIBC__ >= 2
10591200 _GL_CXXALIASWARN (wcsftime);
1201 # endif
10601202 #elif defined GNULIB_POSIXCHECK
10611203 # undef wcsftime
10621204 # if HAVE_RAW_DECL_WCSFTIME
00 /* Substitute for and wrapper around <unistd.h>.
1 Copyright (C) 2003-2018 Free Software Foundation, Inc.
1 Copyright (C) 2003-2020 Free Software Foundation, Inc.
22
33 This program is free software; you can redistribute it and/or modify
44 it under the terms of the GNU Lesser General Public License as published by
2020 #endif
2121 @PRAGMA_COLUMNS@
2222
23 #ifdef _GL_INCLUDING_UNISTD_H
23 #if @HAVE_UNISTD_H@ && defined _GL_INCLUDING_UNISTD_H
2424 /* Special invocation convention:
2525 - On Mac OS X 10.3.9 we have a sequence of nested includes
2626 <unistd.h> -> <signal.h> -> <pthread.h> -> <unistd.h>
5151 #define _@GUARD_PREFIX@_UNISTD_H
5252
5353 /* NetBSD 5.0 mis-defines NULL. Also get size_t. */
54 #include <stddef.h>
54 /* But avoid namespace pollution on glibc systems. */
55 #ifndef __GLIBC__
56 # include <stddef.h>
57 #endif
5558
5659 /* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */
5760 /* MSVC declares 'unlink' in <stdio.h>, not in <unistd.h>. We must include
6770 # include <stdio.h>
6871 #endif
6972
70 /* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */
73 /* Cygwin 1.7.1 and Android 4.3 declare unlinkat in <fcntl.h>, not in
74 <unistd.h>. */
7175 /* But avoid namespace pollution on glibc systems. */
72 #if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \
76 #if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) \
77 && (defined __CYGWIN__ || defined __ANDROID__) \
7378 && ! defined __GLIBC__
7479 # include <fcntl.h>
7580 #endif
112117 # include <netdb.h>
113118 #endif
114119
120 /* Android 4.3 declares fchownat in <sys/stat.h>, not in <unistd.h>. */
121 /* But avoid namespace pollution on glibc systems. */
122 #if (@GNULIB_FCHOWNAT@ || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \
123 && !defined __GLIBC__
124 # include <sys/stat.h>
125 #endif
126
115127 /* MSVC defines off_t in <sys/types.h>.
116128 May also define off_t to a 64-bit type on native Windows. */
117 #if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@
118 /* Get off_t. */
129 /* But avoid namespace pollution on glibc systems. */
130 #ifndef __GLIBC__
131 /* Get off_t, ssize_t. */
119132 # include <sys/types.h>
120133 #endif
121134
122 #if (@GNULIB_READ@ || @GNULIB_WRITE@ \
123 || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
124 || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK)
125 /* Get ssize_t. */
126 # include <sys/types.h>
127 #endif
128
129135 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
130136
131137 /* The definition of _GL_ARG_NONNULL is copied here. */
134140
135141
136142 /* Get getopt(), optarg, optind, opterr, optopt. */
137 #if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
143 #if @GNULIB_GETOPT_POSIX@ && @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
138144 # include <getopt-cdefs.h>
139145 # include <getopt-pfx-core.h>
140146 #endif
246252 /* Declare overridden functions. */
247253
248254
249 #if defined GNULIB_POSIXCHECK
255 #if @GNULIB_ACCESS@
256 # if @REPLACE_ACCESS@
257 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
258 # undef access
259 # define access rpl_access
260 # endif
261 _GL_FUNCDECL_RPL (access, int, (const char *file, int mode)
262 _GL_ARG_NONNULL ((1)));
263 _GL_CXXALIAS_RPL (access, int, (const char *file, int mode));
264 # else
265 _GL_CXXALIAS_SYS (access, int, (const char *file, int mode));
266 # endif
267 _GL_CXXALIASWARN (access);
268 #elif defined GNULIB_POSIXCHECK
269 # undef access
270 # if HAVE_RAW_DECL_ACCESS
250271 /* The access() function is a security risk. */
251 _GL_WARN_ON_USE (access, "the access function is a security risk - "
272 _GL_WARN_ON_USE (access, "access does not always support X_OK - "
273 "use gnulib module access for portability; "
274 "also, this function is a security risk - "
252275 "use the gnulib module faccessat instead");
276 # endif
253277 #endif
254278
255279
270294 to GID (if GID is not -1). Follow symbolic links.
271295 Return 0 if successful, otherwise -1 and errno set.
272296 See the POSIX:2008 specification
273 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html. */
297 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html. */
274298 # if @REPLACE_CHOWN@
275299 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
276300 # undef chown
321345 #endif
322346
323347
348 #if @GNULIB_COPY_FILE_RANGE@
349 # if !@HAVE_COPY_FILE_RANGE@
350 _GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos,
351 int ofd, off_t *opos,
352 size_t len, unsigned flags));
353 _GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos,
354 int ofd, off_t *opos,
355 size_t len, unsigned flags));
356 # endif
357 _GL_CXXALIASWARN (copy_file_range);
358 #elif defined GNULIB_POSIXCHECK
359 /* Assume copy_file_range is always declared. */
360 _GL_WARN_ON_USE (copy_file_range,
361 "copy_file_range is unportable - "
362 "use gnulib module copy_file_range for portability");
363 #endif
364
365
324366 #if @GNULIB_DUP@
325367 # if @REPLACE_DUP@
326368 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
346388 NEWFD = OLDFD, otherwise close NEWFD first if it is open.
347389 Return newfd if successful, otherwise -1 and errno set.
348390 See the POSIX:2008 specification
349 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/dup2.html>. */
391 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/dup2.html>. */
350392 # if @REPLACE_DUP2@
351393 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
352394 # define dup2 rpl_dup2
501543 the given file descriptor is open.
502544 Return 0 if successful, otherwise -1 and errno set.
503545 See the POSIX:2008 specification
504 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html>. */
546 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html>. */
505547 # if ! @HAVE_FCHDIR@
506548 _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
507549
562604 /* Synchronize changes to a file.
563605 Return 0 if successful, otherwise -1 and errno set.
564606 See POSIX:2008 specification
565 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>. */
607 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>. */
566608 # if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@
567609 _GL_FUNCDECL_SYS (fdatasync, int, (int fd));
568610 # endif
581623 /* Synchronize changes, including metadata, to a file.
582624 Return 0 if successful, otherwise -1 and errno set.
583625 See POSIX:2008 specification
584 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html>. */
626 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html>. */
585627 # if !@HAVE_FSYNC@
586628 _GL_FUNCDECL_SYS (fsync, int, (int fd));
587629 # endif
600642 /* Change the size of the file to which FD is opened to become equal to LENGTH.
601643 Return 0 if successful, otherwise -1 and errno set.
602644 See the POSIX:2008 specification
603 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>. */
645 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>. */
604646 # if @REPLACE_FTRUNCATE@
605647 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
606648 # undef ftruncate
630672 Return BUF if successful, or NULL if the directory couldn't be determined
631673 or SIZE was too small.
632674 See the POSIX:2008 specification
633 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html>.
675 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html>.
634676 Additionally, the gnulib module 'getcwd' guarantees the following GNU
635677 extension: If BUF is NULL, an array is allocated with 'malloc'; the array
636678 is SIZE bytes long, unless SIZE == 0, in which case it is as big as
706748 # if !@HAVE_GETDTABLESIZE@
707749 _GL_FUNCDECL_SYS (getdtablesize, int, (void));
708750 # endif
709 _GL_CXXALIAS_SYS (getdtablesize, int, (void));
751 /* Need to cast, because on AIX, the parameter list is
752 (...). */
753 _GL_CXXALIAS_SYS_CAST (getdtablesize, int, (void));
710754 # endif
711755 _GL_CXXALIASWARN (getdtablesize);
712756 #elif defined GNULIB_POSIXCHECK
790834 /* Returns the user's login name, or NULL if it cannot be found. Upon error,
791835 returns NULL with errno set.
792836
793 See <http://www.opengroup.org/susv3xsh/getlogin.html>.
837 See <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getlogin.html>.
794838
795839 Most programs don't need to use this function, because the information is
796840 available through environment variables:
819863 the case that the login name cannot be found but no specific error is
820864 provided (this case is hopefully rare but is left open by the POSIX spec).
821865
822 See <http://www.opengroup.org/susv3xsh/getlogin.html>.
866 See <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getlogin.html>.
823867
824868 Most programs don't need to use this function, because the information is
825869 available through environment variables:
860904 _GL_FUNCDECL_RPL (getpagesize, int, (void));
861905 _GL_CXXALIAS_RPL (getpagesize, int, (void));
862906 # else
907 /* On HP-UX, getpagesize exists, but it is not declared in <unistd.h> even if
908 the compiler options -D_HPUX_SOURCE -D_XOPEN_SOURCE=600 are used. */
909 # if defined __hpux
910 _GL_FUNCDECL_SYS (getpagesize, int, (void));
911 # endif
863912 # if !@HAVE_GETPAGESIZE@
864913 # if !defined getpagesize
865914 /* This is for POSIX systems. */
10541103 to GID (if GID is not -1). Do not follow symbolic links.
10551104 Return 0 if successful, otherwise -1 and errno set.
10561105 See the POSIX:2008 specification
1057 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lchown.html>. */
1106 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/lchown.html>. */
10581107 # if @REPLACE_LCHOWN@
10591108 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
10601109 # undef lchown
10841133 /* Create a new hard link for an existing file.
10851134 Return 0 if successful, otherwise -1 and errno set.
10861135 See POSIX:2008 specification
1087 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html>. */
1136 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html>. */
10881137 # if @REPLACE_LINK@
10891138 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
10901139 # define link rpl_link
11501199 /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
11511200 Return the new offset if successful, otherwise -1 and errno set.
11521201 See the POSIX:2008 specification
1153 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html>. */
1202 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html>. */
11541203 # if @REPLACE_LSEEK@
11551204 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
11561205 # define lseek rpl_lseek
12221271 Return the number of bytes placed into BUF if successful, otherwise
12231272 set errno and return -1. 0 indicates EOF.
12241273 See the POSIX:2008 specification
1225 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html>. */
1274 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html>. */
12261275 # if @REPLACE_PREAD@
12271276 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
12281277 # undef pread
12571306 Return the number of bytes written if successful, otherwise
12581307 set errno and return -1. 0 indicates nothing written. See the
12591308 POSIX:2008 specification
1260 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pwrite.html>. */
1309 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/pwrite.html>. */
12611310 # if @REPLACE_PWRITE@
12621311 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
12631312 # undef pwrite
12901339 #if @GNULIB_READ@
12911340 /* Read up to COUNT bytes from file descriptor FD into the buffer starting
12921341 at BUF. See the POSIX:2008 specification
1293 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html>. */
1342 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html>. */
12941343 # if @REPLACE_READ@
12951344 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
12961345 # undef read
13141363 bytes of it into BUF. Return the number of bytes placed into BUF if
13151364 successful, otherwise -1 and errno set.
13161365 See the POSIX:2008 specification
1317 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>. */
1366 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>. */
13181367 # if @REPLACE_READLINK@
13191368 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
13201369 # define readlink rpl_readlink
13211370 # endif
13221371 _GL_FUNCDECL_RPL (readlink, ssize_t,
1323 (const char *file, char *buf, size_t bufsize)
1372 (const char *restrict file,
1373 char *restrict buf, size_t bufsize)
13241374 _GL_ARG_NONNULL ((1, 2)));
13251375 _GL_CXXALIAS_RPL (readlink, ssize_t,
1326 (const char *file, char *buf, size_t bufsize));
1376 (const char *restrict file,
1377 char *restrict buf, size_t bufsize));
13271378 # else
13281379 # if !@HAVE_READLINK@
13291380 _GL_FUNCDECL_SYS (readlink, ssize_t,
1330 (const char *file, char *buf, size_t bufsize)
1381 (const char *restrict file,
1382 char *restrict buf, size_t bufsize)
13311383 _GL_ARG_NONNULL ((1, 2)));
13321384 # endif
13331385 _GL_CXXALIAS_SYS (readlink, ssize_t,
1334 (const char *file, char *buf, size_t bufsize));
1386 (const char *restrict file,
1387 char *restrict buf, size_t bufsize));
13351388 # endif
13361389 _GL_CXXALIASWARN (readlink);
13371390 #elif defined GNULIB_POSIXCHECK
13491402 # define readlinkat rpl_readlinkat
13501403 # endif
13511404 _GL_FUNCDECL_RPL (readlinkat, ssize_t,
1352 (int fd, char const *file, char *buf, size_t len)
1405 (int fd, char const *restrict file,
1406 char *restrict buf, size_t len)
13531407 _GL_ARG_NONNULL ((2, 3)));
13541408 _GL_CXXALIAS_RPL (readlinkat, ssize_t,
1355 (int fd, char const *file, char *buf, size_t len));
1409 (int fd, char const *restrict file,
1410 char *restrict buf, size_t len));
13561411 # else
13571412 # if !@HAVE_READLINKAT@
13581413 _GL_FUNCDECL_SYS (readlinkat, ssize_t,
1359 (int fd, char const *file, char *buf, size_t len)
1414 (int fd, char const *restrict file,
1415 char *restrict buf, size_t len)
13601416 _GL_ARG_NONNULL ((2, 3)));
13611417 # endif
13621418 _GL_CXXALIAS_SYS (readlinkat, ssize_t,
1363 (int fd, char const *file, char *buf, size_t len));
1419 (int fd, char const *restrict file,
1420 char *restrict buf, size_t len));
13641421 # endif
13651422 _GL_CXXALIASWARN (readlinkat);
13661423 #elif defined GNULIB_POSIXCHECK
14241481 /* Pause the execution of the current thread for N seconds.
14251482 Returns the number of seconds left to sleep.
14261483 See the POSIX:2008 specification
1427 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/sleep.html>. */
1484 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/sleep.html>. */
14281485 # if @REPLACE_SLEEP@
14291486 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
14301487 # undef sleep
15081565 /* Change the size of the file designated by FILENAME to become equal to LENGTH.
15091566 Return 0 if successful, otherwise -1 and errno set.
15101567 See the POSIX:2008 specification
1511 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html>. */
1568 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html>. */
15121569 # if @REPLACE_TRUNCATE@
15131570 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
15141571 # undef truncate
16151672 /* Pause the execution of the current thread for N microseconds.
16161673 Returns 0 on completion, or -1 on range error.
16171674 See the POSIX:2001 specification
1618 <http://www.opengroup.org/susv3xsh/usleep.html>. */
1675 <https://pubs.opengroup.org/onlinepubs/009695399/functions/usleep.html>. */
16191676 # if @REPLACE_USLEEP@
16201677 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
16211678 # undef usleep
16271684 # if !@HAVE_USLEEP@
16281685 _GL_FUNCDECL_SYS (usleep, int, (useconds_t n));
16291686 # endif
1630 _GL_CXXALIAS_SYS (usleep, int, (useconds_t n));
1687 /* Need to cast, because on Haiku, the first parameter is
1688 unsigned int n. */
1689 _GL_CXXALIAS_SYS_CAST (usleep, int, (useconds_t n));
16311690 # endif
16321691 _GL_CXXALIASWARN (usleep);
16331692 #elif defined GNULIB_POSIXCHECK
16421701 #if @GNULIB_WRITE@
16431702 /* Write up to COUNT bytes starting at BUF to file descriptor FD.
16441703 See the POSIX:2008 specification
1645 <http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>. */
1704 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>. */
16461705 # if @REPLACE_WRITE@
16471706 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
16481707 # undef write
00 /* A C macro for emitting warnings if a function is used.
1 Copyright (C) 2010-2018 Free Software Foundation, Inc.
1 Copyright (C) 2010-2020 Free Software Foundation, Inc.
22
33 This program is free software: you can redistribute it and/or modify it
44 under the terms of the GNU Lesser General Public License as published
00 # Process this file with autoconf to produce a pkg-config metadata file.
1 # Copyright 2002-2018 Simon Josefsson
1 # Copyright 2002-2020 Simon Josefsson
22 #
33 # Copying and distribution of this file, with or without modification,
44 # are permitted in any medium without royalty provided the copyright
00 Name: libntlm
1 Version: 1.5
1 Version: 1.6
22 Release: 1
33 Group: Development/Libraries
44 Summary: Microsoft WinNT domain authentication library
40624062 if AC_TRY_EVAL(ac_compile); then
40634063 # Now try to grab the symbols.
40644064 nlist=conftest.nm
4065 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4065 $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
4066 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
40664067 # Try sorting and uniquifying the output.
40674068 if sort "$nlist" | uniq > "$nlist"T; then
40684069 mv -f "$nlist"T "$nlist"
64376438 # Commands to make compiler produce verbose output that lists
64386439 # what "hidden" libraries, object files and flags are used when
64396440 # linking a shared library.
6440 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6441 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
64416442
64426443 else
64436444 GXX=no
68126813 # explicitly linking system object files so we need to strip them
68136814 # from the output so that they don't get included in the library
68146815 # dependencies.
6815 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6816 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
68166817 ;;
68176818 *)
68186819 if test yes = "$GXX"; then
68776878 # explicitly linking system object files so we need to strip them
68786879 # from the output so that they don't get included in the library
68796880 # dependencies.
6880 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6881 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
68816882 ;;
68826883 *)
68836884 if test yes = "$GXX"; then
72167217 # Commands to make compiler produce verbose output that lists
72177218 # what "hidden" libraries, object files and flags are used when
72187219 # linking a shared library.
7219 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7220 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
72207221
72217222 else
72227223 # FIXME: insert proper C++ library support
73007301 # Commands to make compiler produce verbose output that lists
73017302 # what "hidden" libraries, object files and flags are used when
73027303 # linking a shared library.
7303 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7304 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
73047305 else
73057306 # g++ 2.7 appears to require '-G' NOT '-shared' on this
73067307 # platform.
73117312 # Commands to make compiler produce verbose output that lists
73127313 # what "hidden" libraries, object files and flags are used when
73137314 # linking a shared library.
7314 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7315 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
73157316 fi
73167317
73177318 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
11 # This Makefile fragment tries to be general-purpose enough to be
22 # used by many projects via the gnulib maintainer-makefile module.
33
4 ## Copyright (C) 2001-2018 Free Software Foundation, Inc.
4 ## Copyright (C) 2001-2020 Free Software Foundation, Inc.
55 ##
66 ## This program is free software: you can redistribute it and/or modify
77 ## it under the terms of the GNU General Public License as published by
2020 # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
2121 ME := maint.mk
2222
23 # These variables ought to be defined through the configure.ac section
24 # of the module description. But some packages import this file directly,
25 # ignoring the module description.
26 AWK ?= awk
27 GREP ?= grep
28 SED ?= sed
29
2330 # Helper variables.
2431 _empty =
2532 _sp = $(_empty) $(_empty)
4552 # Do not save the original name or timestamp in the .tar.gz file.
4653 # Use --rsyncable if available.
4754 gzip_rsyncable := \
48 $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null \
55 $(shell gzip --help 2>/dev/null|$(GREP) rsyncable >/dev/null \
4956 && printf %s --rsyncable)
5057 GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
5158
8289 $(or $(exclude_file_name_regexp--$@),^$$)
8390 VC_LIST_EXCEPT = \
8491 $(VC_LIST) | $(SED) 's|^$(_dot_escaped_srcdir)/||' \
85 | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
86 else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \
87 | grep -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \
92 | if test -f $(srcdir)/.x-$@; then $(GREP) -vEf $(srcdir)/.x-$@; \
93 else $(GREP) -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \
94 | $(GREP) -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \
8895 $(_prepend_srcdir_prefix)
8996
9097 ifeq ($(origin prev_version_file), undefined)
183190 @end=$$(date +%s.%N); \
184191 start=$$(cat .sc-start-$*); \
185192 rm -f .sc-start-$*; \
186 awk -v s=$$start -v e=$$end \
193 $(AWK) -v s=$$start -v e=$$end \
187194 'END {printf "%.2f $(patsubst sc_%,%,$*)\n", e - s}' < /dev/null
188195
189196 # The patsubst here is to replace each sc_% rule with its sc_%.z wrapper
291298 \
292299 : Filter by file name; \
293300 if test -n "$$in_files"; then \
294 files=$$(find $(srcdir) | grep -E "$$in_files" \
295 | grep -Ev '$(_sc_excl)'); \
301 files=$$(find $(srcdir) | $(GREP) -E "$$in_files" \
302 | $(GREP) -Ev '$(_sc_excl)'); \
296303 else \
297304 files=$$($(VC_LIST_EXCEPT)); \
298305 if test -n "$$in_vc_files"; then \
299 files=$$(echo "$$files" | grep -E "$$in_vc_files"); \
306 files=$$(echo "$$files" | $(GREP) -E "$$in_vc_files"); \
300307 fi; \
301308 fi; \
302309 \
303310 : Filter by content; \
304 test -n "$$files" && test -n "$$containing" \
305 && { files=$$(grep -l "$$containing" $$files); } || :; \
306 test -n "$$files" && test -n "$$non_containing" \
307 && { files=$$(grep -vl "$$non_containing" $$files); } || :; \
311 test -n "$$files" \
312 && test -n "$$containing" \
313 && { files=$$(echo "$$files" | xargs $(GREP) -l "$$containing"); } \
314 || :; \
315 test -n "$$files" \
316 && test -n "$$non_containing" \
317 && { files=$$(echo "$$files" | xargs $(GREP) -vl "$$non_containing"); } \
318 || :; \
308319 \
309320 : Check for the construct; \
310321 if test -n "$$files"; then \
311322 if test -n "$$prohibit"; then \
312 grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \
313 | grep -vE "$${exclude:-^$$}" \
314 && { msg="$$halt" $(_sc_say_and_exit) } || :; \
323 echo "$$files" \
324 | xargs $(GREP) $$with_grep_options $(_ignore_case) -nE \
325 "$$prohibit" /dev/null \
326 | $(GREP) -vE "$${exclude:-^$$}" \
327 && { msg="$$halt" $(_sc_say_and_exit) } \
328 || :; \
315329 else \
316 grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \
317 | grep . \
318 && { msg="$$halt" $(_sc_say_and_exit) } || :; \
330 echo "$$files" \
331 | xargs \
332 $(GREP) $$with_grep_options $(_ignore_case) -LE "$$require" \
333 | $(GREP) . \
334 && { msg="$$halt" $(_sc_say_and_exit) } \
335 || :; \
319336 fi \
320337 else :; \
321338 fi || :;
322339 endef
323340
324341 sc_avoid_if_before_free:
325 @$(srcdir)/$(_build-aux)/useless-if-before-free \
326 $(useless_free_options) \
327 $$($(VC_LIST_EXCEPT) | grep -v useless-if-before-free) && \
328 { echo '$(ME): found useless "if" before "free" above' 1>&2; \
329 exit 1; } || :
342 @$(VC_LIST_EXCEPT) \
343 | $(GREP) -v useless-if-before-free \
344 | xargs \
345 $(srcdir)/$(_build-aux)/useless-if-before-free \
346 $(useless_free_options) \
347 && { printf '$(ME): found useless "if"' \
348 ' before "free" above\n' 1>&2; \
349 exit 1; } \
350 || :
330351
331352 sc_cast_of_argument_to_free:
332353 @prohibit='\<free *\( *\(' halt="don't cast free argument" \
387408 halt='use EXIT_* values rather than magic number' \
388409 $(_sc_search_regexp)
389410
411 # Check that we don't use $< in non-implicit Makefile rules.
412 #
413 # To find the Makefiles, trace AC_CONFIG_FILES. Using VC_LIST would
414 # miss the Makefiles that are not under VC control (e.g., symlinks
415 # installed for gettext). "Parsing" (recursive) uses of SUBDIRS seems
416 # too delicate.
417 #
418 # Use GNU Make's --print-data-base to normalize the rules into some
419 # easy to parse format: they are separated by two \n. Look for the
420 # "section" about non-pattern rules (marked with "# Files") inside
421 # which there are still the POSIX Make like implicit rules (".c.o").
422 sc_prohibit_gnu_make_extensions_awk_ = \
423 BEGIN { \
424 RS = "\n\n"; \
425 in_rules = 0; \
426 } \
427 /^\# Files/ { \
428 in_rules = 1; \
429 } \
430 /\$$</ && in_rules && $$0 !~ /^(.*\n)*\.\w+(\.\w+)?:/ { \
431 print "Error: " file ": $$< in a non implicit rule\n" $$0; \
432 status = 1; \
433 } \
434 END { \
435 exit status; \
436 }
437 sc_prohibit_gnu_make_extensions:
438 @if $(AWK) --version | grep GNU >/dev/null 2>&1; then \
439 (cd $(srcdir) && autoconf --trace AC_CONFIG_FILES:'$$1') | \
440 tr ' ' '\n' | \
441 $(SED) -ne '/Makefile/{s/\.in$$//;p;}' | \
442 while read m; do \
443 $(MAKE) -qp -f $$m .DUMMY-TARGET 2>/dev/null | \
444 $(AWK) -v file=$$m -e '$($@_awk_)' || exit 1; \
445 done; \
446 fi
447
390448 # Using EXIT_SUCCESS as the first argument to error is misleading,
391449 # since when that parameter is 0, error does not exit. Use '0' instead.
392450 sc_error_exit_success:
398456 # "FATAL:" should be fully upper-cased in error messages
399457 # "WARNING:" should be fully upper-cased, or fully lower-cased
400458 sc_error_message_warn_fatal:
401 @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \
402 | grep -E '"Warning|"Fatal|"fatal' && \
403 { echo '$(ME): use FATAL, WARNING or warning' 1>&2; \
404 exit 1; } || :
459 @$(VC_LIST_EXCEPT) \
460 | xargs $(GREP) -nEA2 '[^rp]error *\(' /dev/null \
461 | $(GREP) -E '"Warning|"Fatal|"fatal' \
462 && { echo '$(ME): use FATAL, WARNING or warning' 1>&2; \
463 exit 1; } \
464 || :
405465
406466 # Error messages should not start with a capital letter
407467 sc_error_message_uppercase:
408 @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \
409 | grep -E '"[A-Z]' \
410 | grep -vE '"FATAL|"WARNING|"Java|"C#|PRIuMAX' && \
411 { echo '$(ME): found capitalized error message' 1>&2; \
412 exit 1; } || :
468 @$(VC_LIST_EXCEPT) \
469 | xargs $(GREP) -nEA2 '[^rp]error *\(' /dev/null \
470 | $(GREP) -E '"[A-Z]' \
471 | $(GREP) -vE '"FATAL|"WARNING|"Java|"C#|PRIuMAX' \
472 && { echo '$(ME): found capitalized error message' 1>&2; \
473 exit 1; } \
474 || :
413475
414476 # Error messages should not end with a period
415477 sc_error_message_period:
416 @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \
417 | grep -E '[^."]\."' && \
418 { echo '$(ME): found error message ending in period' 1>&2; \
419 exit 1; } || :
478 @$(VC_LIST_EXCEPT) \
479 | xargs $(GREP) -nEA2 '[^rp]error *\(' /dev/null \
480 | $(GREP) -E '[^."]\."' \
481 && { echo '$(ME): found error message ending in period' 1>&2; \
482 exit 1; } \
483 || :
420484
421485 sc_file_system:
422486 @prohibit=file''system \
458522 # You must include <config.h> before including any other header file.
459523 # This can possibly be via a package-specific header, if given by cfg.mk.
460524 sc_require_config_h_first:
461 @if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
462 files=$$($(VC_LIST_EXCEPT) | grep '\.c$$') && \
525 @if $(VC_LIST_EXCEPT) | $(GREP) '\.c$$' > /dev/null; then \
526 files=$$($(VC_LIST_EXCEPT) | $(GREP) '\.c$$') && \
463527 perl -n $(perl_config_h_first_) $$files || \
464528 { echo '$(ME): the above files include some other header' \
465529 'before <config.h>' 1>&2; exit 1; } || :; \
477541 define _sc_header_without_use
478542 dummy=; : so we do not need a semicolon before each use; \
479543 h_esc=`echo '[<"]'"$$h"'[">]'|$(SED) 's/\./\\\\./g'`; \
480 if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
481 files=$$(grep -l '^# *include '"$$h_esc" \
482 $$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \
483 grep -LE "$$re" $$files | grep . && \
544 if $(VC_LIST_EXCEPT) | $(GREP) '\.c$$' > /dev/null; then \
545 files=$$($(GREP) -l '^# *include '"$$h_esc" \
546 $$($(VC_LIST_EXCEPT) | $(GREP) '\.c$$')) && \
547 $(GREP) -LE "$$re" $$files | $(GREP) . && \
484548 { echo "$(ME): the above files include $$h but don't use it" \
485549 1>&2; exit 1; } || :; \
486550 else :; \
510574
511575 # Don't include this header unless you use one of its functions.
512576 sc_prohibit_long_options_without_use:
513 @h='long-options.h' re='\<parse_long_options *\(' \
577 @h='long-options.h' re='\<parse_(long_options|gnu_standard_options_only) *\(' \
514578 $(_sc_header_without_use)
515579
516580 # Don't include this header unless you use one of its functions.
571635 @h='posixver.h' re='\<posix2_version *\(' $(_sc_header_without_use)
572636
573637 sc_prohibit_same_without_use:
574 @h='same.h' re='\<same_name *\(' $(_sc_header_without_use)
638 @h='same.h' re='\<same_name(at)? *\(' $(_sc_header_without_use)
575639
576640 sc_prohibit_hash_pjw_without_use:
577641 @h='hash-pjw.h' \
584648
585649 sc_prohibit_argmatch_without_use:
586650 @h='argmatch.h' \
587 re='(\<(ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<(invalid_arg|argmatch(_exit_fn|_(in)?valid)?) *\()' \
651 re='(\<(ARGMATCH_DEFINE_GROUP|ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<(invalid_arg|argmatch(_exit_fn|_(in)?valid)?) *\()' \
588652 $(_sc_header_without_use)
589653
590654 sc_prohibit_canonicalize_without_use:
734798 sc_require_test_exit_idiom:
735799 @if test -f $(srcdir)/$(Exit_witness_file); then \
736800 die=0; \
737 for i in $$(grep -l -F 'srcdir/$(Exit_base)' \
801 for i in $$($(GREP) -l -F 'srcdir/$(Exit_base)' \
738802 $$($(VC_LIST) tests)); do \
739 tail -n1 $$i | grep '^Exit .' > /dev/null \
803 tail -n1 $$i | $(GREP) '^Exit .' > /dev/null \
740804 && : || { die=1; echo $$i; } \
741805 done; \
742806 test $$die = 1 && \
841905 # Don't define macros that we already get from gnulib header files.
842906 sc_prohibit_always-defined_macros:
843907 @if test -d $(gnulib_dir); then \
844 case $$(echo all: | grep -l -f - Makefile) in Makefile);; *) \
908 case $$(echo all: | $(GREP) -l -f - Makefile) in Makefile);; *) \
845909 echo '$(ME): skipping $@: you lack GNU grep' 1>&2; exit 0;; \
846910 esac; \
847 $(def_sym_regex) | grep -E -f - $$($(VC_LIST_EXCEPT)) \
848 && { echo '$(ME): define the above via some gnulib .h file' \
849 1>&2; exit 1; } || :; \
911 regex=$$($(def_sym_regex)); export regex; \
912 $(VC_LIST_EXCEPT) \
913 | xargs sh -c 'echo $$regex | $(GREP) -E -f - "$$@"' \
914 dummy /dev/null \
915 && { printf '$(ME): define the above' \
916 ' via some gnulib .h file\n' 1>&2; \
917 exit 1; } \
918 || :; \
850919 fi
851920 # ==================================================================
852921
853922 # Prohibit checked in backup files.
854923 sc_prohibit_backup_files:
855 @$(VC_LIST) | grep '~$$' && \
924 @$(VC_LIST) | $(GREP) '~$$' && \
856925 { echo '$(ME): found version controlled backup file' 1>&2; \
857926 exit 1; } || :
858927
926995 } \
927996 END { exit defined $$fail }
928997 sc_prohibit_empty_lines_at_EOF:
929 @perl -le '$(require_exactly_one_NL_at_EOF_)' $$($(VC_LIST_EXCEPT)) \
930 || { echo '$(ME): empty line(s) or no newline at EOF' \
931 1>&2; exit 1; } || :
998 @$(VC_LIST_EXCEPT) \
999 | xargs perl -le '$(require_exactly_one_NL_at_EOF_)' \
1000 || { echo '$(ME): empty line(s) or no newline at EOF' 1>&2; \
1001 exit 1; } \
1002 || :
9321003
9331004 # Make sure we don't use st_blocks. Use ST_NBLOCKS instead.
9341005 # This is a bit of a kludge, since it prevents use of the string
9711042 ignore_doubled_word_match_RE_ ?= ^$$
9721043
9731044 sc_prohibit_doubled_word:
974 @perl -n -0777 $(prohibit_doubled_word_) $$($(VC_LIST_EXCEPT)) \
975 | grep -vE '$(ignore_doubled_word_match_RE_)' \
976 | grep . && { echo '$(ME): doubled words' 1>&2; exit 1; } || :
1045 @$(VC_LIST_EXCEPT) \
1046 | xargs perl -n -0777 $(prohibit_doubled_word_) \
1047 | $(GREP) -vE '$(ignore_doubled_word_match_RE_)' \
1048 | $(GREP) . \
1049 && { echo '$(ME): doubled words' 1>&2; exit 1; } \
1050 || :
9771051
9781052 # A regular expression matching undesirable combinations of words like
9791053 # "can not"; this matches them even when the two words appear on different
9971071 ignore_undesirable_word_sequence_RE_ ?= ^$$
9981072
9991073 sc_prohibit_undesirable_word_seq:
1000 @perl -n -0777 $(prohibit_undesirable_word_seq_) \
1001 $$($(VC_LIST_EXCEPT)) \
1002 | grep -vE '$(ignore_undesirable_word_sequence_RE_)' | grep . \
1003 && { echo '$(ME): undesirable word sequence' >&2; exit 1; } || :
1074 @$(VC_LIST_EXCEPT) \
1075 | xargs perl -n -0777 $(prohibit_undesirable_word_seq_) \
1076 | $(GREP) -vE '$(ignore_undesirable_word_sequence_RE_)' \
1077 | $(GREP) . \
1078 && { echo '$(ME): undesirable word sequence' >&2; exit 1; } \
1079 || :
10041080
10051081 # Except for shell files and for loops, double semicolon is probably a mistake
10061082 sc_prohibit_double_semicolon:
10321108 # definition of LDADD from the appropriate Makefile.am and exits 0
10331109 # when it contains "ICONV".
10341110 sc_proper_name_utf8_requires_ICONV:
1035 @progs=$$(grep -l 'proper_name_utf8 ''("' $$($(VC_LIST_EXCEPT)));\
1111 @progs=$$($(VC_LIST_EXCEPT) \
1112 | xargs $(GREP) -l 'proper_name_utf8 ''("'); \
10361113 if test "x$$progs" != x; then \
10371114 fail=0; \
10381115 for p in $$progs; do \
10411118 -ne 'exit !(/^LDADD =(.+?[^\\]\n)/ms && $$1 =~ /ICONV/)' \
10421119 $$dir/Makefile.am && continue; \
10431120 base=$$(basename "$$p" .c); \
1044 grep "$${base}_LDADD.*ICONV)" $$dir/Makefile.am > /dev/null \
1121 $(GREP) "$${base}_LDADD.*ICONV)" $$dir/Makefile.am > /dev/null \
10451122 || { fail=1; echo 1>&2 "$(ME): $$p uses proper_name_utf8"; }; \
10461123 done; \
10471124 test $$fail = 1 && \
11021179 -e ' && !/(\w+)\s+=.*\@\1\@$$/' \
11031180 -e ''$(_makefile_at_at_check_exceptions) \
11041181 -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \
1105 $$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \
1182 $$($(VC_LIST_EXCEPT) | $(GREP) -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \
11061183 && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
11071184
11081185 news-check: NEWS
11091186 $(AM_V_GEN)if $(SED) -n $(news-check-lines-spec)p $< \
1110 | grep -E $(news-check-regexp) >/dev/null; then \
1187 | $(GREP) -E $(news-check-regexp) >/dev/null; then \
11111188 :; \
11121189 else \
11131190 echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2; \
11521229 _gl_translatable_string_re ?= \b(N?_|gettext *)\([^)"]*("|$$)
11531230 sc_po_check:
11541231 @if test -f $(po_file); then \
1155 grep -E -v '^(#|$$)' $(po_file) \
1156 | grep -v '^src/false\.c$$' | sort > $@-1; \
1157 files=$$(perl $(perl_translatable_files_list_) \
1158 $$($(VC_LIST_EXCEPT)) $(generated_files)); \
1159 grep -E -l '$(_gl_translatable_string_re)' $$files \
1160 | $(SED) 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2; \
1232 $(GREP) -E -v '^(#|$$)' $(po_file) \
1233 | $(GREP) -v '^src/false\.c$$' | sort > $@-1; \
1234 { $(VC_LIST_EXCEPT); echo $(generated_files); } \
1235 | xargs perl $(perl_translatable_files_list_) \
1236 | xargs $(GREP) -E -l '$(_gl_translatable_string_re)' \
1237 | $(SED) 's|^$(_dot_escaped_srcdir)/||' \
1238 | sort -u > $@-2; \
11611239 diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \
11621240 || { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \
11631241 rm -f $@-1 $@-2; \
12211299 _hv_regex_strong ?= ^ *\. "\$${srcdir=\.}/init\.sh"
12221300 sc_cross_check_PATH_usage_in_tests:
12231301 @if test -f $(_hv_file); then \
1224 grep -l 'VERSION mismatch' $(_hv_file) >/dev/null \
1302 $(GREP) -l 'VERSION mismatch' $(_hv_file) >/dev/null \
12251303 || { echo "$@: skipped: no such file: $(_hv_file)" 1>&2; \
12261304 exit 0; }; \
1227 grep -lE '$(_hv_regex_strong)' $(_hv_file) >/dev/null \
1305 $(GREP) -lE '$(_hv_regex_strong)' $(_hv_file) >/dev/null \
12281306 || { echo "$@: $(_hv_file) lacks conforming use of init.sh" 1>&2; \
12291307 exit 1; }; \
1230 good=$$(grep -E '$(_hv_regex_strong)' $(_hv_file)); \
1231 grep -LFx "$$good" \
1232 $$(grep -lE '$(_hv_regex_weak)' $$($(VC_LIST_EXCEPT))) \
1233 | grep . && \
1234 { echo "$(ME): the above files use path_prepend_ inconsistently" \
1235 1>&2; exit 1; } || :; \
1308 good=$$($(GREP) -E '$(_hv_regex_strong)' $(_hv_file)); \
1309 $(VC_LIST_EXCEPT) \
1310 | xargs $(GREP) -lE '$(_hv_regex_weak)' \
1311 | xargs $(GREP) -LFx "$$good" \
1312 | $(GREP) . \
1313 && { printf "$(ME): the above files use" \
1314 " path_prepend_ inconsistently\n" 1>&2; \
1315 exit 1; } \
1316 || :; \
12361317 fi
12371318
12381319 # BRE regex of file contents to identify a test script.
13041385 $$(cd $(srcdir) \
13051386 && git cat-file tag v$(VERSION) \
13061387 | $(gpgv) --status-fd 1 --keyring /dev/null - - 2>/dev/null \
1307 | awk '/^\[GNUPG:\] ERRSIG / {print $$3; exit}')
1388 | $(AWK) '/^\[GNUPG:\] ERRSIG / {print $$3; exit}')
13081389
13091390 translation_project_ ?= coordinator@translationproject.org
13101391
14251506 ALL_RECURSIVE_TARGETS += alpha beta stable
14261507 alpha beta stable: $(local-check) writable-files $(submodule-checks)
14271508 $(AM_V_GEN)test $@ = stable \
1428 && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
1509 && { echo $(VERSION) | $(GREP) -E '^[0-9]+(\.[0-9]+)+$$' \
14291510 || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
14301511 || :
14311512 $(AM_V_at)$(MAKE) vc-diff-check
15231604 -e 'END{defined $$d and print $$d}' bootstrap.conf); \
15241605 test -n "$$t" && gl=$$t; \
15251606 fi; \
1526 for diff in $$(cd $$gl; git ls-files | grep '\.diff$$'); do \
1607 for diff in $$(cd $$gl; git ls-files | $(GREP) '\.diff$$'); do \
15271608 b=$$(printf %s "$$diff"|$(SED) 's/\.diff$$//'); \
15281609 VERSION_CONTROL=none \
15291610 patch "$(gnulib_dir)/$$b" "$$gl/$$diff" || exit 1; \
15661647 # in the file .x-update-copyright.
15671648 .PHONY: update-copyright
15681649 update-copyright:
1569 $(AM_V_GEN)grep -l -w Copyright \
1650 $(AM_V_GEN)$(GREP) -l -w Copyright \
15701651 $$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \
15711652 | $(update-copyright-env) xargs $(srcdir)/$(_build-aux)/$@
15721653
15801661 ALL_RECURSIVE_TARGETS += sc_tight_scope
15811662 sc_tight_scope: tight-scope.mk
15821663 @fail=0; \
1583 if ! grep '^ *export _gl_TS_headers *=' $(srcdir)/cfg.mk \
1664 if ! $(GREP) '^ *export _gl_TS_headers *=' $(srcdir)/cfg.mk \
15841665 > /dev/null \
1585 && ! grep -w noinst_HEADERS $(srcdir)/$(_gl_TS_dir)/Makefile.am \
1666 && ! $(GREP) -w noinst_HEADERS $(srcdir)/$(_gl_TS_dir)/Makefile.am \
15861667 > /dev/null 2>&1; then \
15871668 echo '$(ME): skipping $@'; \
15881669 else \
16541735 hdr=`for f in $(_gl_TS_headers); do \
16551736 test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \
16561737 ( printf '%s\n' '__.*' $(_gl_TS_unmarked_extern_functions); \
1657 grep -h -A1 '^extern .*[^;]$$' $$src \
1658 | grep -vE '^(extern |--|#)' | $(SED) 's/ .*//; /^$$/d'; \
1738 $(GREP) -h -A1 '^extern .*[^;]$$' $$src \
1739 | $(GREP) -vE '^(extern |--|#)' | $(SED) 's/ .*//; /^$$/d'; \
16591740 perl -lne \
16601741 '$(_gl_TS_function_match) and print $$1' $$hdr; \
16611742 ) | sort -u | $(SED) "$$sed_wrap" > $$t; \
1662 nm -g $(_gl_TS_obj_files)|$(SED) -n 's/.* T //p'|grep -Ev -f $$t \
1743 nm -g $(_gl_TS_obj_files)|$(SED) -n 's/.* T //p'|$(GREP) -Ev -f $$t \
16631744 && { echo the above functions should have static scope >&2; \
16641745 exit 1; } || : ; \
16651746 ( printf '%s\n' '__.*' main $(_gl_TS_unmarked_extern_vars); \
16671748 $$hdr $(_gl_TS_other_headers) \
16681749 ) | sort -u | $(SED) "$$sed_wrap" > $$t; \
16691750 nm -g $(_gl_TS_obj_files) | $(SED) -n 's/.* [BCDGRS] //p' \
1670 | sort -u | grep -Ev -f $$t \
1751 | sort -u | $(GREP) -Ev -f $$t \
16711752 && { echo the above variables should have static scope >&2; \
16721753 exit 1; } || :
16731754 # TS-end
3333 typedef unsigned int uint32;
3434 typedef unsigned char uint8;
3535
36 #define NTLM_VERSION "1.5"
36 #define NTLM_VERSION "1.6"
37
38 #define NTLM_MSG_BUFSIZE 1024
3739
3840 /*
3941 * These structures are byte-order dependant, and should not
5456 uint32 flags;
5557 tSmbStrHeader user;
5658 tSmbStrHeader domain;
57 uint8 buffer[1024];
59 uint8 buffer[NTLM_MSG_BUFSIZE];
5860 uint32 bufIndex;
5961 } tSmbNtlmAuthRequest;
6062
6769 uint8 challengeData[8];
6870 uint8 reserved[8];
6971 tSmbStrHeader emptyString;
70 uint8 buffer[1024];
72 uint8 buffer[NTLM_MSG_BUFSIZE];
7173 uint32 bufIndex;
7274 } tSmbNtlmAuthChallenge;
7375
8385 tSmbStrHeader uWks;
8486 tSmbStrHeader sessionKey;
8587 uint32 flags;
86 uint8 buffer[1024];
88 uint8 buffer[NTLM_MSG_BUFSIZE];
8789 uint32 bufIndex;
8890 } tSmbNtlmAuthResponse;
8991
3535
3636 #define NTLM_VERSION "@PACKAGE_VERSION@"
3737
38 #define NTLM_MSG_BUFSIZE 1024
39
3840 /*
3941 * These structures are byte-order dependant, and should not
4042 * be manipulated except by the use of the routines provided
5456 uint32 flags;
5557 tSmbStrHeader user;
5658 tSmbStrHeader domain;
57 uint8 buffer[1024];
59 uint8 buffer[NTLM_MSG_BUFSIZE];
5860 uint32 bufIndex;
5961 } tSmbNtlmAuthRequest;
6062
6769 uint8 challengeData[8];
6870 uint8 reserved[8];
6971 tSmbStrHeader emptyString;
70 uint8 buffer[1024];
72 uint8 buffer[NTLM_MSG_BUFSIZE];
7173 uint32 bufIndex;
7274 } tSmbNtlmAuthChallenge;
7375
8385 tSmbStrHeader uWks;
8486 tSmbStrHeader sessionKey;
8587 uint32 flags;
86 uint8 buffer[1024];
88 uint8 buffer[NTLM_MSG_BUFSIZE];
8789 uint32 bufIndex;
8890 } tSmbNtlmAuthResponse;
8991
00 /*
1 * Copyright (C) 2005-2018 Simon Josefsson
1 * Copyright (C) 2005-2020 Simon Josefsson
22 * Copyright (C) 1998-1999 Brian Bruns
33 * Copyright (C) 2004 Frediano Ziglio
44 *
00 /* smbutil.c --- Main library functions.
1 * Copyright (C) 2002-2018 Simon Josefsson
1 * Copyright (C) 2002-2020 Simon Josefsson
22 * Copyright (C) 1999-2001 Grant Edwards
33 * Copyright (C) 2004 Frediano Ziglio
44 *
4545
4646 /*
4747 * Must be multiple of two
48 * We use a statis buffer of 1024 bytes for message
48 * We use a statis buffer of NTLM_MSG_BUFSIZE [1024] bytes for message
4949 * At maximun we but 48 bytes (ntlm responses) and 3 unicode strings so
50 * NTLM_BUFSIZE * 3 + 48 <= 1024
50 * NTLM_BUFSIZE * 3 + 48 <= NTLM_MSG_BUFSIZE
5151 */
5252 #define NTLM_BUFSIZE 320
5353
6969 */
7070 #define AddBytes(ptr, header, buf, count) \
7171 { \
72 ptr->header.len = ptr->header.maxlen = UI16LE(count); \
72 size_t count2 = count; \
73 if (count2 > NTLM_MSG_BUFSIZE - ptr->bufIndex) \
74 count2 = NTLM_MSG_BUFSIZE - ptr->bufIndex; \
75 ptr->header.len = ptr->header.maxlen = UI16LE(count2); \
7376 ptr->header.offset = UI32LE((ptr->buffer - ((uint8*)ptr)) + ptr->bufIndex); \
74 memcpy(ptr->buffer+ptr->bufIndex, buf, count); \
75 ptr->bufIndex += count; \
77 memcpy(ptr->buffer+ptr->bufIndex, buf, count2); \
78 ptr->bufIndex += count2; \
7679 }
7780
7881 #define AddString(ptr, header, string) \
0 /* test_overflow.c --- Test for CVE-2019-17455 overflow bug for libntlm.
1 * Copyright (C) 2020 Simon Josefsson
2 *
3 * This file is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU Lesser General Public License as
5 * published by the Free Software Foundation; either version 2.1 of
6 * the License, or (at your option) any later version.
7 *
8 * This file is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this file; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
16 * 02110-1301, USA.
17 *
18 */
19
20 #include <config.h>
21
22 #include <string.h>
23 #include <stdio.h>
24
25 #include "ntlm.h"
26
27 int
28 main (void)
29 {
30 char u[1024];
31 char d[1024];
32 char buf[sizeof (tSmbNtlmAuthRequest) + 5];
33 tSmbNtlmAuthRequest *request = (void*) &buf;
34 size_t i;
35
36 memset (u, '1', 1024);
37 memset (d, '2', 1024);
38 u[1023] = '\0';
39 d[1023] = '\0';
40
41 memset (buf, '3', sizeof (buf));
42
43 printf ("Before call:\n");
44 for (i = sizeof (tSmbNtlmAuthRequest) - 5; i < sizeof (buf); i++)
45 printf ("str[end + %d] = %02x\n",
46 (int) (i - sizeof (tSmbNtlmAuthRequest)), (unsigned int) buf[i]);
47
48 buildSmbNtlmAuthRequest (request, u, d);
49
50 printf ("After call:\n");
51 for (i = sizeof (tSmbNtlmAuthRequest) - 5; i < sizeof (buf); i++)
52 printf ("str[end + %d] = %02x\n",
53 (int) (i - sizeof (tSmbNtlmAuthRequest)), (unsigned int) buf[i]);
54
55 for (i = sizeof (tSmbNtlmAuthRequest); i < sizeof (buf); i++)
56 if (buf[i] != '3')
57 return 1;
58
59 return 0;
60 }
00 /* test_ntlm.c --- Test module for libntlm.
1 * Copyright (C) 2008-2018 Simon Josefsson
1 * Copyright (C) 2008-2020 Simon Josefsson
22 * Copyright (C) 2004, 2005 Frediano Ziglio
33 *
44 * This file is free software; you can redistribute it and/or modify