summaryrefslogtreecommitdiff
path: root/libjson.c
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2012-07-29 14:59:01 -0500
committerEric Haszlakiewicz <erh+git@nimenees.com>2012-07-29 14:59:01 -0500
commitb98aa6eaa3a0ac6ee8c4c7239bddc972abebe8ab (patch)
tree27c9c432405e7a5f8c55ff7470d3f901e2335379 /libjson.c
parenteb37094aa604634fa8e838a2aca78e5c3d1d6d55 (diff)
Create an additional libjson.so library that simply links against libjson-c, but emits a warning encouraging the use of the new library.
Diffstat (limited to 'libjson.c')
-rw-r--r--libjson.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/libjson.c b/libjson.c
new file mode 100644
index 0000000..48fc3a4
--- /dev/null
+++ b/libjson.c
@@ -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") */