[sane-devel] lib functions and empty files

Henning Meier-Geinitz henning at meier-geinitz.de
Fri Feb 8 21:44:11 GMT 2002


Hi,

The files in the lib/ directory usually look like the following:

#ifndef HAVE_SOME_FUNCTION
int
some_function (int i)
{
  some_code;
}
#endif

If the function is already available by the system, the source file is
empty. At least gcc complains about this in "-ansi" mode and even
aborts compilation on at least one platform (OS/2 with gcc3.x).

Should we add a workaround or completely different solution for this
or is the behaviour of the compiler just wrong?

A simple workaround would be to add something like

#else
static int some_variable;
#endif

Bye,
  Henning



More information about the sane-devel mailing list