linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Compiling the NIST Time Client
@ 2006-02-17  2:30 Shriramana Sharma
  2006-02-17  6:24 ` Glynn Clements
  2006-02-17 13:03 ` Reuben D. Budiardja
  0 siblings, 2 replies; 6+ messages in thread
From: Shriramana Sharma @ 2006-02-17  2:30 UTC (permalink / raw)
  To: Linux C Programming List

Hello all.

I downloaded the source code for the NIST Time Client from 
ftp://time-a.nist.gov/pub/daytime and compiled it using make. I made the 
following changes to the source code to make it compile without errors but I 
want to verify here that I have not committed a blunder (though the program 
compiles and works properly).

I got:

samjnaa@linux:~/src/daytime> make nistime
cc -o tcp.o -c tcp_time_client.c
tcp_time_client.c: In function ‘main’:
tcp_time_client.c:172: warning: incompatible implicit declaration of built-in 
function ‘exit’
tcp_time_client.c:172: error: too few arguments to function ‘exit’
tcp_time_client.c:203: warning: incompatible implicit declaration of built-in 
function ‘exit’
tcp_time_client.c:203: error: too few arguments to function ‘exit’
tcp_time_client.c:209: warning: incompatible implicit declaration of built-in 
function ‘exit’
tcp_time_client.c:209: error: too few arguments to function ‘exit’
tcp_time_client.c:228: warning: incompatible implicit declaration of built-in 
function ‘exit’
tcp_time_client.c:242: warning: incompatible implicit declaration of built-in 
function ‘exit’
tcp_time_client.c:247: warning: incompatible implicit declaration of built-in 
function ‘exit’
tcp_time_client.c:255: warning: incompatible implicit declaration of built-in 
function ‘exit’
tcp_time_client.c:308: warning: incompatible implicit declaration of built-in 
function ‘exit’
tcp_time_client.c:310: warning: incompatible implicit declaration of built-in 
function ‘exit’
make: *** [tcp.o] Error 1

So I replaced all occurrences of:

exit(); with return;
exit(0); with return 0;
exit(1); with return 1;

after which I got a clean compile and the program seems to work fine.

Converting exit to return seems a harmless operation but ever since I came to 
Linux I am somewhat paranoid about hacking anything myself without 
guidance...

Thanks.

-- 

Tux #395953 resides at http://samvit.org
playing with KDE 3.51 on SUSE Linux 10.0
$ date [] CCE +2006-02-17 W07-5 UTC+0530
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-02-18 10:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-17  2:30 Compiling the NIST Time Client Shriramana Sharma
2006-02-17  6:24 ` Glynn Clements
2006-02-17 13:03 ` Reuben D. Budiardja
2006-02-18  5:10   ` Shriramana Sharma
2006-02-18 10:20     ` Glynn Clements
2006-02-18 10:20     ` Steve Graegert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).