Skip to content

Commit 861f9c1

Browse files
committed
Merge branch 'github-pull-46' into for-master
To make sure LFS is enabled everywhere, include config.h in all files, then enable LFS with AC_SYS_LARGEFILE autoconf macro. While at it, also enable _GNU_SOURCE with autoconf instead of doing it manually. Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2 parents f781aee + f6e243f commit 861f9c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+274
-49
lines changed

aclocal.m4

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
1515
# pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*-
16-
# serial 12 (pkg-config-0.29.2)
16+
# serial 13 (pkgconf)
1717

1818
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1919
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
@@ -29,9 +29,7 @@ dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2929
dnl General Public License for more details.
3030
dnl
3131
dnl You should have received a copy of the GNU General Public License
32-
dnl along with this program; if not, write to the Free Software
33-
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
34-
dnl 02111-1307, USA.
32+
dnl along with this program; if not, see <https://www.gnu.org/licenses/>.
3533
dnl
3634
dnl As a special exception to the GNU General Public License, if you
3735
dnl distribute this file as part of a program that contains a

config.h.in

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
/* Define to 1 if you have the 'memset' function. */
4747
#undef HAVE_MEMSET
4848

49+
/* Define to 1 if you have the <minix/config.h> header file. */
50+
#undef HAVE_MINIX_CONFIG_H
51+
4952
/* Define to 1 if you have a working 'mmap' system call. */
5053
#undef HAVE_MMAP
5154

@@ -161,6 +164,9 @@
161164
/* Define to 1 if you have the <vfork.h> header file. */
162165
#undef HAVE_VFORK_H
163166

167+
/* Define to 1 if you have the <wchar.h> header file. */
168+
#undef HAVE_WCHAR_H
169+
164170
/* Define to 1 if 'fork' works. */
165171
#undef HAVE_WORKING_FORK
166172

@@ -206,15 +212,119 @@
206212
backward compatibility; new code need not use it. */
207213
#undef STDC_HEADERS
208214

215+
/* Enable extensions on AIX, Interix, z/OS. */
216+
#ifndef _ALL_SOURCE
217+
# undef _ALL_SOURCE
218+
#endif
219+
/* Enable general extensions on macOS. */
220+
#ifndef _DARWIN_C_SOURCE
221+
# undef _DARWIN_C_SOURCE
222+
#endif
223+
/* Enable general extensions on Solaris. */
224+
#ifndef __EXTENSIONS__
225+
# undef __EXTENSIONS__
226+
#endif
227+
/* Enable GNU extensions on systems that have them. */
228+
#ifndef _GNU_SOURCE
229+
# undef _GNU_SOURCE
230+
#endif
231+
/* Enable X/Open compliant socket functions that do not require linking
232+
with -lxnet on HP-UX 11.11. */
233+
#ifndef _HPUX_ALT_XOPEN_SOCKET_API
234+
# undef _HPUX_ALT_XOPEN_SOCKET_API
235+
#endif
236+
/* Identify the host operating system as Minix.
237+
This macro does not affect the system headers' behavior.
238+
A future release of Autoconf may stop defining this macro. */
239+
#ifndef _MINIX
240+
# undef _MINIX
241+
#endif
242+
/* Enable general extensions on NetBSD.
243+
Enable NetBSD compatibility extensions on Minix. */
244+
#ifndef _NETBSD_SOURCE
245+
# undef _NETBSD_SOURCE
246+
#endif
247+
/* Enable OpenBSD compatibility extensions on NetBSD.
248+
Oddly enough, this does nothing on OpenBSD. */
249+
#ifndef _OPENBSD_SOURCE
250+
# undef _OPENBSD_SOURCE
251+
#endif
252+
/* Define to 1 if needed for POSIX-compatible behavior. */
253+
#ifndef _POSIX_SOURCE
254+
# undef _POSIX_SOURCE
255+
#endif
256+
/* Define to 2 if needed for POSIX-compatible behavior. */
257+
#ifndef _POSIX_1_SOURCE
258+
# undef _POSIX_1_SOURCE
259+
#endif
260+
/* Enable POSIX-compatible threading on Solaris. */
261+
#ifndef _POSIX_PTHREAD_SEMANTICS
262+
# undef _POSIX_PTHREAD_SEMANTICS
263+
#endif
264+
/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
265+
#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
266+
# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
267+
#endif
268+
/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
269+
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
270+
# undef __STDC_WANT_IEC_60559_BFP_EXT__
271+
#endif
272+
/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
273+
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
274+
# undef __STDC_WANT_IEC_60559_DFP_EXT__
275+
#endif
276+
/* Enable extensions specified by C23 Annex F. */
277+
#ifndef __STDC_WANT_IEC_60559_EXT__
278+
# undef __STDC_WANT_IEC_60559_EXT__
279+
#endif
280+
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
281+
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
282+
# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
283+
#endif
284+
/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */
285+
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
286+
# undef __STDC_WANT_IEC_60559_TYPES_EXT__
287+
#endif
288+
/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
289+
#ifndef __STDC_WANT_LIB_EXT2__
290+
# undef __STDC_WANT_LIB_EXT2__
291+
#endif
292+
/* Enable extensions specified by ISO/IEC 24747:2009. */
293+
#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
294+
# undef __STDC_WANT_MATH_SPEC_FUNCS__
295+
#endif
296+
/* Enable extensions on HP NonStop. */
297+
#ifndef _TANDEM_SOURCE
298+
# undef _TANDEM_SOURCE
299+
#endif
300+
/* Enable X/Open extensions. Define to 500 only if necessary
301+
to make mbstate_t available. */
302+
#ifndef _XOPEN_SOURCE
303+
# undef _XOPEN_SOURCE
304+
#endif
305+
306+
209307
/* Define to 1 if 'lex' declares 'yytext' as a 'char *' by default, not a
210308
'char[]'. */
211309
#undef YYTEXT_POINTER
212310

