[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils-6.3 on MacOS X
From: |
Bruno Haible |
Subject: |
Re: coreutils-6.3 on MacOS X |
Date: |
Mon, 9 Oct 2006 13:35:42 +0200 |
User-agent: |
KMail/1.9.1 |
Paul Eggert wrote:
> > at-func.c:39: warning: implicit declaration of function `lchown'
> > dirchownmod.c:102: warning: implicit declaration of function `lchown'
> > (lchown is not provided by the system; gnulib's substitute is used.)
> > mkstemp-safer.c:34: warning: implicit declaration of function `mkstemp'
>
> Thanks for reporting these. I installed the following in an
> attempt to fix them.
The warnings are indeed gone. coreutils CVS as of Saturday behaves as follows
on MacOS X 10.3.9:
if gcc -std=gnu99 -I. -I. -I. -Wall -I/Volumes/UserData/local-macos/include
-g -O2 -MT lchown.o -MD -MP -MF ".deps/lchown.Tpo" -c -o lchown.o lchown.c; \
then mv -f ".deps/lchown.Tpo" ".deps/lchown.Po"; else rm -f ".deps/lchown.Tpo";
exit 1; fi
In file included from lchown.c:26:
stat-macros.h:26:4: #error "you must include <sys/stat.h> before including this
file"
lchown.c: In function `lchown':
lchown.c:37: error: storage size of `stats' isn't known
lchown.c:39: warning: implicit declaration of function `lstat'
lchown.c:37: warning: unused variable `stats'
make[2]: *** [lchown.o] Error 1
This fixes it:
diff -r -c3 coreutils-6.3a/lib/lchown.c
/gfs/ibook/Volumes/UserData/work/coreutils-6.3a/lib/lchown.c
*** coreutils-6.3a/lib/lchown.c 2006-10-07 01:01:48.000000000 +0200
--- /gfs/ibook/Volumes/UserData/work/coreutils-6.3a/lib/lchown.c
2006-10-08 01:53:15.000000000 +0200
***************
*** 23,28 ****
--- 23,29 ----
#include "lchown.h"
+ #include <sys/stat.h>
#include "stat-macros.h"
/* Work just like chown, except when FILE is a symbolic link.
Then, later:
pathchk.c:203: warning: missing braces around initializer
pathchk.c:203: warning: (near initialization for `mbstate.__mbstate8')
Here the problem is:
mbstate_t mbstate = {0};
ISO C 99 guarantees only that mbstate_t is not an array type; it could
be a scalar or pointer type. The fix is therefore to use an initialization
through memset, as in mbswidth.c and quotearg.c.
diff -r -c3 coreutils-6.3a/src/pathchk.c
/gfs/ibook/Volumes/UserData/work/coreutils-6.3a/src/pathchk.c
*** coreutils-6.3a/src/pathchk.c 2006-04-29 18:17:53.000000000 +0200
--- /gfs/ibook/Volumes/UserData/work/coreutils-6.3a/src/pathchk.c
2006-10-08 02:07:15.000000000 +0200
***************
*** 1,5 ****
/* pathchk -- check whether file names are valid or portable
! Copyright (C) 1991-2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- 1,5 ----
/* pathchk -- check whether file names are valid or portable
! Copyright (C) 1991-2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
***************
*** 200,207 ****
if (*invalid)
{
! mbstate_t mbstate = {0};
! size_t charlen = mbrlen (invalid, filelen - validlen, &mbstate);
error (0, 0,
_("nonportable character %s in file name %s"),
quotearg_n_style_mem (1, locale_quoting_style, invalid,
--- 200,210 ----
if (*invalid)
{
! mbstate_t mbstate;
! size_t charlen;
!
! memset (&mbstate, 0, sizeof mbstate);
! charlen = mbrlen (invalid, filelen - validlen, &mbstate);
error (0, 0,
_("nonportable character %s in file name %s"),
quotearg_n_style_mem (1, locale_quoting_style, invalid,
All "make check" tests pass. Congratulations!
Bruno
- coreutils-6.3 on MacOS X, Bruno Haible, 2006/10/04
- Re: coreutils-6.3 on MacOS X, Paul Eggert, 2006/10/05
- Re: coreutils-6.3 on MacOS X, Jim Meyering, 2006/10/06
- Re: coreutils-6.3 on MacOS X,
Bruno Haible <=
- Re: coreutils-6.3 on MacOS X, Jim Meyering, 2006/10/09
- Re: coreutils-6.3 on MacOS X, Eric Blake, 2006/10/09
- Re: coreutils-6.3 on MacOS X, Jim Meyering, 2006/10/09
- Re: coreutils-6.3 on MacOS X, Eric Blake, 2006/10/09
- Re: coreutils-6.3 on MacOS X, Jim Meyering, 2006/10/09
- Re: coreutils-6.3 on MacOS X, Jim Meyering, 2006/10/09
- Re: coreutils-6.3 on MacOS X, Paul Eggert, 2006/10/09
- Re: coreutils-6.3 on MacOS X, Jim Meyering, 2006/10/09
- Re: coreutils-6.3 on MacOS X, Bruno Haible, 2006/10/09
- Re: coreutils-6.3 on MacOS X, Paul Eggert, 2006/10/10