From: Todd C. Miller <Todd.Miller@courtesan.com>
Date: Mon, 16 May 2011 20:37:11 +0000 (-0400)
Subject: Include libint.h where needed.
X-Git-Tag: SUDO_1_8_2~154^2
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=15bc74bd674f41de1d2d3c1a1c8dac271b79820a;p=sudo

Include libint.h where needed.
---

diff --git a/common/aix.c b/common/aix.c
index 0d4ad71bc..0ca732f59 100644
--- a/common/aix.c
+++ b/common/aix.c
@@ -28,6 +28,9 @@
 #  include <stdlib.h>
 # endif
 #endif /* STDC_HEADERS */
+#ifdef HAVE_LIBINTL_H
+# include <libintl.h>
+#endif
 #include <usersec.h>
 #include <uinfo.h>
 
diff --git a/common/alloc.c b/common/alloc.c
index f09ba0eb3..b5cbd6caa 100644
--- a/common/alloc.c
+++ b/common/alloc.c
@@ -47,6 +47,9 @@
 #ifdef HAVE_INTTYPES_H
 # include <inttypes.h>
 #endif
+#ifdef HAVE_LIBINTL_H
+# include <libintl.h>
+#endif
 
 #include "missing.h"
 #include "alloc.h"
diff --git a/compat/strsignal.c b/compat/strsignal.c
index 79d681710..bfe05746e 100644
--- a/compat/strsignal.c
+++ b/compat/strsignal.c
@@ -20,6 +20,9 @@
 
 #include <stdio.h>
 #include <signal.h>
+#ifdef HAVE_LIBINTL_H
+# include <libintl.h>
+#endif
 
 #include "missing.h"
 
diff --git a/plugins/sudoers/auth/pam.c b/plugins/sudoers/auth/pam.c
index e50edb3cb..9f8fa7a7f 100644
--- a/plugins/sudoers/auth/pam.c
+++ b/plugins/sudoers/auth/pam.c
@@ -50,7 +50,6 @@
 #endif
 
 #ifdef HAVE_LIBINTL_H
-# include <libintl.h>
 # if defined(__LINUX_PAM__)
 #  define PAM_TEXT_DOMAIN	"Linux-PAM"
 # elif defined(__sun__)
diff --git a/plugins/sudoers/sudoers.h b/plugins/sudoers/sudoers.h
index 7e5d56bba..bb8a8484c 100644
--- a/plugins/sudoers/sudoers.h
+++ b/plugins/sudoers/sudoers.h
@@ -39,6 +39,10 @@
 # include <membership.h>
 #endif
 
+#ifdef HAVE_LIBINTL_H
+# include <libintl.h>
+#endif
+
 /*
  * Info pertaining to the invoking user.
  */
diff --git a/src/sudo.h b/src/sudo.h
index 46a68f153..1f5cc6705 100644
--- a/src/sudo.h
+++ b/src/sudo.h
@@ -24,9 +24,12 @@
 #ifndef _SUDO_SUDO_H
 #define _SUDO_SUDO_H
 
+#ifdef HAVE_LIBINTL_H
+# include <libintl.h>
+#endif
 #include <limits.h>
-
 #include <pathnames.h>
+
 #include "missing.h"
 #include "alloc.h"
 #include "error.h"