From 9a3b25e4fa4b9acb7b444e6e33bcba1c8310b888 Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 24 Apr 2000 23:52:13 +0000 Subject: [PATCH] cygwin32 fixes by norman vine. --- src/NetworkOLK/net_send.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/NetworkOLK/net_send.cxx b/src/NetworkOLK/net_send.cxx index 47898188e..0d5926248 100644 --- a/src/NetworkOLK/net_send.cxx +++ b/src/NetworkOLK/net_send.cxx @@ -53,12 +53,12 @@ int result; #if defined( __CYGWIN__ ) #include +const char *const *sys_errlist = _sys_errlist; #else +extern const char *const sys_errlist[]; extern int errno; #endif -extern const char *const sys_errlist[]; - int current_port = 10000; u_short base_port = 10000; u_short end_port = 10010; @@ -196,7 +196,7 @@ int list_not_in( char name[16]) { test = test->next; if (verbose != 0) printf("list_not_in : %d\n",i); } - return(i); + return i; } void fgd_print_Mat4( sgMat4 m ) { @@ -268,7 +268,7 @@ void fgd_init(void){ } else if (verbose == 2) printf(" address valid\n"); if ((base_port > end_port) || ((short)base_port < 0)) { - fprintf(stderr,"Bad port range : start=%d end=%d !\n"); + fprintf(stderr,"Bad port range : start=%d end=%d !\n",base_port,end_port); // exit(1); } else if (verbose == 2) { printf(" Port range: %d to %d\n",base_port,end_port); @@ -290,24 +290,25 @@ char *fgd_ip_check; printf(" FGD: resolved\nFGD: running on HOST : %s", fgd_host_check); printf(" IP : %s\n", fgd_ip_check); strcpy( fgd_host, fgd_host_check); -// return(0); +// return 0; } } else if ((address.sin_addr.s_addr = inet_addr( fgd_host)) == INADDR_NONE) { fprintf(stderr,"FGD: Could not get %s host entry !\n", fgd_host_check); printf(" FGD: NOT resolved !!!\n"); net_r = -1; - return(-1); + return -1; // exit(1); } else if (verbose == 2) printf(" address valid\n"); if ((base_port > end_port) || ((short)base_port < 0)) { - fprintf(stderr,"Bad port range : start=%d end=%d !\n"); + fprintf(stderr,"Bad port range : start=%d end=%d !\n",base_port,end_port); // exit(1); net_r = -2; - return(-2); + return -2; } else if (verbose == 2) { printf(" Port range: %d to %d\n",base_port,end_port); } + return 0; } -- 2.39.5