From: Bruno Haible Date: Mon, 23 Jun 2003 20:40:02 +0000 (+0000) Subject: Avoid warnings for empty compilation units. X-Git-Tag: v0.13~405 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbc687bb1144cb181722662ef41b57994f29f275;p=thirdparty%2Fgettext.git Avoid warnings for empty compilation units. --- diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index 38982c498..730b57953 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -1,3 +1,11 @@ +2003-06-23 Bruno Haible + + Avoid compilation units that are empty after preprocessing. + * canonicalize.c: Add dummy declaration. + * strerror.c: Likewise. + * strtoul.c: Likewise. + * error.c: Include even if there's nothing to be compiled. + 2003-06-22 Bruno Haible Portability to mingw32. diff --git a/gettext-tools/lib/canonicalize.c b/gettext-tools/lib/canonicalize.c index fbdca1211..5b7713eb0 100644 --- a/gettext-tools/lib/canonicalize.c +++ b/gettext-tools/lib/canonicalize.c @@ -307,4 +307,10 @@ __canonicalize_file_name (const char *name) } weak_alias (__canonicalize_file_name, canonicalize_file_name) +#else + +/* This declaration is solely to ensure that after preprocessing + this file is never empty. */ +typedef int dummy; + #endif diff --git a/gettext-tools/lib/error.c b/gettext-tools/lib/error.c index 2d38d447a..d6b6bdd0e 100644 --- a/gettext-tools/lib/error.c +++ b/gettext-tools/lib/error.c @@ -20,10 +20,10 @@ # include #endif -#if !HAVE_ERROR_AT_LINE - #include +#if !HAVE_ERROR_AT_LINE + #ifdef _LIBC # include #else diff --git a/gettext-tools/lib/strerror.c b/gettext-tools/lib/strerror.c index 8dfae38dc..931460fbb 100644 --- a/gettext-tools/lib/strerror.c +++ b/gettext-tools/lib/strerror.c @@ -43,4 +43,10 @@ strerror (int n) return sys_errlist[n]; } +#else + +/* This declaration is solely to ensure that after preprocessing + this file is never empty. */ +typedef int dummy; + #endif diff --git a/gettext-tools/lib/strtoul.c b/gettext-tools/lib/strtoul.c index d39643d58..97359104d 100644 --- a/gettext-tools/lib/strtoul.c +++ b/gettext-tools/lib/strtoul.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997, 2002-2003 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. @@ -28,4 +28,10 @@ # include +#else + +/* This declaration is solely to ensure that after preprocessing + this file is never empty. */ +typedef int dummy; + #endif