From 7ceccc20dd711671ea846161b6fa9e335373f9af Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Thu, 16 Jun 2016 08:56:58 +0000 Subject: Remove unused defines, and reduce scope on others --- fastos/src/vespa/fastos/types.h | 97 --------------------------------- fastos/src/vespa/fastos/unix_socket.cpp | 4 ++ 2 files changed, 4 insertions(+), 97 deletions(-) (limited to 'fastos') diff --git a/fastos/src/vespa/fastos/types.h b/fastos/src/vespa/fastos/types.h index 36a7ba7c926..952549fbde8 100644 --- a/fastos/src/vespa/fastos/types.h +++ b/fastos/src/vespa/fastos/types.h @@ -10,9 +10,7 @@ #pragma once -#ifndef FASTOS_AUTOCONF /* Are we in the autoconf stage? */ #include -#endif /** * @def __STDC_LIMIT_MACROS @@ -110,49 +108,8 @@ #define FASTOS_PREFIX(a) FastOS_##a -#ifndef NULL -#define NULL 0 -#endif - -#ifndef FASTOS_AUTOCONF - #include -/** - * On UNIX we use the [long long] type for 64bit integers. - */ -#ifndef FASTOS_HAVE_INT64_T -typedef long long int64_t; -#endif - -#ifndef FASTOS_HAVE_UINT64_T -typedef unsigned long long uint64_t; -#endif - -#ifndef FASTOS_HAVE_INT32_T -typedef int int32_t; -#endif - -#ifndef FASTOS_HAVE_UINT32_T -typedef unsigned int uint32_t; -#endif - -#ifndef FASTOS_HAVE_INT16_T -typedef short int int16_t; -#endif - -#ifndef FASTOS_HAVE_UINT16_T -typedef unsigned short int uint16_t; -#endif - -#ifndef FASTOS_HAVE_INT8_T -typedef signed char int8_t; -#endif - -#ifndef FASTOS_HAVE_UINT8_T -typedef unsigned char uint8_t; -#endif - #ifndef INT64_C #ifdef FASTOS_64BIT_LONG #define INT64_C(c) c ## L @@ -170,62 +127,8 @@ typedef unsigned char uint8_t; #endif /* UINT64_C */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif - -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif - -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif - -#ifndef INT64_MIN -#define INT64_MIN (-INT64_C(9223372036854775807)-1) -#endif - -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif - -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif - -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif - -#ifndef INT64_MAX -#define INT64_MAX (INT64_C(9223372036854775807)) -#endif - -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif - -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif - -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#ifndef UINT64_MAX -#define UINT64_MAX (UINT64_C(18446744073709551615)) -#endif - #include -#endif /* FASTOS_AUTOCONF */ - -#ifndef SHUT_WR -#define SHUT_WR 1 -#endif - /* 64bit printf specifiers */ #ifdef FASTOS_64BIT_LONG #ifndef PRId64 diff --git a/fastos/src/vespa/fastos/unix_socket.cpp b/fastos/src/vespa/fastos/unix_socket.cpp index a6cce42bfad..8e0b4b5e658 100644 --- a/fastos/src/vespa/fastos/unix_socket.cpp +++ b/fastos/src/vespa/fastos/unix_socket.cpp @@ -20,6 +20,10 @@ bool FastOS_UNIX_Socket::Close() return rc; } +#ifndef SHUT_WR +#define SHUT_WR 1 +#endif + bool FastOS_UNIX_Socket::Shutdown() { bool rc=true; -- cgit v1.2.3