[sane-devel] lib functions and empty files

Henning Meier-Geinitz henning@meier-geinitz.de
Fri, 8 Feb 2002 22:44:11 +0100


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