mirror of
https://github.com/json-c/json-c.git
synced 2026-03-30 02:19:06 +08:00
Add an autoconf test to test whether the .section .gnu<warning>
works with the linker on the system, and define _warn_references to nothing if not.
This commit is contained in:
@@ -7,11 +7,10 @@
|
||||
|
||||
#ifndef __warn_references
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define __warn_references(sym,msg) \
|
||||
__asm(".pushsection .gnu.warning." #sym "\n" \
|
||||
".ascii \"" msg "\"\n" \
|
||||
".popsection");
|
||||
#if defined(__GNUC__) && defined (HAS_GNU_WARNING_LONG)
|
||||
|
||||
#define __warn_references(sym,msg) \
|
||||
__asm__(".section .gnu" #sym ",\n\t.ascii \"" msg "\"\n\t.text");
|
||||
|
||||
#else
|
||||
#define __warn_references(sym,msg) /* nothing */
|
||||
|
||||
Reference in New Issue
Block a user