From bc273a4c560ab92e410f33245de3fa711e38ab3c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 15 Oct 2012 13:07:07 -0700 Subject: [PATCH] fchmodat, fchownat, fstatat: port to non-inlining compilers Problem reported for FreeBSD 9 by Jim Meyering in . * lib/chmodat.c, lib/chownat.c, lib/statat.c: New files, which define FCHMODAT_INLINE etc. * lib/fchmodat.c (FCHMODAT_INLINE): * lib/fchownat.c (FCHOWNAT_INLINE): * lib/fstatat.c (FSTATAT_INLINE): Remove, as chmodat.c etc. now do this. * modules/fchmodat (Files): Add lib/chmodat.c. * modules/fchownat (Files): Add lib/chownat.c. * modules/fstatat (Files): Add lib/statat.c. --- ChangeLog | 15 +++++++++++++++ lib/chmodat.c | 3 +++ lib/chownat.c | 3 +++ lib/fchmodat.c | 2 -- lib/fchownat.c | 2 -- lib/fstatat.c | 2 -- lib/statat.c | 3 +++ modules/fchmodat | 2 ++ modules/fchownat | 2 ++ modules/fstatat | 2 ++ 10 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 lib/chmodat.c create mode 100644 lib/chownat.c create mode 100644 lib/statat.c diff --git a/ChangeLog b/ChangeLog index ac74fdb4bf..fca0234b39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2012-10-15 Paul Eggert + + fchmodat, fchownat, fstatat: port to non-inlining compilers + Problem reported for FreeBSD 9 by Jim Meyering in + . + * lib/chmodat.c, lib/chownat.c, lib/statat.c: + New files, which define FCHMODAT_INLINE etc. + * lib/fchmodat.c (FCHMODAT_INLINE): + * lib/fchownat.c (FCHOWNAT_INLINE): + * lib/fstatat.c (FSTATAT_INLINE): + Remove, as chmodat.c etc. now do this. + * modules/fchmodat (Files): Add lib/chmodat.c. + * modules/fchownat (Files): Add lib/chownat.c. + * modules/fstatat (Files): Add lib/statat.c. + 2012-10-15 Jim Meyering fchmodat.c, fchownat.c: compile-impeding typos diff --git a/lib/chmodat.c b/lib/chmodat.c new file mode 100644 index 0000000000..3c69689928 --- /dev/null +++ b/lib/chmodat.c @@ -0,0 +1,3 @@ +#include +#define FCHMODAT_INLINE _GL_EXTERN_INLINE +#include "openat.h" diff --git a/lib/chownat.c b/lib/chownat.c new file mode 100644 index 0000000000..3937f9c4f8 --- /dev/null +++ b/lib/chownat.c @@ -0,0 +1,3 @@ +#include +#define FCHOWNAT_INLINE _GL_EXTERN_INLINE +#include "openat.h" diff --git a/lib/fchmodat.c b/lib/fchmodat.c index 8612cd427e..ce848fd4ee 100644 --- a/lib/fchmodat.c +++ b/lib/fchmodat.c @@ -18,8 +18,6 @@ #include -#define FCHMODAT_INLINE _GL_EXTERN_INLINE - #include #include diff --git a/lib/fchownat.c b/lib/fchownat.c index 72bad1bfa3..4f6a44d040 100644 --- a/lib/fchownat.c +++ b/lib/fchownat.c @@ -23,8 +23,6 @@ #include -#define FCHOWNAT_INLINE _GL_EXTERN_INLINE - #include #include diff --git a/lib/fstatat.c b/lib/fstatat.c index 71b04d54fa..5b097fc102 100644 --- a/lib/fstatat.c +++ b/lib/fstatat.c @@ -23,8 +23,6 @@ #define __need_system_sys_stat_h #include -#define FSTATAT_INLINE _GL_EXTERN_INLINE - /* Get the original definition of fstatat. It might be defined as a macro. */ #include #include diff --git a/lib/statat.c b/lib/statat.c new file mode 100644 index 0000000000..28e21fecbb --- /dev/null +++ b/lib/statat.c @@ -0,0 +1,3 @@ +#include +#define FSTATAT_INLINE _GL_EXTERN_INLINE +#include "openat.h" diff --git a/modules/fchmodat b/modules/fchmodat index 44cc919330..7a5e1a6886 100644 --- a/modules/fchmodat +++ b/modules/fchmodat @@ -3,6 +3,7 @@ fchmodat() function: Change access permissions of a file at a directory. Files: lib/fchmodat.c +lib/chmodat.c lib/at-func.c m4/fchmodat.m4 @@ -28,6 +29,7 @@ gl_MODULE_INDICATOR([fchmodat]) dnl for lib/openat.h gl_SYS_STAT_MODULE_INDICATOR([fchmodat]) Makefile.am: +lib_SOURCES += chmodat.c Include: diff --git a/modules/fchownat b/modules/fchownat index 0b16be87e4..385f38d631 100644 --- a/modules/fchownat +++ b/modules/fchownat @@ -3,6 +3,7 @@ fchownat() function: Change the owner of a file at a directory. Files: lib/fchownat.c +lib/chownat.c lib/at-func.c m4/fchownat.m4 @@ -30,6 +31,7 @@ gl_MODULE_INDICATOR([fchownat]) dnl for lib/openat.h gl_UNISTD_MODULE_INDICATOR([fchownat]) Makefile.am: +lib_SOURCES += chownat.c Include: diff --git a/modules/fstatat b/modules/fstatat index 9b260d4b74..7aa99b8f7b 100644 --- a/modules/fstatat +++ b/modules/fstatat @@ -3,6 +3,7 @@ fstatat() function: Return information about a file at a directory. Files: lib/fstatat.c +lib/statat.c lib/at-func.c m4/fstatat.m4 m4/lstat.m4 @@ -30,6 +31,7 @@ gl_MODULE_INDICATOR([fstatat]) dnl for lib/openat.h gl_SYS_STAT_MODULE_INDICATOR([fstatat]) Makefile.am: +lib_SOURCES += statat.c Include: -- 2.39.5