Browse Source

Merge pull request #340 from commodo/fix-appveyor-build

strerror_override: add extern "C" and JSON_EXPORT specifiers for Visual C++ compilers
tags/json-c-0.13-20171207
Eric Haszlakiewicz GitHub 8 years ago
parent
commit
8d8a785bd2
2 changed files with 12 additions and 2 deletions
  1. +1
    -1
      .travis.yml
  2. +11
    -1
      strerror_override.h

+ 1
- 1
.travis.yml View File

@@ -22,7 +22,7 @@ install:
- sh autogen.sh - sh autogen.sh
before_script: before_script:
- ./configure --enable-strerror-override
- ./configure
script: script:
- make - make


+ 11
- 1
strerror_override.h View File

@@ -4,10 +4,20 @@
#include "config.h" #include "config.h"
#include <errno.h> #include <errno.h>


char *_json_c_strerror(int errno_in);
#include "json_object.h" /* for JSON_EXPORT */

#ifdef __cplusplus
extern "C" {
#endif

JSON_EXPORT char *_json_c_strerror(int errno_in);


#ifndef STRERROR_OVERRIDE_IMPL #ifndef STRERROR_OVERRIDE_IMPL
#define strerror _json_c_strerror #define strerror _json_c_strerror
#endif #endif


#ifdef __cplusplus
}
#endif

#endif /* _json_strerror_override_h_ */ #endif /* _json_strerror_override_h_ */

Loading…
Cancel
Save