Create an additional libjson.so library that simply links against libjson-c, but emits a warning encouraging the use of the new library.

This commit is contained in:
Eric Haszlakiewicz committed 2012-07-29 14:59:01 -05:00
1 parent eb37094aa6
commit b98aa6eaa3
2 files changed
+32 -1

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
/* dummy source file for compatibility purposes */
#if defined(HAVE_CDEFS_H)
#include <sys/cdefs.h>
#endif
#ifndef __warn_references
#ifdef __GNUC__
#define __warn_references(sym,msg) \
__asm(".pushsection .gnu.warning." #sym "\n" \
".ascii \"" msg "\"\n" \
".popsection");
#else
#define __warn_references(sym,msg) /* nothing */
#endif
#endif
#include "json_object.h"
__warn_references(json_object_get, "Warning: please link against libjson-c instead of libjson");
/* __asm__(".section .gnu.warning." __STRING(sym) \
" ; .ascii \"" msg "\" ; .text") */