311+
/* Number of bits in a file offset, on hosts where this is settable. */
312+
#undef _FILE_OFFSET_BITS
313+
314+
/* Define to 1 on platforms where this makes off_t a 64-bit type. */
315+
#undef _LARGE_FILES
316+
317+
/* Number of bits in time_t, on hosts where this is settable. */
318+
#undef _TIME_BITS
319+
213320
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
214321
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
215322
#define below would cause a syntax error. */
216323
#undef _UINT32_T
217324

325+
/* Define to 1 on platforms where this makes time_t a 64-bit type. */
326+
#undef __MINGW_USE_VC2005_COMPAT
327+
218328
/* Define as 'int' if <sys/types.h> doesn't define. */
219329
#undef gid_t
220330

configure.ac

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ AC_PREFIX_DEFAULT([/usr])
77
sysconfdir=/etc
88
AC_SUBST([sysconfdir])
99

10+
AC_USE_SYSTEM_EXTENSIONS
11+
1012
# Checks for programs.
1113
AC_PROG_CC
1214
AC_PROG_MAKE_SET
@@ -24,6 +26,8 @@ m4_ifndef([PKG_PROG_PKG_CONFIG],
2426
./autogen.sh or autoreconf again. Make sure pkg-config is installed.])])
2527
PKG_PROG_PKG_CONFIG
2628

29+
AC_SYS_LARGEFILE
30+
2731
# Checks for header files.
2832
AC_FUNC_ALLOCA
2933
AC_CHECK_HEADERS([ \

features/sshfsroot/src/ask-pass/ask-pass.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
// SPDX-License-Identifier: GPL-3.0-or-later
2+
3+
#include "config.h"
4+
25
#include <stdio.h>
36
#include <termios.h>
47
#include <unistd.h>

runtime/src/chrooted/chrooted.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
// SPDX-License-Identifier: GPL-3.0-or-later
2+
3+
#include "config.h"
4+
25
#include <sys/stat.h>
36
#include <unistd.h>
47
#include <stdlib.h>

runtime/src/environ/environ.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
// SPDX-License-Identifier: GPL-3.0-or-later
2+
3+
#include "config.h"
4+
25
#include <sys/mman.h>
36
#include <sys/types.h>
47
#include <sys/stat.h>

runtime/src/halt/halt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
* Copyright (C) 1991-2004 Miquel van Smoorenburg.
3232
*/
3333

34+
#include "config.h"
35+
3436
#include <sys/types.h>
3537
#include <sys/stat.h>
3638
#include <sys/param.h>

runtime/src/halt/hddown.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
*/
88
const char *v_hddown = "@(#)hddown.c 1.02 22-Apr-2003 miquels@cistron.nl";
99

10-
#ifndef _GNU_SOURCE
11-
#define _GNU_SOURCE
12-
#endif
10+
#include "config.h"
11+
1312
#include <stdio.h>
1413
#include <stdlib.h>
1514
#include <unistd.h>

runtime/src/halt/ifdown.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
*/
88
const char *v_ifdown = "@(#)ifdown.c 1.11 02-Jun-1998 miquels@cistron.nl";
99

10+
#include "config.h"
11+
1012
#include <stdio.h>
1113
#include <stdlib.h>
1214
#include <unistd.h>

runtime/src/libinitramfs/console.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// SPDX-License-Identifier: GPL-3.0-or-later
22

3+
#include "config.h"
4+
35
#include <linux/kd.h>
46
#include <sys/ioctl.h>
57

0 commit comments

Comments
 (0)