dummy.c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* A dummy file, to prevent empty libraries from breaking builds.
  2. Copyright (C) 2004, 2007, 2009-2011 Free Software Foundation, Inc.
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  13. /* Some systems, reportedly OpenBSD and Mac OS X, refuse to create
  14. libraries without any object files. You might get an error like:
  15. > ar cru .libs/libgl.a
  16. > ar: no archive members specified
  17. Compiling this file, and adding its object file to the library, will
  18. prevent the library from being empty. */
  19. /* Some systems, such as Solaris with cc 5.0, refuse to work with libraries
  20. that don't export any symbol. You might get an error like:
  21. > cc ... libgnu.a
  22. > ild: (bad file) garbled symbol table in archive ../gllib/libgnu.a
  23. Compiling this file, and adding its object file to the library, will
  24. prevent the library from exporting no symbols. */
  25. #ifdef __sun
  26. /* This declaration ensures that the library will export at least 1 symbol. */
  27. int gl_dummy_symbol;
  28. #else
  29. /* This declaration is solely to ensure that after preprocessing
  30. this file is never empty. */
  31. typedef int dummy;
  32. #endif