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