bug-gnulib
[Top][All Lists]
Advanced

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

Re: declare lstat in sys/stat.h


From: Jim Meyering
Subject: Re: declare lstat in sys/stat.h
Date: Mon, 20 Oct 2008 12:16:02 +0200

Bruno Haible <address@hidden> wrote:
> lstat() is declared in <sys/stat.h> according to POSIX. Here's a proposed
> patch for gnulib to do the same.
>
> The only tricky issue here is that on some systems we have a
> "#define lstat lstat64", and this gets in the way of redefining the function
> while at the same time reusing its original definition. But this problem was
> already solved for open (remember "#define open open64").
>
> 2008-10-19  Bruno Haible  <address@hidden>
>
>       * lib/lstat.h: Remove file.
>       * lib/sys_stat.in.h: Add special invocation convention.
>       (lstat): New declaration.
>       * lib/lstat.c (orig_lstat): New function.
>       (rpl_lstat): Use orig_lstat instead of lstat.
>       * m4/lstat.m4 (gl_FUNC_LSTAT): Require gl_SYS_STAT_H_DEFAULTS and
>       AC_C_INLINE. Set REPLACE_LSTAT.
>       * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_LSTAT
>       and REPLACE_LSTAT.
>       * modules/lstat (Files): Remove lib/lstat.h.
>       (configure.ac): Invoke gl_SYS_STAT_MODULE_INDICATOR.
>       (Include): Specify <sys/stat.h> instead of lstat.h.
>       * modules/sys_stat (Makefile.am): Substitute GNULIB_LSTAT and
>       REPLACE_LSTAT.
>       * NEWS: Mention the change.
>       * lib/fts.c: Don't include lstat.h.
>       * lib/openat.c: Include <sys/stat.h> instead of lstat.h.

This looks fine.
Thanks for all the work.




reply via email to

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