~ubuntu-branches/ubuntu/vivid/liblouisxml/vivid

« back to all changes in this revision

Viewing changes to build-aux/link-warning.h

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Thibault
  • Date: 2010-01-13 00:47:59 UTC
  • mfrom: (1.2.2 upstream) (4.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100113004759-42niknnhsk6kz4qq
* New upstream release.
* debian/control: Drop duplicate Section: libs field.
* debian/copyright: Fix copyright sign.
* debian/lbx_devonly.1, rtf2brl.1: New manpages.
* debian/liblouisxml-bin.manpages: Update manpages paths.
* debian/rules:
  - Drop rpath from all libs and programs.
  - Automatically copy config.{sub,guess} autotools-dev.
* debian/watch: Fix expression.
* debian/liblouisxml-dev.doc-base: Add.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* GL_LINK_WARNING("literal string") arranges to emit the literal string as
 
2
   a linker warning on most glibc systems.
 
3
   We use a linker warning rather than a preprocessor warning, because
 
4
   #warning cannot be used inside macros.  */
 
5
#ifndef GL_LINK_WARNING
 
6
  /* This works on platforms with GNU ld and ELF object format.
 
7
     Testing __GLIBC__ is sufficient for asserting that GNU ld is in use.
 
8
     Testing __ELF__ guarantees the ELF object format.
 
9
     Testing __GNUC__ is necessary for the compound expression syntax.  */
 
10
# if defined __GLIBC__ && defined __ELF__ && defined __GNUC__
 
11
#  define GL_LINK_WARNING(message) \
 
12
     GL_LINK_WARNING1 (__FILE__, __LINE__, message)
 
13
#  define GL_LINK_WARNING1(file, line, message) \
 
14
     GL_LINK_WARNING2 (file, line, message)  /* macroexpand file and line */
 
15
#  define GL_LINK_WARNING2(file, line, message) \
 
16
     GL_LINK_WARNING3 (file ":" #line ": warning: " message)
 
17
#  define GL_LINK_WARNING3(message) \
 
18
     ({ static const char warning[sizeof (message)]             \
 
19
          __attribute__ ((__unused__,                           \
 
20
                          __section__ (".gnu.warning"),         \
 
21
                          __aligned__ (1)))                     \
 
22
          = message "\n";                                       \
 
23
        (void)0;                                                \
 
24
     })
 
25
# else
 
26
#  define GL_LINK_WARNING(message) ((void) 0)
 
27
# endif
 
28
#endif