1. 20 Jun, 2016 3 commits
    • not-a-robot's avatar
      Auto merge of #428 - avatli:patch-1, r=badboy · 847f3fe5
      not-a-robot authored
      Update sds.h
      
      Fixing sds.h for building hiredis in cpp project
      847f3fe5
    • not-a-robot's avatar
      Auto merge of #439 - tnm:fmacros-fix, r=badboy · ef372ed2
      not-a-robot authored
      Do not define _XOPEN_SOURCE for OS X
      
      redis@bb1747b appears to have introduced a build regression for OS X (and possibly elsewhere, I've only tested on a local Mac environment) — in master right now `make` reliably fails on OS X as reported in redis#431.
      
      There looks to be another PR to fix the issue in redis#433.
      
      This PR here simply returns to the previous behavior on OS X in a minimally-invasive way. There are of course a few different ways to do this with the directives; feel free to do something different, I just care that master can build on OS X 🙇
      ef372ed2
    • Ted Nyman's avatar
      Do not define _XOPEN_SOURCE for OS X · bc0ea5c4
      Ted Nyman authored
      Resolves failed `make` on OS X.
      bc0ea5c4
  2. 14 May, 2016 3 commits
  3. 13 May, 2016 1 commit
  4. 12 May, 2016 1 commit
    • not-a-robot's avatar
      Auto merge of #378 - thomaslee:tom_fix_kfreebsd, r=badboy · e93c05a7
      not-a-robot authored
      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.
      e93c05a7
  5. 20 Apr, 2016 27 commits
  6. 17 Apr, 2016 2 commits
  7. 11 Apr, 2016 1 commit
    • DongwenHuang's avatar
      Update read.c · 6bfc580a
      DongwenHuang authored
      static char *seekNewline(char *s, size_t len)  : 
      this function can not parse the string,such as "hello world\r". the case that  the last char is '\r'.
      6bfc580a
  8. 26 Mar, 2016 1 commit
  9. 18 Nov, 2015 1 commit
    • Jan-Erik Rediger's avatar
      Prevent buffer overflow when formatting the error · 0335cb3e
      Jan-Erik Rediger authored
      strncat might copy n+1 bytes (n bytes from the source plus a terminating nul byte).
      Also strncat appends after the first found nul byte. But all we pass is
      a buffer we might not have zeroed out already.
      
      Closes #380
      0335cb3e