From: Todd C. Miller Date: Mon, 12 Nov 2012 01:23:53 +0000 (-0500) Subject: Always include locale.h from gettext.h so we no longer need to X-Git-Tag: SUDO_1_8_7~1^2~341 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c1db4b154661bf79415fff4a8b0a3116e3a7154e;p=sudo Always include locale.h from gettext.h so we no longer need to include locale.h from the .c files. --- diff --git a/include/gettext.h b/include/gettext.h index b3ea285ca..db1f35910 100644 --- a/include/gettext.h +++ b/include/gettext.h @@ -21,7 +21,7 @@ * Solaris locale.h includes libintl.h which causes problems when we * redefine the gettext functions. We include it first to avoid this. */ -#if defined(HAVE_SETLOCALE) && defined(__sun__) && defined(__svr4__) +#if defined(HAVE_SETLOCALE) # include #endif diff --git a/plugins/sudoers/iolog_path.c b/plugins/sudoers/iolog_path.c index 1f615f3d7..db78d12ef 100644 --- a/plugins/sudoers/iolog_path.c +++ b/plugins/sudoers/iolog_path.c @@ -35,9 +35,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#ifdef HAVE_SETLOCALE -# include -#endif #include #include #include diff --git a/plugins/sudoers/locale.c b/plugins/sudoers/locale.c index e82bb3ece..964afd4ee 100644 --- a/plugins/sudoers/locale.c +++ b/plugins/sudoers/locale.c @@ -32,9 +32,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#ifdef HAVE_SETLOCALE -# include -#endif #include "sudoers.h" diff --git a/plugins/sudoers/regress/iolog_path/check_iolog_path.c b/plugins/sudoers/regress/iolog_path/check_iolog_path.c index 3a8c2940d..fb743ef96 100644 --- a/plugins/sudoers/regress/iolog_path/check_iolog_path.c +++ b/plugins/sudoers/regress/iolog_path/check_iolog_path.c @@ -35,9 +35,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#ifdef HAVE_SETLOCALE -# include -#endif #include #include #include diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c index ae85138e7..4f011f8bd 100644 --- a/plugins/sudoers/sudoers.c +++ b/plugins/sudoers/sudoers.c @@ -57,9 +57,6 @@ #include #include #include -#ifdef HAVE_SETLOCALE -# include -#endif #include #ifdef HAVE_LOGIN_CAP_H # include diff --git a/plugins/sudoers/sudoreplay.c b/plugins/sudoers/sudoreplay.c index ae0c9d63e..0f49c7e1a 100644 --- a/plugins/sudoers/sudoreplay.c +++ b/plugins/sudoers/sudoreplay.c @@ -82,9 +82,6 @@ #ifdef HAVE_ZLIB_H # include #endif -#ifdef HAVE_SETLOCALE -# include -#endif #include #ifdef HAVE_STDBOOL_H # include diff --git a/plugins/sudoers/testsudoers.c b/plugins/sudoers/testsudoers.c index 5594313fd..109eaa3d0 100644 --- a/plugins/sudoers/testsudoers.c +++ b/plugins/sudoers/testsudoers.c @@ -60,9 +60,6 @@ #include #include #include -#ifdef HAVE_SETLOCALE -# include -#endif #include "tsgetgrpw.h" #include "sudoers.h" diff --git a/plugins/sudoers/visudo.c b/plugins/sudoers/visudo.c index ca75af563..6df0d3fa9 100644 --- a/plugins/sudoers/visudo.c +++ b/plugins/sudoers/visudo.c @@ -71,9 +71,6 @@ #if TIME_WITH_SYS_TIME # include #endif -#ifdef HAVE_SETLOCALE -# include -#endif #include "sudoers.h" #include "parse.h" diff --git a/src/error.c b/src/error.c index 4db2f9d5c..6502df98d 100644 --- a/src/error.c +++ b/src/error.c @@ -22,9 +22,6 @@ #include #include #include -#ifdef HAVE_SETLOCALE -# include -#endif #include "missing.h" #include "alloc.h" diff --git a/src/exec.c b/src/exec.c index 34a4da6cd..808ed30bf 100644 --- a/src/exec.c +++ b/src/exec.c @@ -50,9 +50,6 @@ #if TIME_WITH_SYS_TIME # include #endif -#ifdef HAVE_SETLOCALE -# include -#endif #include #include #include diff --git a/src/sesh.c b/src/sesh.c index 12dacaee0..c6e41da90 100644 --- a/src/sesh.c +++ b/src/sesh.c @@ -25,9 +25,6 @@ #include #include #include -#ifdef HAVE_SETLOCALE -# include -#endif #ifdef HAVE_STDBOOL_H # include #else diff --git a/src/sudo.c b/src/sudo.c index 61ae4800e..ec82a141f 100644 --- a/src/sudo.c +++ b/src/sudo.c @@ -58,9 +58,6 @@ #if TIME_WITH_SYS_TIME # include #endif -#ifdef HAVE_SETLOCALE -# include -#endif #ifdef HAVE_LOGIN_CAP_H # include # ifndef LOGIN_SETENV diff --git a/src/sudo.h b/src/sudo.h index 9436fa662..2034712df 100644 --- a/src/sudo.h +++ b/src/sudo.h @@ -17,8 +17,6 @@ * Sponsored in part by the Defense Advanced Research Projects * Agency (DARPA) and Air Force Research Laboratory, Air Force * Materiel Command, USAF, under agreement number F39502-99-1-0512. - * - * $Sudo: sudo.h,v 1.290 2009/12/12 16:12:26 millert Exp $ */ #ifndef _SUDO_SUDO_H