From 78ca776c24853e1ff5c458a91e6b07b0540e5026 Mon Sep 17 00:00:00 2001 From: Simone Piccardi Date: Tue, 18 May 2010 10:27:51 +0000 Subject: [PATCH] Correzioni delle dichiarazioni per le vecchie versioni. --- sources/TCP_echo.c | 2 -- sources/TCP_echo_fifth.c | 1 + sources/TCP_echo_first.c | 6 ++++++ sources/TCP_echo_fourth.c | 2 ++ sources/TCP_echo_second.c | 4 ++++ sources/TCP_echo_third.c | 3 +++ sources/TCP_echod_first.c | 1 - 7 files changed, 16 insertions(+), 3 deletions(-) diff --git a/sources/TCP_echo.c b/sources/TCP_echo.c index 879d900..2d41e93 100644 --- a/sources/TCP_echo.c +++ b/sources/TCP_echo.c @@ -45,8 +45,6 @@ #define TCP_CONGESTION 13 #endif - - #include "Gapil.h" #include "macros.h" diff --git a/sources/TCP_echo_fifth.c b/sources/TCP_echo_fifth.c index a40bbe9..8a69972 100644 --- a/sources/TCP_echo_fifth.c +++ b/sources/TCP_echo_fifth.c @@ -37,6 +37,7 @@ #include /* standard I/O library */ #include /* error definitions and routines */ #include /* C strings library */ +#include /* C standard library */ #include "Gapil.h" #include "macros.h" diff --git a/sources/TCP_echo_first.c b/sources/TCP_echo_first.c index c064c04..5ae174c 100644 --- a/sources/TCP_echo_first.c +++ b/sources/TCP_echo_first.c @@ -36,6 +36,12 @@ #include /* IP addresses conversion utilities */ #include /* socket constants, types and functions */ #include /* standard I/O library */ +#include /* C strings library */ +#include /* C standard library */ + +#include "Gapil.h" +#include "macros.h" + #define MAXLINE 256 void usage(void); diff --git a/sources/TCP_echo_fourth.c b/sources/TCP_echo_fourth.c index d0ff8a6..0c90ed6 100644 --- a/sources/TCP_echo_fourth.c +++ b/sources/TCP_echo_fourth.c @@ -37,7 +37,9 @@ #include /* standard I/O library */ #include /* error definitions and routines */ #include /* C strings library */ +#include /* C standard library */ +#include "Gapil.h" #include "macros.h" #define MAXLINE 256 diff --git a/sources/TCP_echo_second.c b/sources/TCP_echo_second.c index 7fe3e20..11f2ff1 100644 --- a/sources/TCP_echo_second.c +++ b/sources/TCP_echo_second.c @@ -38,6 +38,10 @@ #include /* standard I/O library */ #include /* error definitions and routines */ #include /* C strings library */ +#include /* C standard library */ + +#include "Gapil.h" +#include "macros.h" #define MAXLINE 256 void usage(void); diff --git a/sources/TCP_echo_third.c b/sources/TCP_echo_third.c index fde406d..73aeb46 100644 --- a/sources/TCP_echo_third.c +++ b/sources/TCP_echo_third.c @@ -38,9 +38,12 @@ #include /* standard I/O library */ #include /* error definitions and routines */ #include /* C strings library */ +#include /* C standard library */ +#include "Gapil.h" #include "macros.h" + #define MAXLINE 256 void usage(void); void ClientEcho(FILE * filein, int socket); diff --git a/sources/TCP_echod_first.c b/sources/TCP_echod_first.c index 9cc1f8d..31d0ded 100644 --- a/sources/TCP_echod_first.c +++ b/sources/TCP_echod_first.c @@ -139,7 +139,6 @@ int main(int argc, char *argv[]) /* handle echo to client */ while (1) { /* accept connection */ - len = sizeof(cli_add); if ( (conn_fd = accept(list_fd, NULL, NULL)) < 0) { PrintErr("accept error"); exit(1); -- 2.30.2