mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +00:00
Replaced // comments for C89/C90 standard compliance
This commit is contained in:
parent
b3dde9a009
commit
5fdd033e7d
7 changed files with 13 additions and 9 deletions
4
CHANGES
4
CHANGES
|
@ -49,6 +49,10 @@ Coding:
|
||||||
starting the data transfer loop. Useful, e.g., to accumulate multiple
|
starting the data transfer loop. Useful, e.g., to accumulate multiple
|
||||||
packets in a receiving datagram socket before starting to process them.
|
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:
|
Porting:
|
||||||
Small correction in configure.ac makes Socat C99 able.
|
Small correction in configure.ac makes Socat C99 able.
|
||||||
Thanks to Florian Weimer from Red Hat for provinding a patch.
|
Thanks to Florian Weimer from Red Hat for provinding a patch.
|
||||||
|
|
2
fdname.c
2
fdname.c
|
@ -367,7 +367,7 @@ int sockname(int fd, FILE *outfile, char style) {
|
||||||
socknamebuff, sizeof(socknamebuff)));
|
socknamebuff, sizeof(socknamebuff)));
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
//sockettype(opttype, typename, TYPENAMEMAX);
|
/* sockettype(opttype, typename, TYPENAMEMAX); */
|
||||||
fprintf(outfile, "unix %s-%s %s %s",
|
fprintf(outfile, "unix %s-%s %s %s",
|
||||||
sockaddr_unix_info(&sockname.un, socknamelen,
|
sockaddr_unix_info(&sockname.un, socknamelen,
|
||||||
socknamebuff, sizeof(socknamebuff)),
|
socknamebuff, sizeof(socknamebuff)),
|
||||||
|
|
8
filan.c
8
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_OPTIONS", tcpinfo.tcpi_options);
|
||||||
fprintf(outfile, "%s={%u}\t", "TCPI_SND_WSCALE", tcpinfo.tcpi_snd_wscale);
|
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_RCV_WSCALE", tcpinfo.tcpi_rcv_wscale);
|
||||||
//fprintf(outfile, "%s={%u}\t", "TCPI_DELIVERY_RATE_APP_LIMITED", tcpinfo.tcpi_delivery_rate_app_limited);
|
#if LATER
|
||||||
//fprintf(outfile, "%s={%u}\t", "TCPI_FASTOPEN_CLIENT_FAIL", tcpinfo.tcpi_fastopen_client_fail);
|
fprintf(outfile, "%s={%u}\t", "TCPI_DELIVERY_RATE_APP_LIMITED", tcpinfo.tcpi_delivery_rate_app_limited);
|
||||||
// fprintf(outfile, "%s={%u}\t", "TCPI_", tcpinfo.tcpi_);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
3
socat.c
3
socat.c
|
@ -1543,9 +1543,8 @@ void socat_signal(int signum) {
|
||||||
case SIGINT:
|
case SIGINT:
|
||||||
Notice1("exiting on signal %d", signum); break;
|
Notice1("exiting on signal %d", signum); break;
|
||||||
}
|
}
|
||||||
//Exit(128+signum);
|
|
||||||
Notice1("socat_signal(): finishing signal %d", 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;
|
diag_in_handler = 0;
|
||||||
errno = _errno;
|
errno = _errno;
|
||||||
}
|
}
|
||||||
|
|
|
@ -927,8 +927,6 @@ int
|
||||||
unsigned long err;
|
unsigned long err;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
//*ipproto = IPPROTO_TCP;
|
|
||||||
|
|
||||||
xfd->dtype = XIODATA_OPENSSL;
|
xfd->dtype = XIODATA_OPENSSL;
|
||||||
|
|
||||||
retropt_bool(opts, OPT_OPENSSL_FIPS, &opt_fips);
|
retropt_bool(opts, OPT_OPENSSL_FIPS, &opt_fips);
|
||||||
|
|
|
@ -376,7 +376,6 @@ int xiotermios_speed(int fd, int n, speed_t speed) {
|
||||||
&_xiotermios_data.termarg, speed, strerror(errno));
|
&_xiotermios_data.termarg, speed, strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Tcgetattr(fd, &_xiotermios_data.termarg);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* HAVE_TERMIOS_ISPEED */
|
#endif /* HAVE_TERMIOS_ISPEED */
|
||||||
|
|
|
@ -2590,6 +2590,7 @@ int parseopts_table(const char **a, unsigned int groups, struct opt **opts,
|
||||||
break;
|
break;
|
||||||
#endif /* defined(WITH_IP4) */
|
#endif /* defined(WITH_IP4) */
|
||||||
|
|
||||||
|
#if LATER
|
||||||
case TYPE_GENERIC:
|
case TYPE_GENERIC:
|
||||||
if (!assign) {
|
if (!assign) {
|
||||||
(*opts)[i].value.u_int = 1;
|
(*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
|
//(*opts)[i].value.u_bin.b_len
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif /* LATER */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Error2("parseopts_table(): internal error on option \"%s\": unimplemented type %d",
|
Error2("parseopts_table(): internal error on option \"%s\": unimplemented type %d",
|
||||||
|
|
Loading…
Reference in a new issue