summaryrefslogtreecommitdiff
path: root/include/misc.h
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/misc.h
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/misc.h')
-rw-r--r--include/misc.h17
1 files changed, 17 insertions, 0 deletions
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