bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

renaming full-header-path.m4 to absolute-header.m4


From: Paul Eggert
Subject: renaming full-header-path.m4 to absolute-header.m4
Date: Mon, 03 Jul 2006 23:42:28 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

I'd like to rename full-header-path to absolute-header to avoid
confusion with the GNU coding standards, which say that the word
"path" should not be used for file names in user documentation.  Also,
POSIX uses the adjective "absolute", not "full", to talk about file
names that are fully qualified.  Using the word "absolute" (without
"name") should pacify both magisteria
<http://www.stephenjaygould.org/library/gould_noma.html>.

I took the liberty of installing the following patch to do this; if
you prefer another naming convention please let me know.

2006-07-03  Paul Eggert  <address@hidden>

        * m4/absolute-header.m4: Renamed from full-header-path.m4.
        This is to keep the terminology clean; POSIX talks about
        "absolute pathnames", not "full pathnames", but the GNU
        Coding Standards say to use "path" for something else;
        so use "absolute" to keep both sides happy.
        (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
        Set gl_absolute_header, not gl_full_header_path.
        Set gl_cv_absolute_<header>, not gl_full_path_<header>.
        Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
        All uses changed.

Index: lib/inttypes.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/inttypes.h,v
retrieving revision 1.3
diff -p -u -r1.3 inttypes.h
--- lib/inttypes.h      3 May 2006 12:39:46 -0000       1.3
+++ lib/inttypes.h      4 Jul 2006 06:34:30 -0000
@@ -33,7 +33,7 @@
 # if HAVE_INCLUDE_NEXT
 #  include_next <inttypes.h>
 # else
-#  include FULL_PATH_INTTYPES_H
+#  include ABSOLUTE_INTTYPES_H
 # endif
 #endif
 #include <stdint.h>
Index: lib/stat_.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/stat_.h,v
retrieving revision 1.2
diff -p -u -r1.2 stat_.h
--- lib/stat_.h 30 Jun 2006 04:20:00 -0000      1.2
+++ lib/stat_.h 4 Jul 2006 06:34:30 -0000
@@ -22,7 +22,7 @@
 /* This file is supposed to be used on platforms where <sys/stat.h> is
    incomplete.  It is intended to provide definitions and prototypes
    needed by an application.  Start with what the system provides.  */
-#include @FULL_PATH_SYS_STAT_H@
+#include @ABSOLUTE_SYS_STAT_H@
 
 /* mingw does not support symlinks, therefore it does not have lstat.  But
    without links, stat does just fine.  */
Index: lib/stdint_.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/stdint_.h,v
retrieving revision 1.29
diff -p -u -r1.29 stdint_.h
--- lib/stdint_.h       4 Jul 2006 04:48:23 -0000       1.29
+++ lib/stdint_.h       4 Jul 2006 06:34:30 -0000
@@ -43,14 +43,14 @@
      Include it before <inttypes.h>, since any "#include <stdint.h>"
      in <inttypes.h> would reinclude us, skipping our contents because
      _GL_STDINT_H is defined.  */
-# include @FULL_PATH_STDINT_H@
+# include @ABSOLUTE_STDINT_H@
 #endif
 
 /* <sys/types.h> defines some of the stdint.h types as well, on glibc,
    IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
    MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
    relies on the system <stdint.h> definitions, so include
-   <sys/types.h> after @address@hidden  */
+   <sys/types.h> after @address@hidden  */
 #if @HAVE_SYS_TYPES_H@
 # include <sys/types.h>
 #endif
Index: m4/ChangeLog
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/ChangeLog,v
retrieving revision 1.855
diff -p -u -r1.855 ChangeLog
--- m4/ChangeLog        3 Jul 2006 08:32:46 -0000       1.855
+++ m4/ChangeLog        4 Jul 2006 06:34:30 -0000
@@ -1,5 +1,16 @@
 2006-07-03  Paul Eggert  <address@hidden>
 
+       * absolute-header.m4: Renamed from full-header-path.m4.
+       This is to keep the terminology clean; POSIX talks about
+       "absolute pathnames", not "full pathnames", but the GNU
+       Coding Standards say to use "path" for something else;
+       so use "absolute" to keep both sides happy.
+       (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
+       Set gl_absolute_header, not gl_full_header_path.
+       Set gl_cv_absolute_<header>, not gl_full_path_<header>.
+       Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
+       All uses changed.
+
        Merge from coreutils.
 
        2006-06-30  Paul Eggert  <address@hidden>
Index: m4/_inttypes_h.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/_inttypes_h.m4,v
retrieving revision 1.2
diff -p -u -r1.2 _inttypes_h.m4
--- m4/_inttypes_h.m4   2 May 2006 23:48:20 -0000       1.2
+++ m4/_inttypes_h.m4   4 Jul 2006 06:34:30 -0000
@@ -1,4 +1,4 @@
-# _inttypes_h.m4 serial 2
+# _inttypes_h.m4 serial 3
 dnl Copyright (C) 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,7 +10,7 @@ AC_DEFUN([gl_INTTYPES_H],
 [AC_REQUIRE([gl_INCLUDE_NEXT])dnl
 AC_LIBSOURCES([inttypes.h])
 if test $gl_cv_have_include_next = no; then
-  gl_FULL_HEADER_PATH([inttypes.h])
+  gl_ABSOLUTE_HEADER([inttypes.h])
 fi
 AC_CHECK_DECLS_ONCE([strtoimax strtoumax])dnl
 ])
Index: m4/stdint.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/stdint.m4,v
retrieving revision 1.15
diff -p -u -r1.15 stdint.m4
--- m4/stdint.m4        2 Jul 2006 09:12:49 -0000       1.15
+++ m4/stdint.m4        4 Jul 2006 06:34:30 -0000
@@ -1,4 +1,4 @@
-# stdint.m4 serial 13
+# stdint.m4 serial 14
 dnl Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -49,9 +49,9 @@ AC_DEFUN([gl_STDINT_H],
 
   dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_stdint_h.
   if test $ac_cv_header_stdint_h = yes; then
-    gl_FULL_HEADER_PATH([stdint.h])
-    FULL_PATH_STDINT_H="<$gl_cv_full_path_stdint_h>"
-    AC_SUBST([FULL_PATH_STDINT_H])
+    gl_ABSOLUTE_HEADER([stdint.h])
+    ABSOLUTE_STDINT_H="<$gl_cv_absolute_stdint_h>"
+    AC_SUBST([ABSOLUTE_STDINT_H])
     HAVE_STDINT_H=1
   else
     HAVE_STDINT_H=0
@@ -59,7 +59,7 @@ AC_DEFUN([gl_STDINT_H],
   AC_SUBST([HAVE_STDINT_H])
 
   dnl Now see whether we need a substitute <stdint.h>.  Use
-  dnl FULL_PATH_STDINT_H, not <stdint.h>, so that it also works during
+  dnl ABSOLUTE_STDINT_H, not <stdint.h>, so that it also works during
   dnl a "config.status --recheck" if a stdint.h has been
   dnl created in the build directory.
   if test $ac_cv_header_stdint_h = yes; then
@@ -70,7 +70,7 @@ AC_DEFUN([gl_STDINT_H],
         AC_LANG_PROGRAM([[
 #include <stddef.h>
 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-#include FULL_PATH_STDINT_H
+#include ABSOLUTE_STDINT_H
 #ifdef INT8_MAX
 int8_t a1 = INT8_MAX;
 #endif
Index: m4/sys_stat_h.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/sys_stat_h.m4,v
retrieving revision 1.2
diff -p -u -r1.2 sys_stat_h.m4
--- m4/sys_stat_h.m4    30 Jun 2006 04:19:13 -0000      1.2
+++ m4/sys_stat_h.m4    4 Jul 2006 06:34:30 -0000
@@ -1,4 +1,4 @@
-# sys_stat_h.m4 serial 1   -*- Autoconf -*-
+# sys_stat_h.m4 serial 2   -*- Autoconf -*-
 dnl Copyright (C) 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -19,11 +19,11 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
 
   SYS_STAT_H=
   if test $ac_cv_func_lstat:$ac_cv_have_decl_mkdir != yes:yes ; then
-    gl_FULL_HEADER_PATH([sys/stat.h])
-    FULL_PATH_SYS_STAT_H='<'$gl_cv_full_path_sys_stat_h'>'
+    gl_ABSOLUTE_HEADER([sys/stat.h])
+    ABSOLUTE_SYS_STAT_H="<$gl_cv_absolute_sys_stat_h>"
     AC_CHECK_HEADERS([io.h])
     AC_REQUIRE([AC_C_INLINE])
-    AC_SUBST([FULL_PATH_SYS_STAT_H])
+    AC_SUBST([ABSOLUTE_SYS_STAT_H])
     SYS_STAT_H='sys/stat.h'
   fi
   AC_SUBST([SYS_STAT_H])
Index: modules/inttypes
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/inttypes,v
retrieving revision 1.3
diff -p -u -r1.3 inttypes
--- modules/inttypes    2 Jul 2006 06:49:07 -0000       1.3
+++ modules/inttypes    4 Jul 2006 06:34:30 -0000
@@ -6,7 +6,7 @@ strtoimax & strtoumax functions.
 Files:
 lib/inttypes.h
 m4/include_next.m4
-m4/full-header-path.m4
+m4/absolute-header.m4
 m4/_inttypes_h.m4
 
 Depends-on:
Index: modules/stdint
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/stdint,v
retrieving revision 1.8
diff -p -u -r1.8 stdint
--- modules/stdint      2 Jul 2006 06:49:07 -0000       1.8
+++ modules/stdint      4 Jul 2006 06:34:30 -0000
@@ -9,7 +9,7 @@ Macros are used instead of typedefs.
 Files:
 lib/stdint_.h
 m4/stdint.m4
-m4/full-header-path.m4
+m4/absolute-header.m4
 m4/longlong.m4
 
 Depends-on:
@@ -27,7 +27,7 @@ stdint.h: stdint_.h
        sed -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
            -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
            -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
-           -e 's|@''FULL_PATH_STDINT_H''@|$(FULL_PATH_STDINT_H)|g' \
+           -e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \
            -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
            -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
            -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
Index: modules/sys_stat
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/sys_stat,v
retrieving revision 1.1
diff -p -u -r1.1 sys_stat
--- modules/sys_stat    29 Jun 2006 22:21:39 -0000      1.1
+++ modules/sys_stat    4 Jul 2006 06:34:30 -0000
@@ -3,7 +3,7 @@ A <sys/stat.h> for systems with missing 
 
 Files:
 lib/stat_.h
-m4/full-header-path.m4
+m4/absolute-header.m4
 m4/sys_stat_h.m4
 
 Depends-on:
@@ -19,7 +19,7 @@ EXTRA_DIST += stat_.h
 # has one that is incomplete.
 sys/stat.h: stat_.h
        test -d sys || mkdir sys
-       sed -e 's|@''FULL_PATH_SYS_STAT_H''@|$(FULL_PATH_SYS_STAT_H)|g' \
+       sed -e 's|@''ABSOLUTE_SYS_STAT_H''@|$(ABSOLUTE_SYS_STAT_H)|g' \
            < $(srcdir)/stat_.h > address@hidden
        mv address@hidden $@
 MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t
--- /dev/null   2005-09-24 22:00:15.000000000 -0700
+++ m4/absolute-header.m4       2006-07-03 23:12:11.000000000 -0700
@@ -0,0 +1,41 @@
+# absolute-header.m4 serial 3
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Derek Price.
+
+# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...)
+# ---------------------------------------
+# Find the absolute name of a header file, assuming the header exists.
+# If the header were sys/inttypes.h, this macro would define
+# ABSOLUTE_SYS_INTTYPES_H to the `<>' quoted absolute name of sys/inttypes.h
+# in config.h
+# (e.g. `#define ABSOLUTE_SYS_INTTYPES_H <///usr/include/sys/inttypes.h>').
+AC_DEFUN([gl_ABSOLUTE_HEADER],
+[AC_LANG_PREPROC_REQUIRE()dnl
+AC_FOREACH([gl_HEADER_NAME], [$1],
+  [AS_VAR_PUSHDEF([gl_absolute_header],
+                  [gl_cv_absolute_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
+  AC_CACHE_CHECK([absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>],
+    m4_quote(m4_defn([gl_absolute_header])),
+    [AS_VAR_PUSHDEF([ac_header_exists],
+                    [ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
+    AC_CHECK_HEADERS_ONCE(m4_quote(m4_defn([gl_HEADER_NAME])))dnl
+    if test AS_VAR_GET(ac_header_exists) = yes; then
+      AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include 
<]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]])])
+dnl eval is necessary to expand ac_cpp.
+dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
+      AS_VAR_SET(gl_absolute_header,
+[`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+sed -n 
'\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#;p;q;}'`])
+    fi
+    AS_VAR_POPDEF([ac_header_exists])dnl
+    ])dnl
+  AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_quote(m4_defn([gl_HEADER_NAME]))),
+                     [<AS_VAR_GET(gl_absolute_header)>],
+                     [Define this to the absolute name of 
<]m4_quote(m4_defn([gl_HEADER_NAME]))[>.])
+  AS_VAR_POPDEF([gl_absolute_header])dnl
+])dnl
+])# gl_ABSOLUTE_HEADER





reply via email to

[Prev in Thread] Current Thread [Next in Thread]