diff --git a/common/aix.c b/common/aix.c index f6c8bfd4e..c0f2a418b 100644 --- a/common/aix.c +++ b/common/aix.c @@ -31,15 +31,15 @@ #include #include +#define DEFAULT_TEXT_DOMAIN "sudo" +#include "gettext.h" /* must be included before missing.h */ + #include "missing.h" #include "alloc.h" #include "fatal.h" #include "sudo_debug.h" #include "sudo_util.h" -#define DEFAULT_TEXT_DOMAIN "sudo" -#include "gettext.h" - #ifdef HAVE_GETUSERATTR #ifndef HAVE_SETRLIMIT64 diff --git a/common/alloc.c b/common/alloc.c index 7d2afb5d1..411db3023 100644 --- a/common/alloc.c +++ b/common/alloc.c @@ -48,13 +48,13 @@ #endif #include +#define DEFAULT_TEXT_DOMAIN "sudo" +#include "gettext.h" /* must be included before missing.h */ + #include "missing.h" #include "alloc.h" #include "fatal.h" -#define DEFAULT_TEXT_DOMAIN "sudo" -#include "gettext.h" - /* * If there is no SIZE_MAX or SIZE_T_MAX we have to assume that size_t * could be signed (as it is on SunOS 4.x). This just means that diff --git a/common/atoid.c b/common/atoid.c index 056dc126f..5e622cc05 100644 --- a/common/atoid.c +++ b/common/atoid.c @@ -41,7 +41,7 @@ #include #define DEFAULT_TEXT_DOMAIN "sudo" -#include "gettext.h" +#include "gettext.h" /* must be included before missing.h */ #include "missing.h" #include "sudo_debug.h" diff --git a/common/atomode.c b/common/atomode.c index 64bad4af5..ae5a5f598 100644 --- a/common/atomode.c +++ b/common/atomode.c @@ -30,7 +30,7 @@ #include #define DEFAULT_TEXT_DOMAIN "sudo" -#include "gettext.h" +#include "gettext.h" /* must be included before missing.h */ #include "missing.h" #include "sudo_debug.h" diff --git a/common/fatal.c b/common/fatal.c index d42914748..aae23dab9 100644 --- a/common/fatal.c +++ b/common/fatal.c @@ -28,15 +28,15 @@ # include "compat/stdbool.h" #endif /* HAVE_STDBOOL_H */ +#define DEFAULT_TEXT_DOMAIN "sudo" +#include "gettext.h" /* must be included before missing.h */ + #include "missing.h" #include "alloc.h" #include "fatal.h" #include "queue.h" #include "sudo_plugin.h" -#define DEFAULT_TEXT_DOMAIN "sudo" -#include "gettext.h" - struct sudo_fatal_callback { SLIST_ENTRY(sudo_fatal_callback) entries; void (*func)(void); diff --git a/common/gidlist.c b/common/gidlist.c index 695626f0f..8b112eb5a 100644 --- a/common/gidlist.c +++ b/common/gidlist.c @@ -30,7 +30,7 @@ #include #define DEFAULT_TEXT_DOMAIN "sudo" -#include "gettext.h" +#include "gettext.h" /* must be included before missing.h */ #include "missing.h" #include "alloc.h" diff --git a/common/sudo_conf.c b/common/sudo_conf.c index d45ac1957..3d8d6bb57 100644 --- a/common/sudo_conf.c +++ b/common/sudo_conf.c @@ -45,6 +45,9 @@ #include #include +#define DEFAULT_TEXT_DOMAIN "sudo" +#include "gettext.h" /* must be included before missing.h */ + #define SUDO_ERROR_WRAP 0 #include "missing.h" @@ -58,9 +61,6 @@ #include "sudo_util.h" #include "secure_path.h" -#define DEFAULT_TEXT_DOMAIN "sudo" -#include "gettext.h" - #ifdef __TANDEM # define ROOT_UID 65535 #else diff --git a/common/sudo_debug.c b/common/sudo_debug.c index b2d98ca6d..7e09580ab 100644 --- a/common/sudo_debug.c +++ b/common/sudo_debug.c @@ -47,6 +47,9 @@ #include #include +#define DEFAULT_TEXT_DOMAIN "sudo" +#include "gettext.h" /* must be included before missing.h */ + #include "missing.h" #include "alloc.h" #include "fatal.h" @@ -54,9 +57,6 @@ #include "sudo_debug.h" #include "sudo_util.h" -#define DEFAULT_TEXT_DOMAIN "sudo" -#include "gettext.h" - /* * The debug priorities and subsystems are currently hard-coded. * In the future we might consider allowing plugins to register their diff --git a/compat/strsignal.c b/compat/strsignal.c index 2f42fdfa6..b82ba0c89 100644 --- a/compat/strsignal.c +++ b/compat/strsignal.c @@ -23,10 +23,10 @@ #include #include -#include "missing.h" - #define DEFAULT_TEXT_DOMAIN "sudo" -#include "gettext.h" +#include "gettext.h" /* must be included before missing.h */ + +#include "missing.h" #if defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST == 1 # define sudo_sys_siglist sys_siglist diff --git a/compat/strtonum.c b/compat/strtonum.c index 35d4d41f4..d665d6486 100644 --- a/compat/strtonum.c +++ b/compat/strtonum.c @@ -37,10 +37,10 @@ # include #endif /* HAVE_STRINGS_H */ -#include "missing.h" - #define DEFAULT_TEXT_DOMAIN "sudo" -#include "gettext.h" +#include "gettext.h" /* must be included before missing.h */ + +#include "missing.h" #ifdef HAVE_STRTONUM diff --git a/plugins/sudoers/audit.c b/plugins/sudoers/audit.c index 68a98d79c..b0dbcb321 100644 --- a/plugins/sudoers/audit.c +++ b/plugins/sudoers/audit.c @@ -33,6 +33,9 @@ #endif /* HAVE_STDBOOL_H */ #include +#define DEFAULT_TEXT_DOMAIN "sudoers" +#include "gettext.h" /* must be included before missing.h */ + #include "missing.h" #include "logging.h" #include "sudo_debug.h" @@ -44,9 +47,6 @@ # include "linux_audit.h" #endif -#define DEFAULT_TEXT_DOMAIN "sudoers" -#include "gettext.h" - void audit_success(char *exec_args[]) { diff --git a/plugins/sudoers/bsm_audit.c b/plugins/sudoers/bsm_audit.c index 816d07a66..1426986a9 100644 --- a/plugins/sudoers/bsm_audit.c +++ b/plugins/sudoers/bsm_audit.c @@ -30,9 +30,11 @@ #include #include +#define DEFAULT_TEXT_DOMAIN "sudoers" +#include "gettext.h" /* must be included before missing.h */ + #include "missing.h" #include "fatal.h" -#include "gettext.h" #include "sudo_debug.h" #include "bsm_audit.h" diff --git a/plugins/sudoers/linux_audit.c b/plugins/sudoers/linux_audit.c index 33dcc7fbe..37012c081 100644 --- a/plugins/sudoers/linux_audit.c +++ b/plugins/sudoers/linux_audit.c @@ -31,10 +31,12 @@ #include #include +#define DEFAULT_TEXT_DOMAIN "sudoers" +#include "gettext.h" /* must be included before missing.h */ + #include "missing.h" #include "fatal.h" #include "alloc.h" -#include "gettext.h" #include "sudo_debug.h" #include "linux_audit.h" diff --git a/plugins/sudoers/locale.c b/plugins/sudoers/locale.c index 822aaa4a7..08bd9a797 100644 --- a/plugins/sudoers/locale.c +++ b/plugins/sudoers/locale.c @@ -38,11 +38,13 @@ # include "compat/stdbool.h" #endif /* HAVE_STDBOOL_H */ +#define DEFAULT_TEXT_DOMAIN "sudoers" +#include "gettext.h" /* must be included before missing.h */ + #include "missing.h" #include "fatal.h" #include "alloc.h" #include "logging.h" -#include "gettext.h" static int current_locale = SUDOERS_LOCALE_USER; static char *user_locale; diff --git a/plugins/sudoers/sudoers.h b/plugins/sudoers/sudoers.h index 3479ea6c6..ebf4d8bb7 100644 --- a/plugins/sudoers/sudoers.h +++ b/plugins/sudoers/sudoers.h @@ -29,6 +29,9 @@ # include "compat/stdbool.h" #endif /* HAVE_STDBOOL_H */ +#define DEFAULT_TEXT_DOMAIN "sudoers" +#include "gettext.h" /* must be included before missing.h */ + #include #include "missing.h" #include "fatal.h" @@ -42,9 +45,6 @@ #include "sudo_debug.h" #include "sudo_util.h" -#define DEFAULT_TEXT_DOMAIN "sudoers" -#include "gettext.h" - /* * Password db and supplementary group IDs with associated group names. */ diff --git a/plugins/sudoers/sudoreplay.c b/plugins/sudoers/sudoreplay.c index aac879236..b3926d185 100644 --- a/plugins/sudoers/sudoreplay.c +++ b/plugins/sudoers/sudoreplay.c @@ -89,10 +89,11 @@ #include +#include "gettext.h" /* must be included before missing.h */ + #include "missing.h" #include "alloc.h" #include "fatal.h" -#include "gettext.h" #include "logging.h" #include "iolog.h" #include "queue.h" diff --git a/plugins/sudoers/visudo.c b/plugins/sudoers/visudo.c index e80064188..79d8df360 100644 --- a/plugins/sudoers/visudo.c +++ b/plugins/sudoers/visudo.c @@ -79,7 +79,6 @@ #include "sudoers.h" #include "parse.h" #include "redblack.h" -#include "gettext.h" #include "sudoers_version.h" #include "sudo_conf.h" #include diff --git a/plugins/sudoers/visudo_json.c b/plugins/sudoers/visudo_json.c index f9381df60..2cf9c5556 100644 --- a/plugins/sudoers/visudo_json.c +++ b/plugins/sudoers/visudo_json.c @@ -40,7 +40,6 @@ #include "sudoers.h" #include "parse.h" -#include "gettext.h" #include /* diff --git a/src/locale_stub.c b/src/locale_stub.c index 91bc71dd7..66c653cb3 100644 --- a/src/locale_stub.c +++ b/src/locale_stub.c @@ -21,9 +21,11 @@ #include #include +#define DEFAULT_TEXT_DOMAIN "sudo" +#include "gettext.h" /* must be included before missing.h */ + #include "missing.h" #include "fatal.h" -#include "gettext.h" #ifdef HAVE_LIBINTL_H /* No need to swap locales in the front end. */ diff --git a/src/net_ifs.c b/src/net_ifs.c index ced77a932..c37a774de 100644 --- a/src/net_ifs.c +++ b/src/net_ifs.c @@ -84,15 +84,15 @@ struct rtentry; # include #endif +#define DEFAULT_TEXT_DOMAIN "sudo" +#include "gettext.h" /* must be included before missing.h */ + #include "missing.h" #include "alloc.h" #include "fatal.h" #include "sudo_conf.h" #include "sudo_debug.h" -#define DEFAULT_TEXT_DOMAIN "sudo" -#include "gettext.h" - /* Minix apparently lacks IFF_LOOPBACK */ #ifndef IFF_LOOPBACK # define IFF_LOOPBACK 0 diff --git a/src/sesh.c b/src/sesh.c index 3aa9789f4..c00748887 100644 --- a/src/sesh.c +++ b/src/sesh.c @@ -31,10 +31,11 @@ # include "compat/stdbool.h" #endif /* HAVE_STDBOOL_H */ +#include "gettext.h" /* must be included before missing.h */ + #include "missing.h" #include "alloc.h" #include "fatal.h" -#include "gettext.h" #include "sudo_conf.h" #include "sudo_debug.h" #include "sudo_exec.h" diff --git a/src/sudo.h b/src/sudo.h index b123e2d59..5730f5ea8 100644 --- a/src/sudo.h +++ b/src/sudo.h @@ -30,6 +30,8 @@ # include "compat/stdbool.h" #endif /* HAVE_STDBOOL_H */ +#include "gettext.h" /* must be included before missing.h */ + #include "missing.h" #include "alloc.h" #include "fatal.h" @@ -37,7 +39,6 @@ #include "sudo_conf.h" #include "sudo_debug.h" #include "sudo_util.h" -#include "gettext.h" #ifdef HAVE_PRIV_SET # include