Hash :
2458edc6
Author :
Date :
2024-05-20T14:55:11
getopt-posix: port better to Alpine 3.20.0_rc1 Alpineās <sys/cdefs.h> is a stub that issues a deprecation #warning. * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): * m4/sched_h.m4 (gl_SCHED_H): Use the new macro gl_CHECK_HEADER_SYS_CDEFS_H instead of checking independently. * m4/sys_cdefs_h.m4: New file. * modules/getopt-posix, modules/sched (Files): Add m4/sys_cdefs_h.m4.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
Description:
getopt() function: process command line arguments.
Files:
lib/getopt.c
lib/getopt1.c
lib/getopt.in.h
lib/getopt-cdefs.in.h
lib/getopt-core.h
lib/getopt-ext.h
lib/getopt-pfx-core.h
lib/getopt-pfx-ext.h
lib/getopt_int.h
m4/getopt.m4
m4/sys_cdefs_h.m4
Depends-on:
unistd
extensions
include_next
gen-header
gettext-h [test $REPLACE_GETOPT = 1]
snippet/arg-nonnull
configure.ac:
gl_FUNC_GETOPT_POSIX
gl_CONDITIONAL_HEADER([getopt.h])
gl_CONDITIONAL_HEADER([getopt-cdefs.h])
AC_PROG_MKDIR_P
gl_CONDITIONAL([GL_COND_OBJ_GETOPT], [test $REPLACE_GETOPT = 1])
AM_COND_IF([GL_COND_OBJ_GETOPT], [
dnl Define the substituted variable GNULIB_UNISTD_H_GETOPT to 1.
gl_UNISTD_H_REQUIRE_DEFAULTS
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT], [1])
])
gl_UNISTD_MODULE_INDICATOR([getopt-posix])
Makefile.am:
BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H)
# We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
if GL_GENERATE_GETOPT_H
getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
@NMD@ $(AM_V_GEN)$(MKDIR_P) '%reldir%'
$(gl_V_at)$(SED_HEADER_STDOUT) \
-e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
$(srcdir)/getopt.in.h > $@-t
$(AM_V_at)mv $@-t $@
else
getopt.h: $(top_builddir)/config.status
rm -f $@
endif
if GL_GENERATE_GETOPT_CDEFS_H
getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status
$(AM_V_GEN)$(SED_HEADER_STDOUT) \
-e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
$(srcdir)/getopt-cdefs.in.h > $@-t
$(AM_V_at)mv $@-t $@
else
getopt-cdefs.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t
if GL_COND_OBJ_GETOPT
lib_SOURCES += getopt.c getopt1.c
endif
Include:
<unistd.h>
License:
LGPLv2+
Maintainer:
all, glibc