diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-03-07 12:34:15 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-03-07 12:34:15 -0500 |
commit | 955b82d9ee173de7a0410f7b39c9f7f0999e4633 (patch) | |
tree | 4d7b0e267ab5e9cba62e643b578b4508ae0238cd /compiler.h | |
parent | 95c343b2b266c17defd8836c8b515848786b755d (diff) | |
download | gpsd-955b82d9ee173de7a0410f7b39c9f7f0999e4633.tar.gz |
Move some toolchain settings into compiler.h, all that stuff should live there.
Diffstat (limited to 'compiler.h')
-rw-r--r-- | compiler.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -7,6 +7,23 @@ #ifndef _GPSD_COMPILER_H_ #define _GPSD_COMPILER_H_ +/* + * Tell GCC that we want thread-safe behavior with _REENTRANT; + * in particular, errno must be thread-local. + * Tell POSIX-conforming implementations with _POSIX_THREAD_SAFE_FUNCTIONS. + * See http://www.unix.org/whitepapers/reentrant.html + */ +#ifndef _REENTRANT +#define _REENTRANT +#endif +#ifndef _POSIX_THREAD_SAFE_FUNCTIONS +#define _POSIX_THREAD_SAFE_FUNCTIONS +#endif + +#ifdef _WIN32 +typedef unsigned int speed_t; +#endif + #include "gpsd_config.h" /* is HAVE_STDATOMIC defined? */ /* Macro for declaring function with printf-like arguments. */ |