]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
getopt: prefer - to _ in new file names
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Apr 2017 06:48:02 +0000 (23:48 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Apr 2017 07:52:20 +0000 (00:52 -0700)
* lib/getopt-cdefs.in.h: Rename from lib/getopt_cdefs.in.h.
* lib/getopt-core.h: Rename from lib/getopt_core.h.
* lib/getopt-ext.h: Rename from lib/getopt_ext.h.
* lib/getopt-pfx-core.h: Rename from lib/getopt_pfx_core.h.
* lib/getopt-pfx-ext.h: Rename from lib/getopt_pfx_ext.h.
All uses changed.

ChangeLog
lib/getopt-cdefs.in.h [moved from lib/getopt_cdefs.in.h with 95% similarity]
lib/getopt-core.h [moved from lib/getopt_core.h with 99% similarity]
lib/getopt-ext.h [moved from lib/getopt_ext.h with 99% similarity]
lib/getopt-pfx-core.h [moved from lib/getopt_pfx_core.h with 94% similarity]
lib/getopt-pfx-ext.h [moved from lib/getopt_pfx_ext.h with 95% similarity]
lib/getopt.in.h
lib/unistd.in.h
m4/getopt.m4
modules/getopt-posix

index 595f2ba43d0381960cd0f5f9f74338a3eced766a..ae1a8bd9e7002b70160b8fc73e42495b2755d574 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2017-04-08  Paul Eggert  <eggert@cs.ucla.edu>
 
+       getopt: prefer - to _ in new file names
+       * lib/getopt-cdefs.in.h: Rename from lib/getopt_cdefs.in.h.
+       * lib/getopt-core.h: Rename from lib/getopt_core.h.
+       * lib/getopt-ext.h: Rename from lib/getopt_ext.h.
+       * lib/getopt-pfx-core.h: Rename from lib/getopt_pfx_core.h.
+       * lib/getopt-pfx-ext.h: Rename from lib/getopt_pfx_ext.h.
+       All uses changed.
+
        getopt: port recent getopt changes to macOS
        Problem reported by Harald Maier (Bug#26398).
        The macOS C compiler uses __nonnull for its own purposes and that
similarity index 95%
rename from lib/getopt_cdefs.in.h
rename to lib/getopt-cdefs.in.h
index 54da28d1f2c179a1d1c80b2cef077d9008fa65d7..8984adb3aa1864b571d043be661437483867e6c8 100644 (file)
@@ -25,7 +25,7 @@
    unistd.h instead.  It does not have a protective #error, because
    the guard macro for getopt.h in gnulib is not fixed.  */
 
-/* getopt_core.h and getopt_ext.h are shared with GNU libc, and expect
+/* getopt-core.h and getopt-ext.h are shared with GNU libc, and expect
    a number of the internal macros supplied to GNU libc's headers by
    sys/cdefs.h.  Provide fallback definitions for all of them.  */
 #if @HAVE_SYS_CDEFS_H@
@@ -64,4 +64,4 @@
 # endif
 #endif
 
-#endif /* getopt_cdefs.h */
+#endif /* _GETOPT_CDEFS_H */
similarity index 99%
rename from lib/getopt_core.h
rename to lib/getopt-core.h
index 76ef46646c48cc2315a5f68f9d10e4439d7f2d63..8c9eb51223654c15561904add4fc4919c3c2b545 100644 (file)
@@ -93,4 +93,4 @@ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
 
 __END_DECLS
 
-#endif /* getopt_core.h */
+#endif /* _GETOPT_CORE_H */
similarity index 99%
rename from lib/getopt_ext.h
rename to lib/getopt-ext.h
index a3a6750875d68f040dc228def1eafc2854417dcb..94190df3a1baa27f31cb42ea1051d2c84cddd601 100644 (file)
@@ -74,4 +74,4 @@ extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
 
 __END_DECLS
 
-#endif /* getopt_ext.h */
+#endif /* _GETOPT_EXT_H */
similarity index 94%
rename from lib/getopt_pfx_core.h
rename to lib/getopt-pfx-core.h
index b730d2d8d97f8b65295a1d7af12113f05b20c89c..155c11612d1188ce1243ac5fc6b30db081c3fdc4 100644 (file)
@@ -27,7 +27,7 @@
 
 /* Standalone applications should #define __GETOPT_PREFIX to an
    identifier that prefixes the external functions and variables
-   defined in getopt_core.h and getopt_ext.h.  Systematically
+   defined in getopt-core.h and getopt-ext.h.  Systematically
    rename identifiers so that they do not collide with the system
    functions and variables.  Renaming avoids problems with some
    compilers and linkers.  */
@@ -49,6 +49,6 @@
 # define optopt __GETOPT_ID (optopt)
 #endif
 
-#include <getopt_core.h>
+#include <getopt-core.h>
 
-#endif /* getopt_pfx_core.h */
+#endif /* _GETOPT_PFX_CORE_H */
similarity index 95%
rename from lib/getopt_pfx_ext.h
rename to lib/getopt-pfx-ext.h
index 8c1691ae2eb88655998e655058d612149967906d..2f86b23169dde5663dbffb6c74fabc5da082c6e5 100644 (file)
@@ -27,7 +27,7 @@
 
 /* Standalone applications should #define __GETOPT_PREFIX to an
    identifier that prefixes the external functions and variables
-   defined in getopt_core.h and getopt_ext.h.  Systematically
+   defined in getopt-core.h and getopt-ext.h.  Systematically
    rename identifiers so that they do not collide with the system
    functions and variables.  Renaming avoids problems with some
    compilers and linkers.  */
@@ -59,6 +59,6 @@
 # endif
 #endif
 
-#include <getopt_ext.h>
+#include <getopt-ext.h>
 
-#endif /* getopt_pfx_ext.h */
+#endif /* _GETOPT_PFX_EXT_H */
index 9f84c277520618ffed97808698ba54527fb7644c..bef07e9d8310bf0510f239949581258fc8db3ddd 100644 (file)
@@ -38,7 +38,7 @@
 
 /* Standalone applications should #define __GETOPT_PREFIX to an
    identifier that prefixes the external functions and variables
-   defined in getopt_core.h and getopt_ext.h.  When this happens,
+   defined in getopt-core.h and getopt-ext.h.  When this happens,
    include the headers that might declare getopt so that they will not
    cause confusion if included after this file (if the system had
    <getopt.h>, we have already included it).  */
@@ -54,8 +54,8 @@
 
 /* The definition of _GL_ARG_NONNULL is copied here.  */
 
-#include <getopt_cdefs.h>
-#include <getopt_pfx_core.h>
-#include <getopt_pfx_ext.h>
+#include <getopt-cdefs.h>
+#include <getopt-pfx-core.h>
+#include <getopt-pfx-ext.h>
 
 #endif /* _@GUARD_PREFIX@_GETOPT_H */
index de619dcca121413a501d315994118590ec0baa68..d9f741fea55bbf7b1e62f12899befaa0d2a78b47 100644 (file)
 /* Get getopt(), optarg, optind, opterr, optopt.
    But avoid namespace pollution on glibc systems.  */
 #if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT
-# include <getopt_cdefs.h>
-# include <getopt_pfx_core.h>
+# include <getopt-cdefs.h>
+# include <getopt-pfx-core.h>
 #endif
 
 #ifndef _GL_INLINE_HEADER_BEGIN
index d90076922b29ae7e81911efe64d1bd88c6e5d1aa..ac3b38e385e528dc8ff262cb855d89c72c0ab1c5 100644 (file)
@@ -1,4 +1,4 @@
-# getopt.m4 serial 45
+# getopt.m4 serial 46
 dnl Copyright (C) 2002-2006, 2008-2017 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -364,7 +364,7 @@ AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
     [Define to rpl_ if the getopt replacement functions and variables
      should be used.])
   GETOPT_H=getopt.h
-  GETOPT_CDEFS_H=getopt_cdefs.h
+  GETOPT_CDEFS_H=getopt-cdefs.h
   AC_SUBST([GETOPT_H])
   AC_SUBST([GETOPT_CDEFS_H])
 ])
index 220875641cca48e00d0d714a1545826b4fdfbc4a..a7825635af4e47d04f133d362410d35069574334 100644 (file)
@@ -5,12 +5,12 @@ 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-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
-lib/getopt_pfx_core.h
-lib/getopt_pfx_ext.h
 m4/getopt.m4
 
 Depends-on:
@@ -49,15 +49,15 @@ getopt.h: getopt.in.h $(top_builddir)/config.status
        } > $@-t && \
        mv -f $@-t $@
 
-getopt_cdefs.h: getopt_cdefs.in.h $(top_builddir)/config.status
+getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
           sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
-             < $(srcdir)/getopt_cdefs.in.h; \
+             < $(srcdir)/getopt-cdefs.in.h; \
        } > $@-t && \
        mv -f $@-t $@
 
-MOSTLYCLEANFILES += getopt.h getopt.h-t getopt_cdefs.h getopt_cdefs.h-t
+MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t
 
 Include:
 <unistd.h>