Re: wftodm segfaults on AMD64
From: masami <email@example.com>
> on 07/29/06 08:11, Danai SAE-HAN (韓達耐) wrote:
> > If any if you could help me why test.c crashes on my computer and not
> > on any other (i386) computer, I would be very grateful, since I'm no
> > programmer.
> simply, you should include time.h instead of sys/time.h.
> also I recommend use -Wall option when you build programs.
> if you use this option, you can notice what wrong.
> [masami@moon:~]% gcc -Wall test.c
> test.c:6: warning: return type of ‘main’ is not ‘int’
> test.c: In function ‘main’:
> test.c:8: warning: implicit declaration of function ‘ctime’
> test.c:8: warning: format ‘%s’ expects type ‘char *’, but argument 2 has
> type ‘int’
Thank you! It works like a charm. May I also ask you why exacty
sys/time.h and time.h are so different? They are both part of
libc6-dev, I see.