diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-06-16 09:40:41 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-06-16 10:51:42 +0000 |
commit | 66792ca61f9043acf53ca206dcc7bd701194492a (patch) | |
tree | 6a053a24c9ee1716d04a98b25bf52494cb90e846 | |
parent | 70af2e987a42c1f194997b0bc9c863d44e1ea38e (diff) |
Remove more unused defines
-rw-r--r-- | document/src/vespa/document/fieldvalue/serializablearray.cpp | 2 | ||||
-rw-r--r-- | fastos/src/vespa/fastos/thread.h | 1 | ||||
-rw-r--r-- | fastos/src/vespa/fastos/types.h | 8 | ||||
-rw-r--r-- | fastos/src/vespa/fastos/unix_socket.cpp | 4 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/util/atomic.h | 4 |
5 files changed, 4 insertions, 15 deletions
diff --git a/document/src/vespa/document/fieldvalue/serializablearray.cpp b/document/src/vespa/document/fieldvalue/serializablearray.cpp index a2d92100dde..6309338eb3b 100644 --- a/document/src/vespa/document/fieldvalue/serializablearray.cpp +++ b/document/src/vespa/document/fieldvalue/serializablearray.cpp @@ -191,7 +191,7 @@ SerializableArray::deCompress() // throw (DeserializeException) if (unCompressed.getDataLen() != (size_t)_uncompressedLength) { throw DeserializeException( vespalib::make_string( - "Did not decompress to the expected length: had %" PRIu64 ", wanted %" PRId32 ", got %" PRIu64, + "Did not decompress to the expected length: had %" PRIu64 ", wanted %d, got %" PRIu64, _compSerData->getRemaining(), _uncompressedLength, unCompressed.getDataLen()), VESPA_STRLOC); } diff --git a/fastos/src/vespa/fastos/thread.h b/fastos/src/vespa/fastos/thread.h index 1bbda9d7372..a6ef359342a 100644 --- a/fastos/src/vespa/fastos/thread.h +++ b/fastos/src/vespa/fastos/thread.h @@ -15,6 +15,7 @@ #include <vespa/fastos/mutex.h> #include <vespa/fastos/cond.h> +typedef pthread_t FastOS_ThreadId; class FastOS_Runnable; class FastOS_ThreadInterface; diff --git a/fastos/src/vespa/fastos/types.h b/fastos/src/vespa/fastos/types.h index ea7bf7a5a88..fddf79437d4 100644 --- a/fastos/src/vespa/fastos/types.h +++ b/fastos/src/vespa/fastos/types.h @@ -58,10 +58,6 @@ #include <sys/socket.h> -#ifndef SHUT_RDWR -#define SHUT_RDWR 2 -#endif - #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> @@ -113,7 +109,7 @@ #include <getopt.h> /* 64bit printf specifiers */ -#ifdef FASTOS_64BIT_LONG +#if (__WORDSIZE == 64) #ifndef PRIu64 #define PRIu64 "lu" @@ -125,5 +121,3 @@ #else /* ! FASTOS_64BIT_LONG */ #error "Only 64 environments are supported." #endif /* FASTOS_64BIT_LONG */ - -typedef pthread_t FastOS_ThreadId; diff --git a/fastos/src/vespa/fastos/unix_socket.cpp b/fastos/src/vespa/fastos/unix_socket.cpp index 8e0b4b5e658..a6cce42bfad 100644 --- a/fastos/src/vespa/fastos/unix_socket.cpp +++ b/fastos/src/vespa/fastos/unix_socket.cpp @@ -20,10 +20,6 @@ bool FastOS_UNIX_Socket::Close() return rc; } -#ifndef SHUT_WR -#define SHUT_WR 1 -#endif - bool FastOS_UNIX_Socket::Shutdown() { bool rc=true; diff --git a/vespalib/src/vespa/vespalib/util/atomic.h b/vespalib/src/vespa/vespalib/util/atomic.h index 77f1f7554ae..c9259671cae 100644 --- a/vespalib/src/vespa/vespalib/util/atomic.h +++ b/vespalib/src/vespa/vespalib/util/atomic.h @@ -67,7 +67,7 @@ public: static inline int64_t postDec(volatile int64_t *data); static inline bool cmpSwap(volatile int64_t * dest, int64_t newVal, int64_t oldVal); -#if defined(FASTOS_64BIT_LONG) +#if defined(__x86_64__) static inline bool cmpSwap(volatile long long * dest, long long newVal, long long oldVal); static inline bool cmpSwap(volatile unsigned long long * dest, unsigned long long newVal, unsigned long long oldVal); #endif @@ -75,8 +75,6 @@ public: #if defined(__x86_64__) #define VESPALIB_ATOMIC_TAGGEDPTR_ALIGNMENT __attribute__ ((aligned (16))) -#elif defined(__i386__) - #define VESPALIB_ATOMIC_TAGGEDPTR_ALIGNMENT #else #error "VESPALIB_ATOMIC_TAGGEDPTR_ALIGNMENT can not be defined." #endif |