Index: antiword.h --- antiword.h.orig 2005-07-06 19:46:22 +0200 +++ antiword.h 2005-11-03 08:08:20 +0100 @@ -197,7 +197,7 @@ #define FONTNAMES_FILE "fontname.txt" #elif defined(__amigaos) #define GLOBAL_ANTIWORD_DIR "SYS:.antiword" -#define ANTIWORD_DIR ".antiword" +#define ANTIWORD_DIR "antiword" #define FONTNAMES_FILE "fontnames" #elif defined(N_PLAT_NLM) #define GLOBAL_ANTIWORD_DIR "SYS:/antiword" @@ -225,7 +225,7 @@ #define FONTNAMES_FILE "fontnames" #else /* All others */ #define GLOBAL_ANTIWORD_DIR "/usr/share/antiword" -#define ANTIWORD_DIR ".antiword" +#define ANTIWORD_DIR "antiword" #define FONTNAMES_FILE "fontnames" #endif /* __dos */ /* The names of grouped mapping files */ Index: chartrans.c --- chartrans.c.orig 2005-01-11 20:44:46 +0100 +++ chartrans.c 2005-11-03 08:08:20 +0100 @@ -6,10 +6,15 @@ * Translate Word characters to local representation */ +#if defined(__FreeBSD__) +#include +#endif + #include #include #include -#if defined(__STDC_ISO_10646__) +#if defined(__STDC_ISO_10646__) || defined(__FreeBSD__) || defined(__NetBSD__) +#include #include #endif /* __STDC_ISO_10646__ */ #include "antiword.h" @@ -707,7 +712,8 @@ */ return ulChar & ~0x20; } -#if defined(__STDC_ISO_10646__) +#if defined(__STDC_ISO_10646__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000) || defined(__NetBSD__) +#include /* * If this is ISO C99 and all locales have wchar_t = ISO 10646 * (e.g., glibc 2.2 or newer), then use standard function Index: fonts_u.c --- fonts_u.c.orig 2005-06-14 19:23:29 +0200 +++ fonts_u.c 2005-11-03 08:08:20 +0100 @@ -56,7 +56,6 @@ } /* Try the local version of the fontnames file */ - szHome = szGetHomeDirectory(); if (strlen(szHome) + sizeof(FILE_SEPARATOR ANTIWORD_DIR FILE_SEPARATOR FONTNAMES_FILE) >= sizeof(szLocalFile)) { Index: main_u.c --- main_u.c.orig 2005-01-15 21:08:51 +0100 +++ main_u.c 2005-11-03 08:09:11 +0100 @@ -36,7 +36,10 @@ # include # endif #else +#if defined(__STDC_ISO_10646__) || defined(__FreeBSD__) || defined(__NetBSD__) +#include #include +#endif #endif /* __CYGWIN__ || __CYGMING__ */ #if defined(N_PLAT_NLM) #if !defined(_VA_LIST) @@ -252,7 +255,8 @@ #if !defined(__dos) if (is_locale_utf8()) { -#if defined(__STDC_ISO_10646__) +#if defined(__STDC_ISO_10646__) || defined(__FreeBSD__) || defined(__NetBSD__) +#include /* * If the user wants UTF-8 and the envirionment variables * support UTF-8, than set the locale accordingly @@ -268,11 +272,13 @@ } #endif /* __STDC_ISO_10646__ */ } else { +#ifdef LC_CTYPE if (setlocale(LC_CTYPE, "") == NULL) { werr(0, "Can't set the locale! Will use defaults"); (void)setlocale(LC_CTYPE, "C"); } DBG_MSG("The locale has been set"); +#endif } #endif /* !__dos */ Index: options.c --- options.c.orig 2005-05-27 20:21:18 +0200 +++ options.c 2005-11-03 08:08:20 +0100 @@ -218,7 +218,6 @@ } /* Try the local version of the mapping file */ - szHome = szGetHomeDirectory(); if (strlen(szHome) + tFilenameLen < sizeof(szMappingFile) - sizeof(ANTIWORD_DIR) -