Skip to content

Commit

Permalink
Merge pull request json-c#340 from commodo/fix-appveyor-build
Browse files Browse the repository at this point in the history
strerror_override: add extern "C" and JSON_EXPORT specifiers for Visual C++ compilers
  • Loading branch information
hawicz authored Jul 28, 2017
2 parents fcad0ec + d8fbfc7 commit 8d8a785
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ install:
- sh autogen.sh

before_script:
- ./configure --enable-strerror-override
- ./configure

script:
- make
Expand Down
12 changes: 11 additions & 1 deletion strerror_override.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@
#include "config.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
#define strerror _json_c_strerror
#endif

#ifdef __cplusplus
}
#endif

#endif /* _json_strerror_override_h_ */

0 comments on commit 8d8a785

Please sign in to comment.