root/maint/gnulib/lib/dummy.c

/* [previous][next][first][last][top][bottom][index][help] */
   1 /* A dummy file, to prevent empty libraries from breaking builds.
   2    Copyright (C) 2004, 2007, 2009-2021 Free Software Foundation, Inc.
   3 
   4    This file is in the public domain.  */
   5 
   6 /* Some systems, reportedly OpenBSD and Mac OS X, refuse to create
   7    libraries without any object files.  You might get an error like:
   8 
   9    > ar cru .libs/libgl.a
  10    > ar: no archive members specified
  11 
  12    Compiling this file, and adding its object file to the library, will
  13    prevent the library from being empty.  */
  14 
  15 /* Some systems, such as Solaris with cc 5.0, refuse to work with libraries
  16    that don't export any symbol.  You might get an error like:
  17 
  18    > cc ... libgnu.a
  19    > ild: (bad file) garbled symbol table in archive ../gllib/libgnu.a
  20 
  21    Compiling this file, and adding its object file to the library, will
  22    prevent the library from exporting no symbols.  */
  23 
  24 #ifdef __sun
  25 /* This declaration ensures that the library will export at least 1 symbol.  */
  26 int gl_dummy_symbol;
  27 #else
  28 /* This declaration is solely to ensure that after preprocessing
  29    this file is never empty.  */
  30 typedef int dummy;
  31 #endif

/* [previous][next][first][last][top][bottom][index][help] */