From 3a7acae2c91adc8844f6dd7f47e0ee25468e1568 Mon Sep 17 00:00:00 2001 From: Simone Piccardi Date: Tue, 18 May 2010 10:52:51 +0000 Subject: [PATCH] Altre correzioni degli include per le nuove posizioni delle dichiarazioni delle funzioni di sistema. --- sources/DirMonitor.c | 1 + sources/PXDirMonitor.c | 1 + sources/SetTermAttr.c | 9 +++++---- sources/TCP_cunc_daytimed.c | 2 ++ sources/TCP_daytime.c | 2 ++ sources/TCP_iter_daytimed.c | 2 ++ sources/UDP_daytime.c | 3 ++- sources/UDP_daytimed.c | 2 ++ sources/UDP_echo_first.c | 1 + sources/mygethost.c | 3 +-- 10 files changed, 19 insertions(+), 7 deletions(-) diff --git a/sources/DirMonitor.c b/sources/DirMonitor.c index 91198d4..8a696fe 100644 --- a/sources/DirMonitor.c +++ b/sources/DirMonitor.c @@ -31,6 +31,7 @@ #include /* directory operation constants and functions */ #include /* C standard library */ #include /* unix standard library */ +#include /* C strings library */ #include "Gapil.h" #include "macros.h" diff --git a/sources/PXDirMonitor.c b/sources/PXDirMonitor.c index 5f001fe..b6ec982 100644 --- a/sources/PXDirMonitor.c +++ b/sources/PXDirMonitor.c @@ -32,6 +32,7 @@ #include /* directory operation constants and functions */ #include /* C standard library */ #include /* unix standard library */ +#include /* C strings library */ #include "Gapil.h" #include "macros.h" diff --git a/sources/SetTermAttr.c b/sources/SetTermAttr.c index d509d26..c0e79c3 100644 --- a/sources/SetTermAttr.c +++ b/sources/SetTermAttr.c @@ -28,19 +28,20 @@ #include /* unix standard library */ #include /* terminals constants, types and functions */ #include /* error definitions and routines */ +#include /* standard I/O library */ int SetTermAttr(int fd, tcflag_t flag) { struct termios values; int res; - res = tcgetattr (desc, &values); + res = tcgetattr (fd, &values); if (res) { perror("Cannot get attributes"); return res; } values.c_lflag |= flag; - res = tcsetattr (desc, TCSANOW, &values); + res = tcsetattr (fd, TCSANOW, &values); if (res) { perror("Cannot set attributes"); return res; @@ -52,13 +53,13 @@ int UnSetTermAttr(int fd, tcflag_t flag) struct termios values; int res; - res = tcgetattr (desc, &values); + res = tcgetattr (fd, &values); if (res) { perror("Cannot get attributes"); return res; } values.c_lflag &= (~flag); - res = tcsetattr (desc, TCSANOW, &values); + res = tcsetattr (fd, TCSANOW, &values); if (res) { perror("Cannot set attributes"); return res; diff --git a/sources/TCP_cunc_daytimed.c b/sources/TCP_cunc_daytimed.c index 1b748de..32f38c7 100644 --- a/sources/TCP_cunc_daytimed.c +++ b/sources/TCP_cunc_daytimed.c @@ -36,6 +36,8 @@ #include /* socket constants, types and functions */ #include /* standard I/O library */ #include /* date and time constants, types and functions */ +#include /* C strings library */ +#include /* C standard library */ #define MAXLINE 80 #define BACKLOG 10 diff --git a/sources/TCP_daytime.c b/sources/TCP_daytime.c index 0c5857e..e1fe9d6 100644 --- a/sources/TCP_daytime.c +++ b/sources/TCP_daytime.c @@ -36,6 +36,8 @@ #include /* IP addresses conversion utilities */ #include /* socket constants, types and functions */ #include /* standard I/O library */ +#include /* C strings library */ +#include /* C standard library */ #define MAXLINE 80 /* Program begin */ diff --git a/sources/TCP_iter_daytimed.c b/sources/TCP_iter_daytimed.c index d124ec9..9771dad 100644 --- a/sources/TCP_iter_daytimed.c +++ b/sources/TCP_iter_daytimed.c @@ -36,6 +36,8 @@ #include /* socket constants, types and functions */ #include /* standard I/O library */ #include /* date and time constants, types and functions */ +#include /* C strings library */ +#include /* C standard library */ #define MAXLINE 80 #define BACKLOG 10 diff --git a/sources/UDP_daytime.c b/sources/UDP_daytime.c index 889e61d..8f98a41 100644 --- a/sources/UDP_daytime.c +++ b/sources/UDP_daytime.c @@ -35,7 +35,8 @@ #include /* IP addresses conversion utilities */ #include /* socket constants, types and functions */ #include /* standard I/O library */ -#include /* standard library */ +#include /* C standard library */ +#include /* C strings library */ #define MAXLINE 80 /* Program begin */ diff --git a/sources/UDP_daytimed.c b/sources/UDP_daytimed.c index 4011246..6f40384 100644 --- a/sources/UDP_daytimed.c +++ b/sources/UDP_daytimed.c @@ -36,6 +36,8 @@ #include /* socket constants, types and functions */ #include /* standard I/O library */ #include /* date and time constants, types and functions */ +#include /* C strings library */ +#include /* C standard library */ #define MAXLINE 80 /* Program begin */ diff --git a/sources/UDP_echo_first.c b/sources/UDP_echo_first.c index 8f00498..5c4e9c8 100644 --- a/sources/UDP_echo_first.c +++ b/sources/UDP_echo_first.c @@ -38,6 +38,7 @@ #include /* standard I/O library */ #include /* error definitions and routines */ #include /* C strings library */ +#include /* C standard library */ #include "macros.h" diff --git a/sources/mygethost.c b/sources/mygethost.c index c585eb8..2167852 100644 --- a/sources/mygethost.c +++ b/sources/mygethost.c @@ -30,8 +30,7 @@ #include /* unix standard library */ #include /* IP addresses conversion utilities */ #include /* C resolver library */ - - +#include /* TCP socket option */ extern int h_errno; -- 2.30.2