My impression is that a good deal of code wants PATH_MAX
because it wants to create an array of size
PATH_MAX.
Definitely true. That is by far the most common use of PATH_MAX in my
experience.
On 08/05/2011 04:25 PM, Eric Blake wrote:
> What if we go with the array approach, but without risking
> overallocation problems?
Well again, it depends on what the test is for.
My impression is that a good deal of code wants PATH_MAX
because it wants to create an array of size
PATH_MAX. If that'
On 08/05/2011 05:19 PM, Paul Eggert wrote:
On 08/05/2011 03:33 PM, Bruno Haible wrote:
int a = PATH_MAX;
Shouldn't this be:
static int a[PATH_MAX];
Maybe. Or possibly:
enum { a = PATH_MAX };
Are there cases when these three declarations don't all succeed and don't
all fail?
Oh yes. :-)
On 08/05/2011 03:33 PM, Bruno Haible wrote:
>>> int a = PATH_MAX;
>> >
>> > Shouldn't this be:
>> >
>> > static int a[PATH_MAX];
> Maybe. Or possibly:
> enum { a = PATH_MAX };
>
> Are there cases when these three declarations don't all succeed and don't
> all fail?
Oh yes. :-)
"int a = PATH_MA
Eric Blake wrote:
> > int a = PATH_MAX;
>
> Shouldn't this be:
>
> static int a[PATH_MAX];
Maybe. Or possibly:
enum { a = PATH_MAX };
Are there cases when these three declarations don't all succeed and don't
all fail?
I'm not so familiar with the various classes of constant expressions.
Paul
Hi Stefano,
On 08/05/11 06:48, Stefano Lattarini wrote:
zsh stumbles on this:
egrep -h "$grep_expr" $errno_list | \
sed "$sed_cmd" | \
awk '{ print $1 " " $2 }' | \
sort -u -n -k2> ${tmpd}/sorted.txt
so it is not Bourne-enough to count.
It's not by defaul
On 08/05/2011 07:58 AM, Thien-Thi Nguyen wrote:
() Bruce Korb
() Fri, 05 Aug 2011 06:19:03 -0700
4 tmpd=`mktemp -d ${TMPDIR:-/tmp}/err-names-XX`
IIRC, constructs like:
${TMPDIR:-/tmp}
can be made more portable:
${TMPDIR-/tmp}
by removing the colon before the dash.
() Bruce Korb
() Fri, 05 Aug 2011 06:19:03 -0700
4 tmpd=`mktemp -d ${TMPDIR:-/tmp}/err-names-XX`
IIRC, constructs like:
${TMPDIR:-/tmp}
can be made more portable:
${TMPDIR-/tmp}
by removing the colon before the dash.
On 08/04/2011 07:14 PM, Bruno Haible wrote:
/* Check that PATH_MAX is a constant if it is defined. */
#ifdef PATH_MAX
int a = PATH_MAX;
Shouldn't this be:
static int a[PATH_MAX];
so that we really are testing that it is a constant? And do we also
want to enforce that it is usable as a pre
Hi Bruce.
On Friday 05 August 2011, Bruce Korb wrote:
> On 08/04/11 17:39, Bruno Haible wrote:
> > Hi Bruce,
> >
> >> I fixed up the "mk" script to be more portable
> >
> > Indeed, that looks like most portability problems have been eliminated.
> >
> >> tho I haven't tried it on Solaris' /bin/sh.
On 08/04/11 17:39, Bruno Haible wrote:
Hi Bruce,
I fixed up the "mk" script to be more portable
Indeed, that looks like most portability problems have been eliminated.
tho I haven't tried it on Solaris' /bin/sh.
Probably won't work. I don't have access.
You can also test it with 'zsh', '
On 08/05/11 02:16, Bastien ROUCARIES wrote:
Does it work for cross compiling ?
As long as CPP can spit out the -E output correctly, but the
script may need tweaks anyway. One good one might be to
pass through the definition of CC and use that. Would you
try it out? Thanks! - Bruce
On 08/04/11 17:39, Bruno Haible wrote:
You can also test it with 'zsh', 'ksh', 'ash', and 'dash' on a glibc system.
IFF they're installed.
If it works with these shells, it will likely also pass with /bin/sh on
various systems.
Now, do you plan to convert this into a gnulib module?
Not rea
According to [1] unlinkat.c is built on Hurd, and complains about
missing stdlib.h include:
unlinkat.c: In function 'rpl_unlinkat':
unlinkat.c:70:15: warning: implicit declaration of function 'free'
[-Wimplicit-function-declaration]
unlinkat.c:70:15: warning: incompatible implicit declaration of
Below is a link to a build log on a Debian GNU/Hurd box from a gnulib
build generated on a Debian GNU/Linux Squeeze box with these commands:
rm -rf m
./gnulib-tool --create-testdir --with-tests --dir m --without-longrunning-tests
cd m
./configure -C
make dist
http://autobuild.josefsson.org/gnulib
Bruno Haible writes:
> Hi Simon,
>
>> gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\"
>> -DNO_XMALLOC -DEXEEXT=\"\" -I. -I.. -DGNULIB_STRICT_CHECKING=1
>> -I../intl -fvisibility=hidden -g -O2 -MT unictype/categ_LC.o -MD -MP
>> -MF $depbase.Tpo -c -o unictype/categ_LC.o unictype/categ_
Hi Simon,
> gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC
> -DEXEEXT=\"\" -I. -I.. -DGNULIB_STRICT_CHECKING=1 -I../intl
> -fvisibility=hidden -g -O2 -MT unictype/categ_LC.o -MD -MP -MF $depbase.Tpo
> -c -o unictype/categ_LC.o unictype/categ_LC.c &&\
> mv -f $
Does it work for cross compiling ?
Bastien
Le 5 août 2011 02:39, "Bruno Haible" a écrit :
Hi Bruce,
> I fixed up the "mk" script to be more portable
Indeed, that looks like most portability problems have been eliminated.
> tho I haven't tried it on Solaris' /bin/sh.
> Probably won't work. I
Bruno Haible wrote:
> Hi Paul,
>
>> > when you rebased your proposed commits, the ChangeLog entries did not go
>> > in at the top. Are you using the 'git-merge-changelog' driver?
>>
>> No, I used "git rebase -i", generated a revised patch, and then
>> applied it with "git am".
>
> Hmm, it may be t
19 matches
Mail list logo