diff -rN -u old-working/unix_version/source/hypoe.c new-working/unix_version/source/hypoe.c --- old-working/unix_version/source/hypoe.c 2007-06-25 08:11:55.114086707 +0800 +++ new-working/unix_version/source/hypoe.c 2007-06-25 08:11:56.268911147 +0800 @@ -10,6 +10,8 @@ #define BACKUP_TYPE 'q' #include +#include +#include #include "sockets.h" /* BEGIN Hypoe.c */ @@ -43,14 +45,13 @@ int i, process_input(); int mode=1; /* initial toggle: 1 first time, 2 other times */ char filename[MAX_PATH]; - char *strcpy(); FILE * fileptr; /* Network socket related declarations */ - int fd, listen_ok, strcmp(); + int fd, listen_ok; int setup_server_socket(), listen_server_socket(); char tcp_service[MAX_STRING], last_string[MAX_STRING]; - char *status, *fdgetstr(), *strcpy(); + char *status, *fdgetstr(); unsigned alarm_seconds=ALARM_SECONDS, set_alarm(); f_init(); @@ -223,7 +224,7 @@ int mode_arg, socket_arg; char *filename; { - int mode, status, strlen(), rename_arc(); + int mode, status, rename_arc(); void initial_(), input1_(), lissum_(), locate_(), cleanup_(); mode = mode_arg; @@ -329,8 +330,8 @@ int rename_arc (old_filename) char *old_filename; { - int length, strlen(), rename(); - char new_filename[MAX_PATH], *strcpy(); + int length, rename(); + char new_filename[MAX_PATH]; (void) strcpy (new_filename, old_filename); diff -rN -u old-working/unix_version/source/listen_serv.c new-working/unix_version/source/listen_serv.c --- old-working/unix_version/source/listen_serv.c 2007-06-25 08:11:55.114086707 +0800 +++ new-working/unix_version/source/listen_serv.c 2007-06-25 08:11:56.305905523 +0800 @@ -25,10 +25,9 @@ int sd; { struct sockaddr_in client_sockaddr; - struct hostent *client_hostent, *gethostbyaddr(); - int fd, listen(), accept(); + struct hostent *client_hostent; + int fd; int addrlen = sizeof(struct sockaddr_in); - char *inet_ntoa(); /* Allow incomming connections to the socket and set */ /* up a "backlog" (queue) for multiple connections. */ @@ -44,7 +43,8 @@ /* Block until some client is "connect"ed (unless FNDELAY */ /* non-blocking is set), then get a file descriptor. */ do { - if ((fd = accept(sd, &client_sockaddr, &addrlen)) < 0) { + /* note: must typecast the pointer of client_sockaddr, for correctness */ + if ((fd = accept(sd, (struct sockaddr *)&client_sockaddr, &addrlen)) < 0) { if (errno == EWOULDBLOCK) return (-2); else if (errno != 4) { perror("listen_server_socket:accept"); diff -rN -u old-working/unix_version/source/makefile new-working/unix_version/source/makefile --- old-working/unix_version/source/makefile 2007-06-25 08:11:55.101088683 +0800 +++ new-working/unix_version/source/makefile 2007-06-25 08:11:56.305905523 +0800 @@ -3,7 +3,7 @@ # For solaris use the following lines: FC= f77 -C -O CC= cc -O -CLIBS = -lsocket -lnsl +CLIBS = -lnsl # For OS 4.1.* use the following lines: #FC= f77 -C -O -DSUN @@ -11,7 +11,7 @@ #CLIBS = -lF77 -lm # OBJS_XPICK are required for running hypoellipse with xpick. -OBJS_XPICK = Hypoe.o\ +OBJS_XPICK = hypoe.o\ cleanup.o\ fdgetstr.o\ initial.o\ diff -rN -u old-working/unix_version/source/setup_server.c new-working/unix_version/source/setup_server.c --- old-working/unix_version/source/setup_server.c 2007-06-25 08:11:55.101088683 +0800 +++ new-working/unix_version/source/setup_server.c 2007-06-25 08:11:56.069941395 +0800 @@ -19,6 +19,7 @@ /********************************************************************/ #include +#include #include "sockets.h" int setup_server_socket (tcp_service) @@ -27,9 +28,8 @@ extern char *program_name; struct sockaddr_in socket_name; - struct servent *getsevbyname(), *server_ptr; + struct servent *server_ptr; struct hostent *host_entry; - int gethostname(), socket(), bind(), listen(); char this_host[MAX_HOST_LENGTH]; char *inet_ntoa(), *char_ptr; @@ -83,7 +83,8 @@ /* Request that a name be assigned to the socket */ sockname_len = sizeof(socket_name); - if (bind(sd, &socket_name, sockname_len) < 0) { + /* Note: must typecast pointer of socket_name */ + if (bind(sd, (struct sockaddr *)&socket_name, sockname_len) < 0) { fprintf (stderr, "%s:\t", program_name); perror("setup_socket_server:bind"); return(-1); diff -rN -u old-working/unix_version/uamag/squish_uacal.c new-working/unix_version/uamag/squish_uacal.c --- old-working/unix_version/uamag/squish_uacal.c 2007-06-25 08:11:55.267063451 +0800 +++ new-working/unix_version/uamag/squish_uacal.c 2007-06-25 08:11:56.423887587 +0800 @@ -1,10 +1,12 @@ #include -void squish_uacal_ (old_string, new_string, old_length, new_length) +#include + +void squish_uacal__ (old_string, new_string, old_length, new_length) char old_string[], new_string[]; int old_length, new_length; { - int i, j, k, max_i, is_float, strlen(); - char decimal_string[20], *strcpy(); + int i, j, k, max_i, is_float; + char decimal_string[20]; i = j = 0; max_i = strlen(old_string);