All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shriramana Sharma <samjnaa@gmail.com>
To: Linux C Programming List <linux-c-programming@vger.kernel.org>
Subject: Compiling the NIST Time Client
Date: Fri, 17 Feb 2006 08:00:59 +0530	[thread overview]
Message-ID: <200602170800.59429.samjnaa@gmail.com> (raw)

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

             reply	other threads:[~2006-02-17  2:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-17  2:30 Shriramana Sharma [this message]
2006-02-17  6:24 ` Compiling the NIST Time Client 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200602170800.59429.samjnaa@gmail.com \
    --to=samjnaa@gmail.com \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.