Hi,

I changed -lpthread to -pthread and then:

# gcc -o timetest timetest.c -pthread
#
# g++ -o timetest timetest.c -pthread
timetest.c: In function `void tmsleep(int)':
timetest.c:77: `usleep' undeclared (first use this function)
timetest.c:77: (Each undeclared identifier is reported only once for each
   function it appears in.)
#

With #include <unistd.h>

# gcc -o timetest timetest.c -pthread
#
# g++ -o timetest timetest.c -pthread
#

:-)

Now the results from timetest after XMail restart:

# ./timetest
** From Main **
time     = Mon Nov  3 14:32:58 2003
timezone = 134514148
isdst    = 1
tutc     = 1067877178
tloc     = 933366630
tval     = 1067803348
rotstr   = 200311021802
** From Thread (No tzset) **
time     = Mon Nov  3 14:32:58 2003
timezone = 134514148
isdst    = 1
tutc     = 1067877178
tloc     = 933366630
tval     = 1067803348
rotstr   = 200311021802
** From Thread (tzset) **
time     = Mon Nov  3 14:32:58 2003
timezone = 134514148
isdst    = 1
tutc     = 1067877178
tloc     = 933366630
tval     = 1067803348
rotstr   = 200311021802

My date command output:
# date
Mon Nov  3 14:38:20 EDT 2003
#

Thanks.


On Mon, 3 Nov 2003, Davide Libenzi wrote:

> 
> On Mon, 3 Nov 2003, Vitor Renato Alves de Brito wrote:
> 
> >
> > Hi,
> >
> > With g++:
> >
> > # g++ -o timetest timetest.c -lpthread
> > timetest.c: In function `void tmsleep(int)':
> > timetest.c:77: `usleep' undeclared (first use this function)
> > timetest.c:77: (Each undeclared identifier is reported only once for each
> >    function it appears in.)
> 
> #include <unistd.h>
> 
> But this must work in a sane gcc/pthread setup:
> 
> $ gcc -o timetest timetest.c -lpthread
> 
> 
> 
> - Davide
> 
> -
> To unsubscribe from this list: send the line "unsubscribe xmail" in
> the body of a message to [EMAIL PROTECTED]
> For general help: send the line "help" in the body of a message to
> [EMAIL PROTECTED]
> 
> 
> 
> 
> ---
> Esta mensagem foi verificada pelo e-mail protegido Arte Final
> Antiv�rus: F-Prot / Vers�o: 4.1.1 / Atualizado em: 2-Nov-2003
> Proteja o seu e-mail com a Arte Final - http://www.artefinal.com.br
> 

At� mais,

---
Vitor Renato Alves de Brito - System Manager
Arte Final Provedor Internet - http://www.artefinal.com.br
Alfenas/Lavras - Sul de Minas Gerais




---
Esta mensagem foi verificada pelo e-mail protegido Arte Final
Antiv�rus: F-Prot / Vers�o: 4.1.1 / Atualizado em: 2-Nov-2003
Proteja o seu e-mail com a Arte Final - http://www.artefinal.com.br

-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to