Commit Graph

16 Commits

Author SHA1 Message Date
Jan-Erik Rediger
952a33f298 Make it compile on IBM AIX systems
Closes #422
2018-01-06 13:25:35 +01:00
Jan-Erik Rediger
94ed2e430b Make XOPEN_SOURCE definition explicit per architecture
Fixes #441
2018-01-05 16:20:34 +01:00
eldarko
6114da6429 Fix compilation on FreeBSD 10.3 with default compiler 2017-05-17 11:03:24 +03:00
Ted Nyman
bc0ea5c466 Do not define _XOPEN_SOURCE for OS X
Resolves failed `make` on OS X.
2016-06-19 22:14:41 -07:00
not-a-robot
e93c05a7aa Auto merge of #378 - thomaslee:tom_fix_kfreebsd, r=badboy
Fix strerror_r on some esoteric platforms

Defining _XOPEN_SOURCE=1 causes strange behavior on Debian kfreebsd archs -- i.e. the GNU userspace with FreeBSD kernel -- when _GNU_SOURCE is not defined (the default).

Not sure I fully understand the bizarre semantics, but it seems to use the XSI-compliant interface (int strerror_r(int, char*, size_t)) but the GNU implementation (char *strerror_r(int, char*, size_t)) such that strerror_r returns 32-bits of a 64-bit char * on x86_64 kfreebsd. We would expect strerror_r to return zero when using the XSI-compliant strerror_r implementation or a 64-bit char* when using the GNU version. Instead, we get something in between!

Unless I'm missing something, being more explicit about what version of _XOPEN_SOURCE we want seems to be the prudent thing to do here -- and if folks want the GNU implementation of strerror_r for some reason they can always -D_GNU_SOURCE explicitly.
2016-05-12 09:44:47 +02:00
not-a-robot
92d0e23661 Auto merge of #414 - redis:fix-cygwin, r=badboy
Fix cygwin
2016-04-20 16:44:15 +02:00
owent
6c53d6803a Add CI for Windows
- fix macro problem in mingw-gcc
- fix typedef in cygwin
2016-04-20 16:10:02 +02:00
Jerry Jacobs
9317a74ae5 fmacros.h: Fix warning when compiled with -Wundef 2016-04-17 20:23:42 +00:00
Tom Lee
bb1747b1bf Fix strerror_r on some esoteric platforms
Defining _XOPEN_SOURCE=1 causes strange behavior on Debian kfreebsd
archs (i.e. GNU userspace with FreeBSD kernel) when _GNU_SOURCE is not
defined.

Not sure I fully understand the bizarre semantics, but it seems to
use the XSI-compliant interface
(int strerror_r(int, char*, size_t)) but the GNU implementation
(char *strerror_r(int, char*, size_t)) such that strerror_r returns
32-bits of a 64-bit char * on x86_64 kfreebsd. We would expect
strerror_r to return zero when using the XSI-compliant strerror_r
implementation or a 64-bit char* when using the GNU version. Instead,
we get something in between!

Unless I'm missing something, being more explicit about what version
of _XOPEN_SOURCE we want seems to be the prudent thing to do here --
and if folks want the GNU implementation of strerror_r for some reason
they can always -D_GNU_SOURCE explicitly.
2015-11-18 00:28:10 -08:00
Matt Stancliff
74b7495f93 Silence _BSD_SOURCE warnings
glibc 2.20 requires _DEFAULT_SOURCE and doesn't like _BSD_SOURCE alone

Also see:
 - https://github.com/antirez/redis/pull/2189
 - https://sourceware.org/glibc/wiki/Release/2.20#Deprecation_of__BSD_SOURCE_and__SVID_SOURCE_feature_macros

Thanks to badboy for pointing out the problem at
https://github.com/redis/hiredis/issues/288#issuecomment-68849454
2015-01-06 17:55:55 -05:00
Patrick TJ McPhee
4441fa3513 Define _XOPEN_SOURCE for NetBSD
This is backported from
289942b625
2014-04-09 17:02:42 -04:00
Pieter Noordhuis
bb3c4c17c4 Make redisKeepAlive work on OSX 2013-05-01 09:23:06 -07:00
Pieter Noordhuis
d5a28db039 7th revision is not necessary 2011-06-18 15:06:38 +02:00
Pieter Noordhuis
1ac7121f65 Define _POSIX_C_SOURCE for Solaris 2011-06-18 15:05:33 +02:00
Pieter Noordhuis
aeeea0076d Update fmacros.h 2011-03-29 11:02:23 +02:00
antirez
4f6fc6dfb1 hiredis was extracted from redis-tools, reverted to standard malloc/free, ported to the new protocol, and started as a stand alone project in order to support the need of a C client in the Redis community 2010-05-18 17:11:09 +02:00