[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX'
From: |
Yavor Doganov |
Subject: |
Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope |
Date: |
Fri, 21 Aug 2009 20:48:46 +0300 |
User-agent: |
Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/22.3 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) |
Димитър Киров wrote:
> > char *foo = "foo";
> това е гарантирано да завършва на '\0', защото компилаторът ще замести
> "foo" със {'f', 'o', 'o', '\0'}
> Но това не е динамично заделена памет!
Прав си тук.
> Накратко:
> xpcomPath = g_malloc (n);
> strlen (xpcomPath);
> ще има неясен (грешен) резултат, защото xpcomPath е с неизвестно
> съдържание, а strlen очаква да прочете '\0'
Тук не си, струва ми се.
$ cat > foo.c <<'EOF'
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main (void)
{
char *foo = malloc (3);
foo[0] = 'f';
foo[1] = 'o';
foo[2] = 'o';
printf ("%d\n", (strlen (foo)));
return 0;
}
EOF
$ make foo
cc foo.c -o foo
$ ./foo
3
$ /lib/libc.so.6 | grep version
GNU C Library stable release version 2.7, by Roland McGrath et al.
Compiled by GNU CC version 4.2.4 (Ubuntu 4.2.4-1ubuntu1).
crypt add-on version 2.1 by Michael Glad and others
- [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/20
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/20
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/20
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope,
Yavor Doganov <=
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/22
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/22
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/23
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/21