summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2014-01-10 10:07:39 -0500
committerAndreas Gruenbacher <agruen@linbit.com>2014-01-13 13:18:39 +0100
commit602dbcb26e9591922ca94f5b326694a2309fff18 (patch)
treee17c77bb1fcff3b43bdfd16d706931fec8993540 /include
parentc93b43c22331c3000ce15452943daa9bec77436c (diff)
downloadacl-602dbcb26e9591922ca94f5b326694a2309fff18.tar.gz
move gettext logic into misc.h
This lets us autogenerate config.h using autoheader rather than hand maintain it.
Diffstat (limited to 'include')
-rw-r--r--include/config.h.in10
-rw-r--r--include/misc.h17
2 files changed, 17 insertions, 10 deletions
diff --git a/include/config.h.in b/include/config.h.in
index 6787b6e..6a720ac 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -39,16 +39,6 @@
/* Define if you want gettext (I18N) support */
#undef ENABLE_GETTEXT
-#ifdef ENABLE_GETTEXT
-# include <libintl.h>
-# define _(x) gettext(x)
-#else
-# define _(x) (x)
-# define textdomain(d) do { } while (0)
-# define bindtextdomain(d,dir) do { } while (0)
-#endif
-#include <locale.h>
-
/* On GNU/kFreeBSD, ENODATA is not defined in the system headers */
#include <errno.h>
#ifndef ENODATA
diff --git a/include/misc.h b/include/misc.h
index 0c5fdcc..a4fa70e 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -15,9 +15,26 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef __MISC_H
+#define __MISC_H
+
+#include <stdio.h>
+
extern int high_water_alloc(void **buf, size_t *bufsize, size_t newsize);
extern const char *quote(const char *str, const char *quote_chars);
extern char *unquote(char *str);
extern char *next_line(FILE *file);
+
+#ifdef ENABLE_NLS
+# include <libintl.h>
+# define _(x) gettext(x)
+#else
+# define _(x) (x)
+# define textdomain(d) do { } while (0)
+# define bindtextdomain(d,dir) do { } while (0)
+#endif
+#include <locale.h>
+
+#endif