summaryrefslogtreecommitdiff
path: root/parted/strlist.h
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-05-31 09:04:01 +0200
committerJim Meyering <jim@meyering.net>2007-05-31 10:41:52 +0200
commita7ed765f988d6b724a76a04e34f768cf52f4ea98 (patch)
treeb992bebe8fc853f6b22b50223f46037fc2cb6727 /parted/strlist.h
parentb4c53f6d1474639e464d43d478bc4d41ac54dd52 (diff)
downloadparted-a7ed765f988d6b724a76a04e34f768cf52f4ea98.tar.gz
Fix build failure (conflicting decl of strnlen) and clean up
* parted/strlist.h: Include <config.h> first. [!ENABLE_NLS]: Define wchar_t to char here, too, since we no longer include "strlist.h" after the definition in table.c. * parted/table.c: Include <wchar.h> and <string.h> unconditionally, and before wchar_t redefinition. Hoist inclusions of xalloc.h and strlist.h, too. Remove wcwidth and strnlen declarations, since they're guaranteed to be in the gnulib-supplied-if-needed headers.
Diffstat (limited to 'parted/strlist.h')
-rw-r--r--parted/strlist.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/parted/strlist.h b/parted/strlist.h
index e458ba1..39efb4b 100644
--- a/parted/strlist.h
+++ b/parted/strlist.h
@@ -1,6 +1,6 @@
/*
parted - a frontend to libparted
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,8 +20,18 @@
#ifndef STRLIST_H_INCLUDED
#define STRLIST_H_INCLUDED
+#include <config.h>
+
#include <wchar.h>
+#ifndef ENABLE_NLS
+# define L_(str) str
+# ifdef wchar_t
+# undef wchar_t
+# endif
+# define wchar_t char
+#endif
+
typedef struct _StrList StrList;
struct _StrList {
StrList* next;