diff options
-rw-r--r-- | lib/errno_names.c | 14 | ||||
-rw-r--r-- | lib/qpthreads.c | 6 | ||||
-rw-r--r-- | lib/qstring.c | 4 | ||||
-rw-r--r-- | lib/sockopt.c | 12 | ||||
-rw-r--r-- | lib/sockunion.c | 4 |
5 files changed, 27 insertions, 13 deletions
diff --git a/lib/errno_names.c b/lib/errno_names.c index 791f8001..7238f1a7 100644 --- a/lib/errno_names.c +++ b/lib/errno_names.c @@ -40,6 +40,8 @@ static const char* errno_name_table[] = /* POSIX Error Numbers -- taken Open Group Base Specifications Issue 7 * IEEE Std 1003.1-2008 + * + * Stream related stuff does not seeem to be fully supported. */ ERRNO(E2BIG), /* Argument list too long. */ ERRNO(EACCES), /* Permission denied. */ @@ -86,8 +88,10 @@ static const char* errno_name_table[] = ERRNO(ENETUNREACH), /* Network unreachable. */ ERRNO(ENFILE), /* Too many files open in system. */ ERRNO(ENOBUFS), /* No buffer space available. */ +#ifdef ENODATA ERRNO(ENODATA), /* No message is available on the STREAM head read queue. */ +#endif ERRNO(ENODEV), /* No such device. */ ERRNO(ENOENT), /* No such file or directory. */ ERRNO(ENOEXEC), /* Executable file format error. */ @@ -97,13 +101,19 @@ static const char* errno_name_table[] = ERRNO(ENOMSG), /* No message of the desired type. */ ERRNO(ENOPROTOOPT), /* Protocol not available. */ ERRNO(ENOSPC), /* No space left on device. */ +#ifdef ENOSR ERRNO(ENOSR), /* No STREAM resources. */ +#endif +#ifdef ENOSTR ERRNO(ENOSTR), /* Not a STREAM. */ +#endif ERRNO(ENOSYS), /* Function not supported. */ ERRNO(ENOTCONN), /* The socket is not connected. */ ERRNO(ENOTDIR), /* Not a directory. */ ERRNO(ENOTEMPTY), /* Directory not empty. */ +#ifdef ENOTRECOVERABLE ERRNO(ENOTRECOVERABLE), /* State not recoverable. */ +#endif ERRNO(ENOTSOCK), /* Not a socket. */ ERRNO(ENOTSUP), /* Not supported (may be the same value as [EOPNOTSUPP]). */ @@ -114,7 +124,9 @@ static const char* errno_name_table[] = (may be the same value as [ENOTSUP]). */ #endif ERRNO(EOVERFLOW), /* Value too large to be stored in data type. */ +#ifdef EOWNERDEAD ERRNO(EOWNERDEAD), /* Previous owner died. */ +#endif ERRNO(EPERM), /* Operation not permitted. */ ERRNO(EPIPE), /* Broken pipe. */ ERRNO(EPROTO), /* Protocol error. */ @@ -125,7 +137,9 @@ static const char* errno_name_table[] = ERRNO(ESPIPE), /* Invalid seek. */ ERRNO(ESRCH), /* No such process. */ ERRNO(ESTALE), /* Reserved. */ +#ifdef ETIME ERRNO(ETIME), /* Stream ioctl() timeout. */ +#endif ERRNO(ETIMEDOUT), /* Connection timed out. */ ERRNO(ETXTBSY), /* Text file busy. */ ERRNO(EWOULDBLOCK), /* Operation would block diff --git a/lib/qpthreads.c b/lib/qpthreads.c index 58573087..baa34d52 100644 --- a/lib/qpthreads.c +++ b/lib/qpthreads.c @@ -30,9 +30,9 @@ #include "memory.h" /* If this is not set, will get errors later. */ -#ifndef __USE_UNIX98 -#error "_USE_UNIX98 not defined" -#endif +//#ifndef __USE_UNIX98 +//#error "_USE_UNIX98 not defined" +//#endif /*============================================================================== * Quagga Pthread Interface -- qpt_xxxx diff --git a/lib/qstring.c b/lib/qstring.c index a3dc95cd..5ca4d868 100644 --- a/lib/qstring.c +++ b/lib/qstring.c @@ -490,8 +490,8 @@ qs_cmp_sig(qstring a, qstring b) { if (isspace(*p_a) && isspace(*p_b)) { - do { ++p_a ; } while isspace(*p_a) ; - do { ++p_b ; } while isspace(*p_b) ; + do { ++p_a ; } while (isspace(*p_a)) ; + do { ++p_b ; } while (isspace(*p_b)) ; } ; if (*p_a != *p_b) diff --git a/lib/sockopt.c b/lib/sockopt.c index 966ba260..bf3c5d50 100644 --- a/lib/sockopt.c +++ b/lib/sockopt.c @@ -597,18 +597,18 @@ sockopt_tcp_signature (int sock_fd, union sockunion *su, const char *password) return (ret >= 0) ? 0 : -1 ; #elif HAVE_DECL_TCP_MD5SIG -#ifndef GNU_LINUX + int ret, err ; +# ifndef GNU_LINUX /* * XXX Need to do PF_KEY operation here to add/remove an SA entry, * and add/remove an SP entry for this peer's packet flows also. */ int md5sig = password && *password ? 1 : 0; -#else +# else int keylen = password ? strlen (password) : 0 ; struct tcp_md5sig md5sig ; union sockunion *su2 ; union sockunion susock ; - int ret, err ; /* Figure out whether the socket and the sockunion are the same family.. * adding AF_INET to AF_INET6 needs to be v4 mapped, you'd think.. @@ -627,7 +627,7 @@ sockopt_tcp_signature (int sock_fd, union sockunion *su, const char *password) if (su2->sa.sa_family == AF_INET) return 0 ; /* TODO: find out what this is doing ?? */ -#ifdef HAVE_IPV6 +# ifdef HAVE_IPV6 /* If this does not work, then all users of this sockopt will need to * differentiate between IPv4 and IPv6, and keep separate sockets for * each. @@ -644,7 +644,7 @@ sockopt_tcp_signature (int sock_fd, union sockunion *su, const char *password) su2->sin6.sin6_addr.s6_addr32[2] = htonl(0xffff); memcpy (&su2->sin6.sin6_addr.s6_addr32[3], &su->sin.sin_addr, 4); } -#endif +# endif } memset (&md5sig, 0, sizeof (md5sig)); @@ -653,7 +653,7 @@ sockopt_tcp_signature (int sock_fd, union sockunion *su, const char *password) if (keylen) memcpy (md5sig.tcpm_key, password, keylen); -#endif /* GNU_LINUX */ +# endif /* GNU_LINUX */ err = 0 ; ret = setsockopt(sock_fd, IPPROTO_TCP, TCP_MD5SIG, &md5sig, sizeof(md5sig)) ; diff --git a/lib/sockunion.c b/lib/sockunion.c index 9a063190..e08a3745 100644 --- a/lib/sockunion.c +++ b/lib/sockunion.c @@ -167,11 +167,11 @@ sockunion_set_family(sockunion su, sa_family_t family) #ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN if (family == AF_INET) - sockunion_sin_len(sockunion su) ; + sockunion_sin_len(su) ; #endif #if defined(HAVE_IPV6) && defined(SIN6_LEN) if (family == AF_INET6) - sockunion_sin6_len(sockunion su) ; + sockunion_sin6_len(su) ; #endif return 0 ; |