On Wed, Oct 27, 2010 at 6:54 AM, Michal Hocko <[email protected]> wrote:
> compile the following program:
> test.c
> ===
> #include <stdlib.h>
> int main()> {mkstemp(NULL);return 0;}
> ===
> Try the following tests:
>[1] gcc -o test test.c
>[2] g++ -o test test.c
>[3] gcc -o test -posix test.c
>[4] g++ -o test -posix test.c
>[5] gcc -o test -posix -std=c99 test.c
>[6] g++ -o test -posix -std=c++98 test.c
>[7] gcc -o test -posix -std=c99 -ansi test.c
>[8] g++ -o test -posix -std=c++98 -ansi test.c

Tests [1], [2], [3], [4] and [7] compile without complaint, and
produce an executable which dies at once with a segmentation fault
when I run it (I can show you the core dump if you're interested).

Test [5] spits out the same warning you reported, viz.,
test.c: In function `main':
test.c:4: warning: implicit declaration of function `mkstemp'
and then builds an executable which dies like the others.

Tests [6] and [8] spit out the error I was seeing when I tried to
compile gfile.cc as part of building pdfedit:
test.c: In function `int main()':
test.c:4: error: `mkstemp' was not declared in this scope

and so, in those two cases, no executable is created.

Comments?

------------------------------------------------------------------------------
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware, 
phishing sites, and compromised hosts - saving your company time, 
money, and embarrassment.   Learn More! 
http://p.sf.net/sfu/hpdev2dev-nov
_______________________________________________
Pdfedit-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdfedit-support

Reply via email to