diff --git a/CHANGES b/CHANGES index 8b01248..b93e78b 100644 --- a/CHANGES +++ b/CHANGES @@ -49,6 +49,10 @@ Coding: starting the data transfer loop. Useful, e.g., to accumulate multiple packets in a receiving datagram socket before starting to process them. + "//" comments were used for disabling experimental code. These lines + have now been removed or disabled in other ways to make Socat compile + with C89/C90 standard again. + Porting: Small correction in configure.ac makes Socat C99 able. Thanks to Florian Weimer from Red Hat for provinding a patch. diff --git a/fdname.c b/fdname.c index 872a9f4..1d32edc 100644 --- a/fdname.c +++ b/fdname.c @@ -367,7 +367,7 @@ int sockname(int fd, FILE *outfile, char style) { socknamebuff, sizeof(socknamebuff))); break; case 'S': - //sockettype(opttype, typename, TYPENAMEMAX); + /* sockettype(opttype, typename, TYPENAMEMAX); */ fprintf(outfile, "unix %s-%s %s %s", sockaddr_unix_info(&sockname.un, socknamelen, socknamebuff, sizeof(socknamebuff)), diff --git a/filan.c b/filan.c index dbc54f0..b965eba 100644 --- a/filan.c +++ b/filan.c @@ -952,9 +952,11 @@ int tcpan2(int fd, FILE *outfile) { fprintf(outfile, "%s={%u}\t", "TCPI_OPTIONS", tcpinfo.tcpi_options); fprintf(outfile, "%s={%u}\t", "TCPI_SND_WSCALE", tcpinfo.tcpi_snd_wscale); fprintf(outfile, "%s={%u}\t", "TCPI_RCV_WSCALE", tcpinfo.tcpi_rcv_wscale); - //fprintf(outfile, "%s={%u}\t", "TCPI_DELIVERY_RATE_APP_LIMITED", tcpinfo.tcpi_delivery_rate_app_limited); - //fprintf(outfile, "%s={%u}\t", "TCPI_FASTOPEN_CLIENT_FAIL", tcpinfo.tcpi_fastopen_client_fail); - // fprintf(outfile, "%s={%u}\t", "TCPI_", tcpinfo.tcpi_); +#if LATER + fprintf(outfile, "%s={%u}\t", "TCPI_DELIVERY_RATE_APP_LIMITED", tcpinfo.tcpi_delivery_rate_app_limited); + fprintf(outfile, "%s={%u}\t", "TCPI_FASTOPEN_CLIENT_FAIL", tcpinfo.tcpi_fastopen_client_fail); + fprintf(outfile, "%s={%u}\t", "TCPI_", tcpinfo.tcpi_); +#endif return 0; } diff --git a/socat.c b/socat.c index 41f69a7..9e7b34a 100644 --- a/socat.c +++ b/socat.c @@ -1543,9 +1543,8 @@ void socat_signal(int signum) { case SIGINT: Notice1("exiting on signal %d", signum); break; } - //Exit(128+signum); Notice1("socat_signal(): finishing signal %d", signum); - diag_exit(128+signum); /*!!! internal cleanup + _exit() */ + diag_exit(128+signum); /* internal cleanup + _exit() */ diag_in_handler = 0; errno = _errno; } diff --git a/xio-openssl.c b/xio-openssl.c index 7d088cf..f393b9b 100644 --- a/xio-openssl.c +++ b/xio-openssl.c @@ -927,8 +927,6 @@ int unsigned long err; int result; - //*ipproto = IPPROTO_TCP; - xfd->dtype = XIODATA_OPENSSL; retropt_bool(opts, OPT_OPENSSL_FIPS, &opt_fips); diff --git a/xio-termios.c b/xio-termios.c index 5835101..6edcea4 100644 --- a/xio-termios.c +++ b/xio-termios.c @@ -376,7 +376,6 @@ int xiotermios_speed(int fd, int n, speed_t speed) { &_xiotermios_data.termarg, speed, strerror(errno)); } } -// Tcgetattr(fd, &_xiotermios_data.termarg); return 0; } #endif /* HAVE_TERMIOS_ISPEED */ diff --git a/xioopts.c b/xioopts.c index d0ecfae..e77ff96 100644 --- a/xioopts.c +++ b/xioopts.c @@ -2590,6 +2590,7 @@ int parseopts_table(const char **a, unsigned int groups, struct opt **opts, break; #endif /* defined(WITH_IP4) */ +#if LATER case TYPE_GENERIC: if (!assign) { (*opts)[i].value.u_int = 1; @@ -2606,6 +2607,7 @@ int parseopts_table(const char **a, unsigned int groups, struct opt **opts, //(*opts)[i].value.u_bin.b_len } break; +#endif /* LATER */ default: Error2("parseopts_table(): internal error on option \"%s\": unimplemented type %d",