aboutsummaryrefslogtreecommitdiffstats
path: root/fastos
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-06-16 08:56:58 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2016-06-16 10:51:40 +0000
commit7ceccc20dd711671ea846161b6fa9e335373f9af (patch)
tree43e9e6f76fbf822c02f75b69ebf35f11d567ac01 /fastos
parent7cb778378fdf92331882704569d72e3dadee2c22 (diff)
Remove unused defines, and reduce scope on others
Diffstat (limited to 'fastos')
-rw-r--r--fastos/src/vespa/fastos/types.h97
-rw-r--r--fastos/src/vespa/fastos/unix_socket.cpp4
2 files changed, 4 insertions, 97 deletions
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 <vespa/fastos/autoconf.h>
-#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 <inttypes.h>
-/**
- * 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 <getopt.h>
-#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;