Remove outdated patches for Windows dependencies.

Binaries and source code of the latest versions can be found at ftp://ftp.devel.lyx.org/pub/contrib/windows/

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34917 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Joost Verburg 2010-07-16 14:26:29 +00:00
parent 5ca5dceac7
commit 8be5676ae2
10 changed files with 0 additions and 3093 deletions

View File

@ -135,15 +135,6 @@ Win32/packaging/build_msvs_debug.bat \
Win32/packaging/build_msvc.bat \
Win32/packaging/Microsoft.VC90.CRT.manifest \
Win32/pdfview/pdfview.nsi \
Win32/patches/mingw/aspell-0.60.4.patch \
Win32/patches/mingw/gettext-0.14.5.patch \
Win32/patches/msvc/libiconv-1.11.patch \
Win32/patches/msvc/gettext-0.15.patch \
Win32/patches/msvc/dirent.h \
Win32/patches/msvc/aspell-setter-sep06.patch \
Win32/patches/dtl.patch \
Win32/patches/dvipost-1.1.patch \
Win32/patches/aiksaurus-june06.patch \
scons/qt4.py \
scons/scons_manifest.py \
scons/SConstruct \

View File

@ -1,131 +0,0 @@
Index: base/Aiksaurus.cpp
===================================================================
RCS file: /cvsroot/aiksaurus/base/Aiksaurus.cpp,v
retrieving revision 1.5
diff -u -r1.5 Aiksaurus.cpp
--- base/Aiksaurus.cpp 3 Apr 2005 19:10:55 -0000 1.5
+++ base/Aiksaurus.cpp 12 Jul 2006 21:00:20 -0000
@@ -36,36 +36,69 @@
using namespace std;
#if defined WIN32
+
#ifdef AIK_DATA_DIR
#undef AIK_DATA_DIR
#endif
- #include <windows.h>
- #define WIN32_LEAN_AND_MEAN
- // Default aik_data_dir is local directory
- std::string AIK_DATA_DIR(".\\");
- // Regestry Reading for AIK_DATA_DIR
- void ReadRegistry()
- {
- HKEY hKey;
- unsigned long lType;
- DWORD dwSize;
- unsigned char* szValue = NULL;
- if( ::RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\Aiksaurus", 0, KEY_READ, &hKey) == ERROR_SUCCESS )
- {
- // Determine size of string
- if( ::RegQueryValueEx( hKey, "Data_Dir", NULL, &lType, NULL, &dwSize) == ERROR_SUCCESS )
- {
- szValue = new unsigned char[dwSize + 1];
- ::RegQueryValueEx( hKey, "Data_Dir", NULL, &lType, szValue, &dwSize);
- AIK_DATA_DIR = (char*) szValue;
- delete[] szValue;
- }
- }
- }
+
+#ifndef HAVE_GETENV
+#define HAVE_GETENV
+#endif
+
+#include <windows.h>
+#define WIN32_LEAN_AND_MEAN
+
+// Default aik_data_dir is local directory
+std::string AIK_DATA_DIR(".\\");
+
+ std::string ReadRegString(HKEY hive, std::string key, std::string name)
+ {
+
+ // Reads a string from the Windows registry (used to get paths)
+
+ HKEY hKey;
+ unsigned long lType;
+ DWORD dwSize;
+ unsigned char* szValue = NULL;
+
+ if (::RegOpenKeyEx(hive, key.c_str(), 0, KEY_READ, &hKey) == ERROR_SUCCESS)
+ {
+ if(::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, NULL, &dwSize) == ERROR_SUCCESS)
+ {
+ szValue = new unsigned char[dwSize + 1];
+ ::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, szValue, &dwSize);
+ std::string RegistryReturn((char*)szValue);
+ delete[] szValue;
+ return RegistryReturn;
+ } else {
+ return "";
+ }
+ } else {
+ return "";
+ }
+ }
+
+ HKEY GetRegHive()
+ {
+
+ // Check whether Aiksaurus is installed for the current user or for all users
+
+ std::string value;
+
+ if (ReadRegString(HKEY_LOCAL_MACHINE, "Software\\Aiksaurus", "Data Path") == "")
+ {
+ return HKEY_CURRENT_USER;
+ } else {
+ return HKEY_LOCAL_MACHINE;
+ }
+
+ }
+
#if defined _DLL_BUILD
//Add a DllMain Entry point
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; }
#endif
+
#endif
namespace AiksaurusImpl
@@ -256,14 +289,25 @@
try
{
#if defined WIN32
- ReadRegistry();
+ std::string base(AIK_DATA_DIR);
+ std::string value;
+ HKEY hive;
+
+ hive = GetRegHive();
+ value = (hive, "Software\\Aiksaurus", "Data Path");
+ if (value != "") base == value;
#endif
- std::string base(AIK_DATA_DIR);
+
#ifdef HAVE_GETENV
- char * aikdatadir_envvar = getenv ("AIK_DATA_DIR");
- if (aikdatadir_envvar) base = std::string(aikdatadir_envvar);
+ char * aikdatadir_envvar = getenv ("AIK_DATA_DIR");
+ if (aikdatadir_envvar) base = std::string(aikdatadir_envvar);
+#endif
+
+#if defined WIN32
+ if (base.substr(base.length() - 1, 1) != "\\") base.append("\\");
#endif
- std::string mfile(base + "meanings.dat");
+
+ std::string mfile(base + "meanings.dat");
std::string wfile(base + "words.dat");
d_impl_ptr = new ThesaurusImpl(mfile.c_str(), wfile.c_str());
}

View File

@ -1,220 +0,0 @@
diff -riwBu -Xex dtl\dt2dv.c dtl-modified\dt2dv.c
--- dtl\dt2dv.c Wed Mar 08 01:00:00 1995
+++ dtl-modified\dt2dv.c Mon Oct 02 13:28:35 2006
@@ -1,9 +1,11 @@
/* dt2dv - convert human-readable "DTL" file to DVI format
- this is intended to invert dv2dt version 0.6.0
- - version 0.6.1 - 14:38 GMT +11 Thu 9 March 1995
+ - version 0.6.2 - 27 July 2005
- Geoffrey Tobin G.Tobin@ee.latrobe.edu.au
- fixes: Michal Tomczak-Jaegermann ntomczak@vm.ucs.ualberta.ca
Nelson H. F. Beebe beebe@math.utah.edu
+ Angus Leeming leeming@lyx.org: Enable dt2dv to handle
+ .dvi files containing strings longer than 1024 chars.
- Reference: "The DVI Driver Standard, Level 0",
by The TUG DVI Driver Standards Committee.
Appendix A, "Device-Independent File Format".
@@ -34,7 +36,7 @@
size_t max; /* capacity of buf */
S4 wrote; /* number of characters written into buf */
size_t read; /* position in buf of next character to read from buf */
- char * buf; /* line buffer */
+ unsigned char * buf; /* line buffer */
} Line;
char linebuf[MAXLINE+1];
@@ -1089,7 +1091,7 @@
dinfo();
status = 0;
}
- else if ( ! isprint (c) && ! isspace (c))
+ else if ( ! isprint (c & 0x7f) && ! isspace (c))
{
PRINT_PROGNAME;
fprintf (stderr,
@@ -2223,7 +2225,7 @@
/* transfer (length and) quoted string from dtl to dvi file, */
/* return number of bytes written to dvi file. */
{
- U4 k, k2;
+ U4 k, k2, lstr_maxsize;
Lstring lstr;
if (debug)
@@ -2232,12 +2234,13 @@
fprintf (stderr, "(xfer_len_string) : entering xfer_len_string.\n");
}
- init_Lstring (&lstr, LSIZE);
-
/* k[n] : length of special string */
k = get_unsigned (dtl);
+ lstr_maxsize = (k > LSIZE) ? k : LSIZE;
+ init_Lstring (&lstr, lstr_maxsize);
+
if (debug)
{
PRINT_PROGNAME;
@@ -2567,7 +2570,7 @@
#ifdef HEX_CHECKSUM
/* c[4] : (hexadecimal) checksum : I (gt) would prefer this */
xfer_hex (4, dtl, dvi);
-#else /NOT HEX_CHECKSUM */
+#else /*NOT HEX_CHECKSUM */
/* c[4] : checksum (octal, for comparison with tftopl's .pl file) */
xfer_oct (4, dtl, dvi);
#endif
diff -riwBu -Xex dtl\Makefile dtl-modified\Makefile
--- dtl\Makefile Tue Sep 19 23:59:17 2006
+++ dtl-modified\Makefile Wed Jul 05 17:54:20 2006
@@ -3,6 +3,14 @@
# Thu 9 March 1995
# Geoffrey Tobin
# Nelson H. F. Beebe
+#
+# Changes 27 July 2005 by Angus Leeming to enable the Makefile to
+# work out of the box on both *nix and Windows machines under
+# the MinSYS environment.
+#
+# The Makefile can also be used unaltered to build a Windows executable
+# from a Linux box if make is invoked as:
+# $ make EXEEXT='.exe' CC='i386-mingw32-gcc'
#=======================================================================
BINDIR = /usr/local/bin
@@ -16,10 +24,22 @@
CP = /bin/cp
DITROFF = ditroff
DITROFF = groff
-EXES = dt2dv dv2dt
+
+# This is a GNU make extension.
+# If you're flavour of make refuses to accept it,
+# then simply hardcode EXEEXT.
+ifeq ($(WINDIR),)
+ EXEEXT =
+else
+ EXEEXT = .exe
+endif
+
+DT2DV = dt2dv$(EXEEXT)
+DV2DT = dv2dt$(EXEEXT)
+EXES = $(DT2DV) $(DV2DT)
LDFLAGS = -s
LDFLAGS =
-MAN2PS = ./man2ps
+MAN2PS = sh ./man2ps
MANDIR = /usr/local/man/man$(MANEXT)
MANEXT = 1
OBJS = dt2dv.o dv2dt.o
@@ -44,23 +64,24 @@
#=======================================================================
-all: dtl check doc
+#all: dtl check doc
+all: dtl check
doc: dt2dv.hlp dv2dt.hlp dt2dv.ps dv2dt.ps
-dtl: $(EXES)
+dtl: dv2dt dt2dv
check tests: hello example tripvdu edited
dv2dt: dv2dt.o dtl.h
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(DV2DT) dv2dt.o
dt2dv: dt2dv.o dtl.h
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(DT2DV) dt2dv.o
-hello: hello.dtl $(EXES)
- dt2dv hello.dtl hello2.dvi
- dv2dt hello2.dvi hello2.dtl
+hello: hello.dtl dv2dt dt2dv
+ ./$(DT2DV) hello.dtl hello2.dvi
+ ./$(DV2DT) hello2.dvi hello2.dtl
-@diff hello.dtl hello2.dtl > hello.dif
@if [ -s hello.dif ] ; \
then echo ERROR: differences in hello.dif ; \
@@ -69,11 +90,11 @@
hello.dtl: hello.tex
tex hello
- dv2dt hello.dvi hello.dtl
+ ./$(DV2DT) hello.dvi hello.dtl
-example: example.dtl $(EXES)
- dt2dv example.dtl example2.dvi
- dv2dt example2.dvi example2.dtl
+example: example.dtl dv2dt dt2dv
+ ./$(DT2DV) example.dtl example2.dvi
+ ./$(DV2DT) example2.dvi example2.dtl
-@diff example.dtl example2.dtl > example.dif
@if [ -s example.dif ] ; \
then echo ERROR: differences in example.dif ; \
@@ -82,11 +103,11 @@
example.dtl: example.tex
tex example
- dv2dt example.dvi example.dtl
+ ./$(DV2DT) example.dvi example.dtl
-tripvdu: tripvdu.dtl $(EXES)
- dt2dv tripvdu.dtl tripvdu2.dvi
- dv2dt tripvdu2.dvi tripvdu2.dtl
+tripvdu: tripvdu.dtl dv2dt dt2dv
+ ./$(DT2DV) tripvdu.dtl tripvdu2.dvi
+ ./$(DV2DT) tripvdu2.dvi tripvdu2.dtl
-@diff tripvdu.dtl tripvdu2.dtl > tripvdu.dif
@if [ -s tripvdu.dif ] ; \
then echo ERROR: differences in tripvdu.dif ; \
@@ -95,15 +116,15 @@
tripvdu.dtl: tripvdu.tex
tex tripvdu
- dv2dt tripvdu.dvi tripvdu.dtl
+ ./$(DV2DT) tripvdu.dvi tripvdu.dtl
# edited.txt is already a dtl file.
-edited: edited.txt $(EXES)
- dt2dv edited.txt edited.dvi
- dv2dt edited.dvi edited2.dtl
- dt2dv edited2.dtl edited2.dvi
- dv2dt edited2.dvi edited3.dtl
+edited: edited.txt dv2dt dt2dv
+ ./$(DT2DV) edited.txt edited.dvi
+ ./$(DV2DT) edited.dvi edited2.dtl
+ ./$(DT2DV) edited2.dtl edited2.dvi
+ ./$(DV2DT) edited2.dvi edited3.dtl
@if [ -s edited.dif ] ; \
then echo ERROR : differences in edited.dif ; \
else $(RM) edited.dif ; \
diff -riwBu -Xex dtl\man2ps dtl-modified\man2ps
--- dtl\man2ps Tue Sep 19 23:59:22 2006
+++ dtl-modified\man2ps Wed Sep 20 00:03:05 2006
@@ -20,16 +20,16 @@
esac
# We can use either GNU groff or Sun Solaris troff + dpost
-if [ -x /usr/local/bin/groff ]
+if [ which groff > /dev/null ]
then # GNU groff
TROFF="groff $FORMAT"
TROFF2PS="cat"
-elif [ -x /usr/lib/lp/postscript/dpost ]
++elif [ which dpost > /dev/null ]
then # Solaris 2.1
TROFF="troff $FORMAT"
TROFF2PS="/usr/lib/lp/postscript/dpost"
else
- echo "Cannot find troff-to-PostScript filter"
++ echo "Cannot find troff-to-PostScript filter" >&2
exit 1
fi

View File

@ -1,360 +0,0 @@
diff -riwbBu -Xex dvipost-1.1/dvi.c dvipost-1.1-modified/dvi.c
--- dvipost-1.1/dvi.c Wed Mar 22 14:59:58 2006
+++ dvipost-1.1-modified/dvi.c Wed May 31 11:27:44 2006
@@ -502,8 +502,12 @@
for (i = 0; i < pos_changed.dim; i++)
{
POS *p = pos_changed.tab + i;
+ if (!p->type)
+ dout_special(out, osstart);
cmd_goto(out, p->end, cbcol);
dout_putrule(out, p->end - p->beg, cbrule);
+ if (!p->type)
+ dout_special(out, osend);
}
dout_special(out, cbend);
@@ -625,10 +629,9 @@
mv_right(w);
text_cnt++;
- if (!cbmode[page_stat]) return;
-
+ if (!cbmode[page_stat] && !osmode[page_stat]) return;
pos_add(&pos_changed, dvi_stat.v - text_height - cbexp,
- dvi_stat.v + text_depth + cbexp);
+ dvi_stat.v + text_depth + cbexp, cbmode[page_stat]);
if (cbframe)
{
diff -riwbBu -Xex dvipost-1.1/dvipost.c dvipost-1.1-modified/dvipost.c
--- dvipost-1.1/dvipost.c Mon Nov 4 08:44:46 2002
+++ dvipost-1.1-modified/dvipost.c Mon Sep 18 13:11:58 2006
@@ -1,6 +1,7 @@
/* dvi file post processing
$Copyright (C) 2002 Erich Fruehstueck
+Modified version by LyX Team
Dvipost is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
@@ -18,13 +19,20 @@
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*/
-
#include "dvipost.h"
#include "dvi.h"
+#if !defined(_MSC_VER)
#include <unistd.h>
#include <dirent.h>
+#else
+#include "dirent.h"
+#endif
#include <sys/stat.h>
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
int dvipost (const char *iname, const char *oname)
{
FILE *input, *tmp, *output;
@@ -33,7 +41,19 @@
/* open temporary file
*/
+#ifndef _WIN32
tmp = tmpfile();
+#else
+ /* create temporary file in Windows temp directory */
+
+ char tmppath[MAX_PATH-14];
+ char tmpname[MAX_PATH];
+
+ GetTempPath(MAX_PATH-14, tmppath);
+ GetTempFileName(tmppath, "dvp", 0, tmpname);
+
+ tmp = fopen(tmpname, "r+b");
+#endif
if (!tmp)
{
@@ -57,8 +77,10 @@
}
else
{
+#ifndef _WIN32
iname = "<stdin>";
input = stdin;
+#endif
}
/* check magic and process input
@@ -94,6 +116,8 @@
/* copy file to output
*/
+
+#ifndef _WIN32
rewind(tmp);
if (oname && strcmp(oname, "-") != 0)
@@ -113,23 +137,20 @@
oname = "<stdout>";
output = stdout;
}
+#endif
message(NOTE, "$!: Copy data to %s\n", oname);
- while ((c = getc(tmp)) != EOF)
- putc(c, output);
-
+#ifndef _WIN32
+ while ((c = getc(tmp)) != EOF) putc(c, output);
fclose(tmp);
+#else
+ /* Copy file directly */
+ fclose(tmp);
+ CopyFile(tmpname, oname, FALSE);
+ DeleteFile(tmpname);
+#endif
- if (ferror(output))
- {
- fprintf(stderr, "%s: ", pname);
- perror(oname);
- stat = EXIT_FAILURE;
- }
- else stat = EXIT_SUCCESS;
-
- fclose(output);
return stat;
}
diff -riwbBu -Xex dvipost-1.1/dvipost.h dvipost-1.1-modified/dvipost.h
--- dvipost-1.1/dvipost.h Mon Nov 4 08:44:46 2002
+++ dvipost-1.1-modified/dvipost.h Sun Sep 17 22:03:51 2006
@@ -1,6 +1,7 @@
/* postfilter
$Copyright (C) 2002 Erich Fruehstueck
+Modified version by LyX Team
Dvipost is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
@@ -44,6 +45,7 @@
typedef struct {
int beg;
int end;
+ int type;
} POS;
typedef struct {
@@ -53,7 +55,7 @@
} PosTab;
void pos_init (PosTab *pos);
-void pos_add (PosTab *pos, int beg, int end);
+void pos_add (PosTab *pos, int beg, int end, int type);
extern int process_dvi (const char *id, FILE *in, FILE *out);
extern int dvipost (const char *iname, const char *oname);
diff -riwbBu -Xex dvipost-1.1/main.c dvipost-1.1-modified/main.c
--- dvipost-1.1/main.c Wed Nov 27 15:19:14 2002
+++ dvipost-1.1-modified/main.c Sun Sep 17 21:56:42 2006
@@ -24,15 +24,19 @@
#define TEX_ACCEPT_OPTIONS 1
#endif
-static char *version = "dvipost version 1.0\n\
+static char *version = "dvipost version 1.1 with modifications by LyX Team (sep 2006)\n\
Dvipost is copyright (C) 2002 Erich Fruehstueck.\n";
#include "dvipost.h"
#include "dvi.h"
+#if !defined(_MSC_VER)
#include <unistd.h>
+#endif
#include <string.h>
#include <sys/types.h>
+#ifndef _WIN32
#include <sys/wait.h>
+#endif
char **tex_argv = NULL;
int tex_argc = 0;
@@ -233,17 +237,26 @@
return stat;
}
-static char *get_dvi_name (const char *arg)
+static char *get_dvi_name (char *arg)
{
char *p, *dvi;
+#ifdef _WIN32
+ int i;
+
+ for (i=0; i < strlen(arg); ++i) {
+ if (arg[i] == '\\')
+ arg[i] = '/';
+ }
+#endif
+
p = strrchr(arg, '/');
if (p && p[1])
arg = p + 1;
- dvi = strcpy(xalloc(strlen(arg) + 4), arg);
- p = strchr(dvi, '.');
+ dvi = strcpy(xalloc(strlen(arg) + 5), arg);
+ p = strrchr(dvi, '.');
if (p && strcmp(p, ".tex") == 0)
*p = 0;
@@ -267,14 +280,32 @@
char *dviname;
int flag;
int i, n;
+#ifdef _WIN32
+ char *cmd;
+ char *qch;
+ char *p;
+#else
int status;
pid_t pid;
+#endif
time_t stamp;
tex_argv = xalloc((1 + argc) * sizeof(char*));
tex_argv[0] = argv[0];
tex_argc = 1;
+#ifdef _WIN32
+ for (i=0; i < strlen(argv[0]); ++i) {
+ if (argv[0][i] == '\\')
+ argv[0][i] = '/';
+ }
+
+ p = strrchr(argv[0], '.');
+
+ if (p && strcmp(p, ".exe") == 0)
+ *p = 0;
+#endif
+
pname = strrchr(argv[0], '/');
if (pname == NULL) pname = argv[0];
@@ -356,6 +387,34 @@
fflush(stdout);
time(&stamp);
+#ifdef _WIN32
+ for (i=0, n=0; i < tex_argc; ++i) {
+ n += strlen(tex_argv[i]);
+ qch = tex_argv[i];
+ while ((qch = strchr(qch, '"'))) {
+ ++qch;
+ ++n;
+ }
+ }
+
+ cmd = xalloc(1 + n + 3*(tex_argc-1));
+ strcpy(cmd, tex_argv[0]);
+
+ for (i=1, n=strlen(cmd); i < tex_argc; ++i)
+ {
+ cmd[n++] = ' ';
+ cmd[n++] = '"';
+ for (qch=tex_argv[i]; *qch; ++qch) {
+ if (*qch == '"')
+ cmd[n++] = '\\';
+ cmd[n++] = *qch;
+ }
+ cmd[n++] = '"';
+ }
+ cmd[n] = '\0';
+ system(cmd);
+ xfree(cmd);
+#else
pid = fork();
if (pid == -1)
@@ -368,6 +427,7 @@
execvp(tex_argv[0], tex_argv);
waitpid(pid, &status, 0);
+#endif
if (dviname)
return dvipost(dviname, dviname);
diff -riwbBu -Xex dvipost-1.1/pos.c dvipost-1.1-modified/pos.c
--- dvipost-1.1/pos.c Tue Oct 29 12:54:02 2002
+++ dvipost-1.1-modified/pos.c Sun Sep 17 22:03:41 2006
@@ -1,6 +1,7 @@
/* position table
$Copyright (C) 2002 Erich Fruehstueck
+Modified version by LyX Team
Dvipost is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
@@ -39,7 +40,7 @@
pos->dim = 0;
}
-void pos_add (PosTab *pos, int beg, int end)
+void pos_add (PosTab *pos, int beg, int end, int type)
{
if (beg > end)
{
@@ -56,7 +57,7 @@
{
if (last->end < end) last->end = end;
if (last->beg > beg) last->beg = beg;
-
+ if (last->type < type) last->type = type;
return;
}
}
@@ -64,5 +65,6 @@
pos_expand(pos);
pos->tab[pos->dim].beg = beg;
pos->tab[pos->dim].end = end;
+ pos->tab[pos->dim].type = type;
pos->dim++;
}
diff -riwbBu -Xex dvipost-1.1/tfm.c dvipost-1.1-modified/tfm.c
--- dvipost-1.1/tfm.c Sun Nov 3 09:52:04 2002
+++ dvipost-1.1-modified/tfm.c Sun Sep 17 22:03:44 2006
@@ -1,6 +1,7 @@
/* tfm data
$Copyright (C) 2002 Erich Fruehstueck
+Modified version by LyX Team
Dvipost is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
@@ -22,6 +23,11 @@
#include "dvi.h"
#include <ctype.h>
+#if defined(_MSC_VER)
+#define popen _popen
+#define pclose _pclose
+#endif
+
static char tfm_buf[1024];
static int tfm_err = 0;
static int tfm_pos = 0;
@@ -112,6 +118,8 @@
{
if (tfm_buf[n] == '\n')
{
+ if (n && tfm_buf[n-1] == '\r')
+ n--;
tfm_buf[n] = 0;
break;
}

View File

@ -1,253 +0,0 @@
diff -riwbBuN -Xex aspell-0.60.4/Makefile.am aspell-0.60.4-modified/Makefile.am
--- aspell-0.60.4/Makefile.am Wed Oct 19 11:12:02 2005
+++ aspell-0.60.4-modified/Makefile.am Thu Jun 15 14:45:47 2006
@@ -32,6 +32,7 @@
endif
libaspell_la_SOURCES =\
+ common/aspell_win.cpp\
common/cache.cpp\
common/string.cpp\
common/getdata.cpp\
diff -riwbBuN -Xex aspell-0.60.4/common/aspell_win.cpp aspell-0.60.4-modified/common/aspell_win.cpp
--- aspell-0.60.4/common/aspell_win.cpp Thu Jan 1 01:00:00 1970
+++ aspell-0.60.4-modified/common/aspell_win.cpp Fri Jun 16 01:19:04 2006
@@ -0,0 +1,54 @@
+#ifdef _WIN32
+
+#include <windows.h>
+#include "string.hpp"
+
+namespace acommon {
+
+ String ReadRegString(HKEY hive, String key, String name)
+ {
+
+ // Reads a string from the Windows registry (used to get paths)
+
+ HKEY hKey;
+ unsigned long lType;
+ DWORD dwSize;
+ unsigned char* szValue = NULL;
+
+ if (::RegOpenKeyEx(hive, key.c_str(), 0, KEY_READ, &hKey) == ERROR_SUCCESS)
+ {
+ if(::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, NULL, &dwSize) == ERROR_SUCCESS)
+ {
+ szValue = new unsigned char[dwSize + 1];
+ ::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, szValue, &dwSize);
+ String RegistryReturn((char*)szValue);
+ delete[] szValue;
+ return RegistryReturn;
+ } else {
+ return "";
+ }
+ } else {
+ return "";
+ }
+
+ }
+
+ HKEY GetRegHive()
+ {
+
+ // Check whether Aspell is installed for the current user or for all users
+
+ String value;
+
+ if (ReadRegString(HKEY_LOCAL_MACHINE, "Software\\Aspell", "Dictionary Path") == "")
+ {
+ return HKEY_CURRENT_USER;
+ } else {
+ return HKEY_LOCAL_MACHINE;
+ }
+
+ }
+
+}
+
+#endif
diff -riwbBuN -Xex aspell-0.60.4/common/aspell_win.hpp aspell-0.60.4-modified/common/aspell_win.hpp
--- aspell-0.60.4/common/aspell_win.hpp Thu Jan 1 01:00:00 1970
+++ aspell-0.60.4-modified/common/aspell_win.hpp Thu Jun 15 15:33:58 2006
@@ -0,0 +1,18 @@
+#ifdef _WIN32
+
+#ifndef ASPELL_WIN__HPP
+#define ASPELL_WIN__HPP
+
+#include "string.hpp"
+#include <windows.h>
+
+namespace acommon {
+
+ extern HKEY GetRegHive();
+ extern String ReadRegString(HKEY type, String key, String name);
+
+}
+
+#endif
+
+#endif
diff -riwbBuN -Xex aspell-0.60.4/common/config.cpp aspell-0.60.4-modified/common/config.cpp
--- aspell-0.60.4/common/config.cpp Wed Jun 22 07:32:30 2005
+++ aspell-0.60.4-modified/common/config.cpp Wed Jun 14 20:44:29 2006
@@ -39,6 +39,7 @@
#include "string_list.hpp"
#include "gettext.h"
+#undef printf
#include "iostream.hpp"
diff -riwbBuN -Xex aspell-0.60.4/common/convert.cpp aspell-0.60.4-modified/common/convert.cpp
--- aspell-0.60.4/common/convert.cpp Thu Sep 29 05:20:04 2005
+++ aspell-0.60.4-modified/common/convert.cpp Sat May 27 12:08:02 2006
@@ -23,6 +23,7 @@
#include "iostream.hpp"
#include "gettext.h"
+#undef printf
namespace acommon {
diff -riwbBuN -Xex aspell-0.60.4/common/file_util.cpp aspell-0.60.4-modified/common/file_util.cpp
--- aspell-0.60.4/common/file_util.cpp Mon Nov 15 13:29:54 2004
+++ aspell-0.60.4-modified/common/file_util.cpp Sat May 27 12:08:02 2006
@@ -26,6 +26,7 @@
#ifdef WIN32
+# include "asc_ctype.hpp"
# include <io.h>
# define ACCESS _access
# include <windows.h>
diff -riwbBuN -Xex aspell-0.60.4/common/gettext_init.cpp aspell-0.60.4-modified/common/gettext_init.cpp
--- aspell-0.60.4/common/gettext_init.cpp Tue Nov 9 09:20:24 2004
+++ aspell-0.60.4-modified/common/gettext_init.cpp Thu Jun 15 15:31:02 2006
@@ -1,5 +1,13 @@
+#include "settings.h"
+#include "string.hpp"
+
+#ifdef _WIN32
+ #include <windows.h>
+ #include "aspell_win.hpp"
+#endif
#include "gettext.h"
+#undef printf
#if ENABLE_NLS
@@ -11,12 +19,24 @@
extern "C" void aspell_gettext_init()
{
- {
acommon::Lock l(&lock);
if (did_init) return;
did_init = true;
- }
+
+#ifdef _WIN32
+ // Registry key for Locale Path
+
+ acommon::String value;
+ HKEY hive;
+
+ hive = acommon::GetRegHive();
+ value = acommon::ReadRegString(hive, "Software\\Aspell", "Locale Path");
+ if (value == "") value = LOCALEDIR;
+
+ bindtextdomain("aspell", value.c_str());
+#else
bindtextdomain("aspell", LOCALEDIR);
+#endif
}
#else
diff -riwbBuN -Xex aspell-0.60.4/common/info.cpp aspell-0.60.4-modified/common/info.cpp
--- aspell-0.60.4/common/info.cpp Wed Nov 10 07:18:46 2004
+++ aspell-0.60.4-modified/common/info.cpp Fri Jun 16 01:20:52 2006
@@ -15,9 +15,11 @@
/* BSDi defines u_intXX_t types in machine/types.h */
#include <machine/types.h>
#endif
+
#ifdef WIN32
# include <windows.h>
# include <winbase.h>
+#include "aspell_win.hpp"
#endif
#include "iostream.hpp"
@@ -38,6 +40,7 @@
#include "string_map.hpp"
#include "gettext.h"
+#undef printf
namespace acommon {
@@ -492,8 +495,22 @@
void get_data_dirs (Config * config,
StringList & lst)
{
+ String dictpath;
+ HKEY hive;
+
lst.clear();
- lst.add(config->retrieve("data-dir"));
+
+ hive = GetRegHive();
+
+#ifdef _WIN32
+ // Registry key for dictionary path
+ dictpath = ReadRegString(hive, "Software\\Aspell", "Dictionary Path");;
+ if (dictpath == "") dictpath = config->retrieve("data-dir");
+#else
+ dictpath = config->retrieve("data-dir");
+#endif
+
+ lst.add(dictpath);
lst.add(config->retrieve("dict-dir"));
}
diff -riwbBuN -Xex aspell-0.60.4/common/posib_err.cpp aspell-0.60.4-modified/common/posib_err.cpp
--- aspell-0.60.4/common/posib_err.cpp Sun Nov 21 03:52:22 2004
+++ aspell-0.60.4-modified/common/posib_err.cpp Sat May 27 12:08:02 2006
@@ -13,6 +13,7 @@
#include "posib_err.hpp"
#include "gettext.h"
+#undef printf
namespace acommon {
diff -riwbBuN -Xex aspell-0.60.4/modules/speller/default/language.cpp aspell-0.60.4-modified/modules/speller/default/language.cpp
--- aspell-0.60.4/modules/speller/default/language.cpp Sun Feb 20 22:47:08 2005
+++ aspell-0.60.4-modified/modules/speller/default/language.cpp Wed Jun 14 19:55:47 2006
@@ -21,10 +21,11 @@
#include "file_util.hpp"
#ifdef ENABLE_NLS
-# include <langinfo.h>
+//#include <langinfo.h>
#endif
#include "gettext.h"
+#undef printf
namespace aspeller {
diff -riwbBuN -Xex aspell-0.60.4/prog/aspell.cpp aspell-0.60.4-modified/prog/aspell.cpp
--- aspell-0.60.4/prog/aspell.cpp Sun Jun 19 14:00:46 2005
+++ aspell-0.60.4-modified/prog/aspell.cpp Wed Jun 14 20:46:09 2006
@@ -60,6 +60,7 @@
#include "hash_fun.hpp"
#include "gettext.h"
+#undef printf
using namespace acommon;

View File

@ -1,329 +0,0 @@
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/hostname.c gettext-tools/src/hostname.c
--- gettext-tools/src/hostname.c 2005-05-20 16:40:02.000000000 -0400
+++ gettext-tools/src/hostname.c 2005-11-11 11:02:07.203125000 -0500
@@ -99,7 +99,7 @@
static enum { default_format, short_format, long_format, ip_format } format;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "fqdn", no_argument, NULL, 'f' },
{ "help", no_argument, NULL, 'h' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgattrib.c gettext-tools/src/msgattrib.c
--- gettext-tools/src/msgattrib.c 2005-05-20 16:40:15.000000000 -0400
+++ gettext-tools/src/msgattrib.c 2005-11-11 11:01:39.484375000 -0500
@@ -69,7 +69,7 @@
static int to_change;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "clear-fuzzy", no_argument, NULL, CHAR_MAX + 8 },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgcat.c gettext-tools/src/msgcat.c
--- gettext-tools/src/msgcat.c 2005-05-20 16:40:19.000000000 -0400
+++ gettext-tools/src/msgcat.c 2005-11-11 11:02:33.109375000 -0500
@@ -53,7 +53,7 @@
static const char *to_code;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "directory", required_argument, NULL, 'D' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgcmp.c gettext-tools/src/msgcmp.c
--- gettext-tools/src/msgcmp.c 2005-05-20 16:40:23.000000000 -0400
+++ gettext-tools/src/msgcmp.c 2005-11-11 11:02:51.906250000 -0500
@@ -49,7 +49,7 @@
static bool multi_domain_mode = false;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "directory", required_argument, NULL, 'D' },
{ "help", no_argument, NULL, 'h' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgcomm.c gettext-tools/src/msgcomm.c
--- gettext-tools/src/msgcomm.c 2005-05-20 16:40:27.000000000 -0400
+++ gettext-tools/src/msgcomm.c 2005-11-11 11:03:09.406250000 -0500
@@ -55,7 +55,7 @@
static const char *to_code;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "directory", required_argument, NULL, 'D' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgconv.c gettext-tools/src/msgconv.c
--- gettext-tools/src/msgconv.c 2005-05-20 16:40:31.000000000 -0400
+++ gettext-tools/src/msgconv.c 2005-11-11 11:03:21.671875000 -0500
@@ -52,7 +52,7 @@
static const char *to_code;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "directory", required_argument, NULL, 'D' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgen.c gettext-tools/src/msgen.c
--- gettext-tools/src/msgen.c 2005-05-20 16:40:35.000000000 -0400
+++ gettext-tools/src/msgen.c 2005-11-11 11:03:54.531250000 -0500
@@ -48,7 +48,7 @@
static int force_po;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "directory", required_argument, NULL, 'D' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgexec.c gettext-tools/src/msgexec.c
--- gettext-tools/src/msgexec.c 2005-05-20 16:40:40.000000000 -0400
+++ gettext-tools/src/msgexec.c 2005-11-11 11:04:07.546875000 -0500
@@ -74,7 +74,7 @@
static int exitcode;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "directory", required_argument, NULL, 'D' },
{ "help", no_argument, NULL, 'h' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgfilter.c gettext-tools/src/msgfilter.c
--- gettext-tools/src/msgfilter.c 2005-05-20 16:40:44.000000000 -0400
+++ gettext-tools/src/msgfilter.c 2005-11-11 11:04:19.062500000 -0500
@@ -97,7 +97,7 @@
static int sub_argc;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "directory", required_argument, NULL, 'D' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgfmt.c gettext-tools/src/msgfmt.c
--- gettext-tools/src/msgfmt.c 2005-11-11 00:58:30.000000000 -0500
+++ gettext-tools/src/msgfmt.c 2005-11-11 11:04:30.546875000 -0500
@@ -163,7 +163,7 @@
static int do_statistics;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "alignment", required_argument, NULL, 'a' },
{ "check", no_argument, NULL, 'c' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msggrep.c gettext-tools/src/msggrep.c
--- gettext-tools/src/msggrep.c 2005-05-20 16:41:05.000000000 -0400
+++ gettext-tools/src/msggrep.c 2005-11-11 11:03:39.796875000 -0500
@@ -81,7 +81,7 @@
static struct grep_task grep_task[3];
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "comment", no_argument, NULL, 'C' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msginit.c gettext-tools/src/msginit.c
--- gettext-tools/src/msginit.c 2005-11-11 00:59:01.000000000 -0500
+++ gettext-tools/src/msginit.c 2005-11-11 11:04:42.078125000 -0500
@@ -125,7 +125,7 @@
static bool no_translator;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "help", no_argument, NULL, 'h' },
{ "input", required_argument, NULL, 'i' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgmerge.c gettext-tools/src/msgmerge.c
--- gettext-tools/src/msgmerge.c 2005-05-20 16:42:09.000000000 -0400
+++ gettext-tools/src/msgmerge.c 2005-11-11 11:04:51.328125000 -0500
@@ -84,7 +84,7 @@
static const char *backup_suffix_string;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "backup", required_argument, NULL, CHAR_MAX + 1 },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgunfmt.c gettext-tools/src/msgunfmt.c
--- gettext-tools/src/msgunfmt.c 2005-05-20 16:42:11.000000000 -0400
+++ gettext-tools/src/msgunfmt.c 2005-11-11 11:05:45.718750000 -0500
@@ -73,7 +73,7 @@
static int force_po;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "csharp", no_argument, NULL, CHAR_MAX + 4 },
{ "csharp-resources", no_argument, NULL, CHAR_MAX + 5 },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msguniq.c gettext-tools/src/msguniq.c
--- gettext-tools/src/msguniq.c 2005-05-20 16:42:23.000000000 -0400
+++ gettext-tools/src/msguniq.c 2005-11-11 11:05:57.968750000 -0500
@@ -52,7 +52,7 @@
static const char *to_code;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "directory", required_argument, NULL, 'D' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/urlget.c gettext-tools/src/urlget.c
--- gettext-tools/src/urlget.c 2005-05-20 16:44:41.000000000 -0400
+++ gettext-tools/src/urlget.c 2005-11-11 11:06:10.968750000 -0500
@@ -65,7 +65,7 @@
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "help", no_argument, NULL, 'h' },
{ "version", no_argument, NULL, 'V' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/xgettext.c gettext-tools/src/xgettext.c
--- gettext-tools/src/xgettext.c 2005-05-20 16:47:42.000000000 -0400
+++ gettext-tools/src/xgettext.c 2005-11-11 11:06:25.406250000 -0500
@@ -176,7 +176,7 @@
#endif
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-comments", optional_argument, NULL, 'c' },
{ "add-location", no_argument, &line_comment, 1 },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/tests/tstgettext.c gettext-tools/tests/tstgettext.c
--- gettext-tools/tests/tstgettext.c 2005-05-20 16:48:17.000000000 -0400
+++ gettext-tools/tests/tstgettext.c 2005-11-11 11:10:29.046875000 -0500
@@ -52,7 +52,7 @@
static bool do_expand;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "domain", required_argument, NULL, 'd' },
{ "env", required_argument, NULL, '=' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/tests/tstngettext.c gettext-tools/tests/tstngettext.c
--- gettext-tools/tests/tstngettext.c 2005-05-20 16:48:20.000000000 -0400
+++ gettext-tools/tests/tstngettext.c 2005-11-11 11:10:39.875000000 -0500
@@ -42,7 +42,7 @@
#define _(str) gettext (str)
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "domain", required_argument, NULL, 'd' },
{ "env", required_argument, NULL, '=' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-runtime/configure.ac gettext-runtime/configure.ac
--- gettext-runtime/configure.ac 2005-11-11 00:04:26.000000000 -0500
+++ gettext-runtime/configure.ac 2005-11-11 11:34:46.687500000 -0500
@@ -111,6 +111,28 @@
#endif
])
+dnl Since gcc-3.3.3, const variables are placed in .rdata section
+dnl On windows (cygwin, mingw) this is a problem if the variable
+dnl is a composite containing references to other variables, because
+dnl the runtime relocation machinery can't fixup the address. Thus
+dnl these composite vars must NOT be declared const. This typically
+dnl occurs in long_options structs, containing references to variables
+dnl that are the targets of an option flag.
+case "$host_os" in
+ *cygwin* | *mingw* )
+ AC_DEFINE([CONST_IS_PROBLEMATIC_WIN32], 1,
+ [Define to 1 if structs-containing-references must not be declared const])
+ ;;
+esac
+AH_VERBATIM([DEF_CONST_PROBLEMATIC_WIN32],
+[/* On some platforms, structs-containing-references must not be declared const */
+#if defined CONST_IS_PROBLEMATIC_WIN32
+# define CONST_PROBLEMATIC_WIN32
+#else
+# define CONST_PROBLEMATIC_WIN32 const
+#endif
+])
+
AH_VERBATIM([DEF_OS2],
[/* Extra OS/2 (emx+gcc) defines. */
#ifdef __EMX__
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/configure.ac gettext-tools/configure.ac
--- gettext-tools/configure.ac 2005-11-11 00:26:09.000000000 -0500
+++ gettext-tools/configure.ac 2005-11-11 11:34:03.140625000 -0500
@@ -214,6 +214,28 @@
#endif
])
+dnl Since gcc-3.3.3, const variables are placed in .rdata section
+dnl On windows (cygwin, mingw) this is a problem if the variable
+dnl is a composite containing references to other variables, because
+dnl the runtime relocation machinery can't fixup the address. Thus
+dnl these composite vars must NOT be declared const. This typically
+dnl occurs in long_options structs, containing references to variables
+dnl that are the targets of an option flag.
+case "$host_os" in
+ *cygwin* | *mingw* )
+ AC_DEFINE([CONST_IS_PROBLEMATIC_WIN32], 1,
+ [Define to 1 if structs-containing-references must not be declared const])
+ ;;
+esac
+AH_VERBATIM([DEF_CONST_PROBLEMATIC_WIN32],
+[/* On some platforms, structs-containing-references must not be declared const */
+#if defined CONST_IS_PROBLEMATIC_WIN32
+# define CONST_PROBLEMATIC_WIN32
+#else
+# define CONST_PROBLEMATIC_WIN32 const
+#endif
+])
+
dnl Check for the expat XML parser.
dnl On operating systems where binary distribution vendors are likely to
dnl ship both gettext and expat, we use dynamic loading to avoid a hard
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-runtime/src/envsubst.c gettext-runtime/src/envsubst.c
--- gettext-runtime/src/envsubst.c 2005-05-20 16:14:16.000000000 -0400
+++ gettext-runtime/src/envsubst.c 2005-11-11 11:07:50.796875000 -0500
@@ -43,7 +43,7 @@
static bool all_variables;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "help", no_argument, NULL, 'h' },
{ "variables", no_argument, NULL, 'v' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-runtime/src/gettext.c gettext-runtime/src/gettext.c
--- gettext-runtime/src/gettext.c 2005-05-20 16:14:21.000000000 -0400
+++ gettext-runtime/src/gettext.c 2005-11-11 11:08:03.859375000 -0500
@@ -48,7 +48,7 @@
static bool do_expand;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "domain", required_argument, NULL, 'd' },
{ "help", no_argument, NULL, 'h' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-runtime/src/ngettext.c gettext-runtime/src/ngettext.c
--- gettext-runtime/src/ngettext.c 2005-05-20 16:14:39.000000000 -0400
+++ gettext-runtime/src/ngettext.c 2005-11-11 11:08:16.062500000 -0500
@@ -44,7 +44,7 @@
static int do_expand;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "domain", required_argument, NULL, 'd' },
{ "help", no_argument, NULL, 'h' },

View File

@ -1,264 +0,0 @@
diff -riwBu -Xex aspell-setter-sep06/common/config.cpp aspell-setter-sep06-modified/common/config.cpp
--- aspell-setter-sep06/common/config.cpp 2005-12-12 17:41:06.000000000 +0100
+++ aspell-setter-sep06-modified/common/config.cpp 2007-02-16 22:40:26.947401600 +0100
@@ -78,6 +78,10 @@
namespace aspell {
+#ifdef WIN32PORT
+ String GetWindowsDir(String registry_name, String default_directory);
+#endif
+
const char * const keyinfo_type_name[4] = {
N_("string"), N_("integer"), N_("boolean"), N_("list")
};
@@ -642,20 +646,19 @@
} else if (strcmp(i, "home-dir") == 0) {
- //get the personal folder (e.g. "c:\My Documents")
- char * dir = new char[MAX_PATH];
- LPITEMIDLIST items = 0;
- HRESULT hand = SHGetSpecialFolderLocation(0, CSIDL_PERSONAL, &items);
- if ((NOERROR == hand) && items) {
- if (SHGetPathFromIDList(items, dir)) {
- for (char *ptr = dir; *ptr; ++ptr)
- if ('\\' == *ptr)
- *ptr = '/';
- final_str = dir;
- }
- CoTaskMemFree(items);
- }
- delete [] dir;
+ final_str = GetWindowsDir("Base Path", "");
+
+ } else if (strcmp(i, "dict-dir") == 0) {
+
+ final_str = GetWindowsDir("Dictionary Path", "Dictionaries");
+
+ } else if (strcmp(i, "data-dir") == 0) {
+
+ final_str = GetWindowsDir("Data Path", "Data");
+
+ } else if (strcmp(i, "personal-dir") == 0) {
+
+ final_str = GetWindowsDir("Personal Path", "Personal");
}
#endif
@@ -1394,20 +1397,6 @@
return no_err;
}
-#if defined(WIN32_USE_PERSONAL_DIR)
-# define HOME_DIR "!home-dir"
-# define PERSONAL "<lang>.pws"
-# define REPL "<lang>.prepl"
-#elif defined(ENABLE_WIN32_RELOCATABLE)
-# define HOME_DIR "<prefix>"
-# define PERSONAL "<lang>.pws"
-# define REPL "<lang>.prepl"
-#else
-# define HOME_DIR "<$HOME|./>"
-# define PERSONAL ".aspell.<lang>.pws"
-# define REPL ".aspell.<lang>.prepl"
-#endif
-
static const KeyInfo config_keys[] = {
// the description should be under 50 chars
{"actual-dict-dir", KeyInfoString, "<dict-dir^master>", 0}
@@ -1484,12 +1473,12 @@
, {"per-conf-path", KeyInfoString, "<home-dir/per-conf>", 0}
, {"personal", KeyInfoString, PERSONAL,
N_("personal dictionary file name")}
- , {"personal-path", KeyInfoString, "<home-dir/personal>", 0}
+ , {"personal-path", KeyInfoString, "<personal-dir/personal>", 0}
, {"prefix", KeyInfoString, PREFIX,
N_("prefix directory")}
, {"repl", KeyInfoString, REPL,
N_("replacements list file name") }
- , {"repl-path", KeyInfoString, "<home-dir/repl>", 0}
+ , {"repl-path", KeyInfoString, "<personal-dir/repl>", 0}
, {"run-together", KeyInfoBool, "false",
N_("consider run-together words legal"), KEYINFO_MAY_CHANGE}
, {"run-together-limit", KeyInfoInt, "2",
@@ -1524,12 +1513,6 @@
N_("search path for word list information files"), KEYINFO_HIDDEN}
, {"warn", KeyInfoBool, "true",
N_("enable warnings")}
-#ifdef WIN32PORT
- , {"dict-subdir", KeyInfoString, "dicts",
- N_("sub directory for dictionaries")}
- , {"data-subdir", KeyInfoString, "data",
- N_("sub directory for other data")}
-#endif
//
// These options are generally used when creating dictionaries
@@ -1574,7 +1557,10 @@
N_("suggest possible replacements"), KEYINFO_MAY_CHANGE}
, {"time" , KeyInfoBool, "false",
N_("time load time and suggest time in pipe mode"), KEYINFO_MAY_CHANGE}
-
+ #ifdef WIN32PORT
+ , {"personal-dir", KeyInfoString, PERSONAL_DIR,
+ N_("directory for personal dictionaries")}
+ #endif
};
const KeyInfo * config_impl_keys_begin = config_keys;
@@ -1588,4 +1574,87 @@
config_impl_keys_end);
}
+#ifdef WIN32PORT
+
+ String ReadRegString(HKEY hive, String key, String name)
+ {
+
+ // Reads a string from the Windows registry (used to get paths)
+
+ HKEY hKey;
+ unsigned long lType;
+ DWORD dwSize;
+ unsigned char* szValue = NULL;
+
+ if (::RegOpenKeyEx(hive, key.c_str(), 0, KEY_READ, &hKey) == ERROR_SUCCESS)
+ {
+ if(::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, NULL, &dwSize) == ERROR_SUCCESS)
+ {
+ szValue = new unsigned char[dwSize + 1];
+ ::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, szValue, &dwSize);
+ String RegistryReturn((char*)szValue);
+ delete[] szValue;
+ return RegistryReturn;
+ } else {
+ return "";
+ }
+ } else {
+ return "";
+ }
+
+ }
+
+ HKEY GetRegHive()
+ {
+
+ // Check whether Aspell is installed for the current user or for all users
+
+ String value;
+
+ if (ReadRegString(HKEY_CURRENT_USER, "Software\\Aspell", "Base Path").empty())
+ {
+ return HKEY_LOCAL_MACHINE;
+ } else {
+ return HKEY_CURRENT_USER;
+ }
+
+ }
+
+ String GetWindowsDir(String registry_name, String default_dir)
+ {
+
+ String final_dir;
+
+ // Get directory from registry
+ HKEY hive;
+ hive = GetRegHive();
+ final_dir = ReadRegString(hive, "Software\\Aspell", registry_name);
+
+ // Default location in "Documents and Settings"
+ if (final_dir.empty()) {
+
+ char * dir = new char[MAX_PATH];
+ LPITEMIDLIST items = 0;
+ HRESULT hand = SHGetSpecialFolderLocation(0, CSIDL_APPDATA, &items);
+
+ if ((NOERROR == hand) && items) {
+ if (SHGetPathFromIDList(items, dir)) {
+ for (char *ptr = dir; *ptr; ++ptr)
+ if ('\\' == *ptr)
+ *ptr = '/';
+ final_dir = dir;
+ final_dir.append("/Aspell/");
+ final_dir.append(default_dir.c_str());
+ }
+ CoTaskMemFree(items);
+ }
+
+ }
+
+ return final_dir;
+
+ }
+
+#endif
+
}
diff -riwBu -Xex aspell-setter-sep06/common/vector.hpp aspell-setter-sep06-modified/common/vector.hpp
--- aspell-setter-sep06/common/vector.hpp 2005-10-13 09:42:54.000000000 +0200
+++ aspell-setter-sep06-modified/common/vector.hpp 2006-09-17 19:50:45.730606400 +0200
@@ -50,10 +50,10 @@
T * data_end() {return &*this->end();}
T * pbegin() {return &*this->begin();}
- T * pend() {return &*this->end();}
+ T * pend() {return &this->back()+1;}
const T * pbegin() const {return &*this->begin();}
- const T * pend() const {return &*this->end();}
+ const T * pend() const {return &this->back()+1;}
template <typename U>
U * datap() {
diff -riwBu -Xex aspell-setter-sep06/win32/dirs.h aspell-setter-sep06-modified/win32/dirs.h
--- aspell-setter-sep06/win32/dirs.h 2005-10-13 13:29:34.000000000 +0200
+++ aspell-setter-sep06-modified/win32/dirs.h 2007-02-16 22:52:43.486492800 +0100
@@ -1,16 +1,26 @@
#ifndef dirs_h
#define dirs_h
-#ifdef WIN32_USE_EXECUTABLE_DIR
-# define DATA_DIR "<prefix/data-subdir>"
-# define CONF_DIR "<prefix>"
-# define DICT_DIR "<prefix/dict-subdir>"
+# define DATA_DIR "!data-dir"
+# define DICT_DIR "!dict-dir"
+# define PERSONAL_DIR "!personal-dir"
+# define CONF_DIR "<home-dir>"
+
+#if defined(WIN32_USE_EXECUTABLE_DIR)
+# define HOME_DIR "<prefix>"
+# define PERSONAL "<lang>.pws"
+# define REPL "<lang>.prepl"
# define PREFIX "!prefix"
+#elif defined(WIN32_USE_PERSONAL_DIR)
+# define HOME_DIR "!home-dir"
+# define PERSONAL "<lang>.pws"
+# define REPL "<lang>.prepl"
+# define PREFIX "<home-dir>"
#else
-# define DATA_DIR "aspell-win32/data"
-# define CONF_DIR "aspell-win32"
-# define DICT_DIR "dicts"
-# define PREFIX "aspell-win32"
+# define HOME_DIR "<$HOME|./>"
+# define PERSONAL ".aspell.<lang>.pws"
+# define REPL ".aspell.<lang>.prepl"
+# define PREFIX "<home-dir>"
#endif
#endif
diff -riwBu -Xex aspell-setter-sep06/win32/settings.h aspell-setter-sep06-modified/win32/settings.h
--- aspell-setter-sep06/win32/settings.h 2006-09-06 10:51:16.000000000 +0200
+++ aspell-setter-sep06-modified/win32/settings.h 2006-09-17 18:55:23.112916800 +0200
@@ -9,9 +9,6 @@
/* Defined if curses like POSIX Functions should be used */
#undef CURSES_ONLY
-/* Defined if win32 relocation should be used */
-#define ENABLE_WIN32_RELOCATABLE 1
-
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H

View File

@ -1,600 +0,0 @@
/*
* dirent.h - operating system independent dirent implementation
*
* Copyright (C) 1998-2002 Toni Ronkko
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* ``Software''), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL TONI RONKKO BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
*
* Aug 20, 2006, Toni Ronkko
* Removed all remarks about MSVC 1.0, which is antiqued now. Simplified
* comments by removing SGML tags.
*
* May 14 2002, Toni Ronkko
* Embedded the function definitions directly to the header so that no source
* modules must be included in the MS Visual C project for using the
* interface. Removed all the dependencies to other projects so
* that this very header can be used independently.
*
* May 28 1998, Toni Ronkko
* First version.
*/
#ifndef DIRENT_H
#define DIRENT_H
#define DIRENT_H_INCLUDED
/* find out platform */
#if defined(MSDOS) /* MS-DOS */
#elif defined(__MSDOS__) /* Turbo C/Borland */
# define MSDOS
#elif defined(__DOS__) /* Watcom */
# define MSDOS
#endif
#if defined(WIN32) /* MS-Windows */
#elif defined(__NT__) /* Watcom */
# define WIN32
#elif defined(_WIN32) /* Microsoft */
# define WIN32
#elif defined(__WIN32__) /* Borland */
# define WIN32
#endif
/*
* See what kind of dirent interface we have unless autoconf has already
* determinated that.
*/
#if !defined(HAVE_DIRENT_H) && !defined(HAVE_DIRECT_H) && !defined(HAVE_SYS_DIR_H) && !defined(HAVE_NDIR_H) && !defined(HAVE_SYS_NDIR_H) && !defined(HAVE_DIR_H)
# if defined(_MSC_VER) /* Microsoft C/C++ */
/* no dirent.h */
# elif defined(__BORLANDC__) /* Borland C/C++ */
# define HAVE_DIRENT_H
# define VOID_CLOSEDIR
# elif defined(__TURBOC__) /* Borland Turbo C */
/* no dirent.h */
# elif defined(__WATCOMC__) /* Watcom C/C++ */
# define HAVE_DIRECT_H
# elif defined(__apollo) /* Apollo */
# define HAVE_SYS_DIR_H
# elif defined(__hpux) /* HP-UX */
# define HAVE_DIRENT_H
# elif defined(__alpha) || defined(__alpha__) /* Alpha OSF1 */
# error "not implemented"
# elif defined(__sgi) /* Silicon Graphics */
# define HAVE_DIRENT_H
# elif defined(sun) || defined(_sun) /* Sun Solaris */
# define HAVE_DIRENT_H
# elif defined(__FreeBSD__) /* FreeBSD */
# define HAVE_DIRENT_H
# elif defined(__linux__) /* Linux */
# define HAVE_DIRENT_H
# elif defined(__GNUC__) /* GNU C/C++ */
# define HAVE_DIRENT_H
# else
# error "not implemented"
# endif
#endif
/* include proper interface headers */
#if defined(HAVE_DIRENT_H)
# include <dirent.h>
# ifdef FREEBSD
# define NAMLEN(dp) ((int)((dp)->d_namlen))
# else
# define NAMLEN(dp) ((int)(strlen((dp)->d_name)))
# endif
#elif defined(HAVE_NDIR_H)
# include <ndir.h>
# define NAMLEN(dp) ((int)((dp)->d_namlen))
#elif defined(HAVE_SYS_NDIR_H)
# include <sys/ndir.h>
# define NAMLEN(dp) ((int)((dp)->d_namlen))
#elif defined(HAVE_DIRECT_H)
# include <direct.h>
# define NAMLEN(dp) ((int)((dp)->d_namlen))
#elif defined(HAVE_DIR_H)
# include <dir.h>
# define NAMLEN(dp) ((int)((dp)->d_namlen))
#elif defined(HAVE_SYS_DIR_H)
# include <sys/types.h>
# include <sys/dir.h>
# ifndef dirent
# define dirent direct
# endif
# define NAMLEN(dp) ((int)((dp)->d_namlen))
#elif defined(MSDOS) || defined(WIN32)
/* figure out type of underlaying directory interface to be used */
# if defined(WIN32)
# define DIRENT_WIN32_INTERFACE
# elif defined(MSDOS)
# define DIRENT_MSDOS_INTERFACE
# else
# error "missing native dirent interface"
# endif
/*** WIN32 specifics ***/
# if defined(DIRENT_WIN32_INTERFACE)
# include <windows.h>
# if !defined(DIRENT_MAXNAMLEN)
# define DIRENT_MAXNAMLEN (MAX_PATH)
# endif
/*** MS-DOS specifics ***/
# elif defined(DIRENT_MSDOS_INTERFACE)
# include <dos.h>
/* Borland defines file length macros in dir.h */
# if defined(__BORLANDC__)
# include <dir.h>
# if !defined(DIRENT_MAXNAMLEN)
# define DIRENT_MAXNAMLEN ((MAXFILE)+(MAXEXT))
# endif
# if !defined(_find_t)
# define _find_t find_t
# endif
/* Turbo C defines ffblk structure in dir.h */
# elif defined(__TURBOC__)
# include <dir.h>
# if !defined(DIRENT_MAXNAMLEN)
# define DIRENT_MAXNAMLEN ((MAXFILE)+(MAXEXT))
# endif
# define DIRENT_USE_FFBLK
/* MSVC */
# elif defined(_MSC_VER)
# if !defined(DIRENT_MAXNAMLEN)
# define DIRENT_MAXNAMLEN (12)
# endif
/* Watcom */
# elif defined(__WATCOMC__)
# if !defined(DIRENT_MAXNAMLEN)
# if defined(__OS2__) || defined(__NT__)
# define DIRENT_MAXNAMLEN (255)
# else
# define DIRENT_MAXNAMLEN (12)
# endif
# endif
# endif
# endif
/*** generic MS-DOS and MS-Windows stuff ***/
# if !defined(NAME_MAX) && defined(DIRENT_MAXNAMLEN)
# define NAME_MAX DIRENT_MAXNAMLEN
# endif
# if NAME_MAX < DIRENT_MAXNAMLEN
# error "assertion failed: NAME_MAX >= DIRENT_MAXNAMLEN"
# endif
/*
* Substitute for real dirent structure. Note that d_name field is a
* true character array although we have it copied in the implementation
* dependent data. We could save some memory if we had declared d_name
* as a pointer refering the name within implementation dependent data.
* We have not done that since some code may rely on sizeof(d_name) to be
* something other than four. Besides, directory entries are typically so
* small that it takes virtually no time to copy them from place to place.
*/
typedef struct dirent {
char d_name[NAME_MAX + 1];
/*** Operating system specific part ***/
# if defined(DIRENT_WIN32_INTERFACE) /*WIN32*/
WIN32_FIND_DATA data;
# elif defined(DIRENT_MSDOS_INTERFACE) /*MSDOS*/
# if defined(DIRENT_USE_FFBLK)
struct ffblk data;
# else
struct _find_t data;
# endif
# endif
} dirent;
/*
* DIR substitute structure containing directory name. The name is
* essential for the operation of rewinndir() function.
*/
typedef struct DIR {
char *dirname; /* directory being scanned */
dirent current; /* current entry */
int dirent_filled; /* is current un-processed? */
/*** Operating system specific part ***/
# if defined(DIRENT_WIN32_INTERFACE)
HANDLE search_handle;
# elif defined(DIRENT_MSDOS_INTERFACE)
# endif
} DIR;
# ifdef __cplusplus
extern "C" {
# endif
/* prototypes of public dirent functions */
static DIR *opendir (const char *dirname);
static struct dirent *readdir (DIR *dirp);
static int closedir (DIR *dirp);
static void rewinddir (DIR *dirp);
/*
* Implement dirent interface as static functions so that the user does not
* need to change his project in any way to use dirent function. With this
* it is sufficient to include this very header from source modules using
* dirent functions and the functions will be pulled in automatically.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
/* use ffblk instead of _find_t if requested */
#if defined(DIRENT_USE_FFBLK)
# define _A_ARCH (FA_ARCH)
# define _A_HIDDEN (FA_HIDDEN)
# define _A_NORMAL (0)
# define _A_RDONLY (FA_RDONLY)
# define _A_SUBDIR (FA_DIREC)
# define _A_SYSTEM (FA_SYSTEM)
# define _A_VOLID (FA_LABEL)
# define _dos_findnext(dest) findnext(dest)
# define _dos_findfirst(name,flags,dest) findfirst(name,dest,flags)
#endif
/* internal prototypes */
static int _initdir (DIR *p);
static const char *_getdirname (const struct dirent *dp);
static void _setdirname (struct DIR *dirp);
/*
* Open directory stream DIRNAME for read and return pointer to the
* internal working area that is used for retrieving individual directory
* entries. The internal working area has no fields of your interest.
*/
static DIR *
opendir(
const char *dirname)
{
DIR *dirp;
assert (dirname != NULL);
dirp = (DIR*)malloc (sizeof (struct DIR));
if (dirp != NULL) {
char *p;
/* allocate room for directory name */
dirp->dirname = (char*) malloc (strlen (dirname) + 1 + strlen ("\\*.*"));
if (dirp->dirname == NULL) {
/* failed to duplicate directory name. errno set by malloc() */
free (dirp);
return NULL;
}
/*
* Copy directory name while appending directory separator and "*.*".
* Directory separator is not appended if the name already ends with
* drive or directory separator. Directory separator is assumed to be
* '/' or '\' and drive separator is assumed to be ':'.
*/
strcpy (dirp->dirname, dirname);
p = strchr (dirp->dirname, '\0');
if (dirp->dirname < p &&
*(p - 1) != '\\' && *(p - 1) != '/' && *(p - 1) != ':')
{
strcpy (p++, "\\");
}
# ifdef DIRENT_WIN32_INTERFACE
strcpy (p, "*"); /*scan files with and without extension in win32*/
# else
strcpy (p, "*.*"); /*scan files with and without extension in DOS*/
# endif
/* open stream */
if (_initdir (dirp) == 0) {
/* initialization failed */
free (dirp->dirname);
free (dirp);
return NULL;
}
}
return dirp;
}
/*
* Read a directory entry and return pointer to a structure containing the
* name of the entry. Individual directory entries returned by this very
* function include normal files, sub-directories, pseudo-directories "."
* and ".." and also volume labels, hidden files and system files in MS-DOS
* and MS-Windows. You might want to use stat(2) function to determinate
* which one you are dealing with.
*
* The dirent structure contains several system dependent fields that
* generally have no interest to you. The only interesting one is char
* d_name[] that is also portable across different systems. The d_name
* field contains the name of the directory entry without leading path.
* While d_name is portable across different systems, the actual storage
* capacity of d_name varies from system to system and there is no portable
* way to find out it at compile time. Different systems define the
* capacity of d_name with different macros and some systems do not define
* capacity at all (besides actual declaration of the field). If you really
* need to find out storage capacity of d_name then you might want to try
* NAME_MAX macro. The NAME_MAX is defined in POSIX standard althought
* there are many MS-DOS and MS-Windows implementations those do not define
* it. There are also systems that declare d_name as "char d_name[1]" and
* then allocate suitable amount of memory at run-time. Thanks to Alain
* Decamps (Alain dot Decamps atsign advalvas dot be) for pointing it out to
* me.
*
* This all leads to the fact that it is difficult to allocate space
* for the directory names when the very same program is being compiled on
* number of operating systems. Therefore I suggest that you always
* allocate space for directory names dynamically.
*/
static struct dirent *
readdir (DIR *dirp)
{
assert (dirp != NULL);
if (dirp == NULL) {
errno = EBADF;
return NULL;
}
#if defined(DIRENT_WIN32_INTERFACE)
if (dirp->search_handle == INVALID_HANDLE_VALUE) {
/* directory stream was opened/rewound incorrectly or it ended normally */
errno = EBADF;
return NULL;
}
#endif
if (dirp->dirent_filled != 0) {
/*
* Directory entry has already been retrieved and there is no need to
* retrieve a new one. Directory entry will be retrieved in advance
* when the user calls readdir function for the first time. This is so
* because real dirent has separate functions for opening and reading
* the stream whereas Win32 and DOS dirents open the stream
* automatically when we retrieve the first file. Therefore, we have to
* save the first file when opening the stream and later we have to
* return the saved entry when the user tries to read the first entry.
*/
dirp->dirent_filled = 0;
} else {
/* fill in entry and return that */
#if defined(DIRENT_WIN32_INTERFACE)
if (FindNextFile (dirp->search_handle, &dirp->current.data) == FALSE) {
/* Last file has been processed or an error occured */
FindClose (dirp->search_handle);
dirp->search_handle = INVALID_HANDLE_VALUE;
errno = ENOENT;
return NULL;
}
# elif defined(DIRENT_MSDOS_INTERFACE)
if (_dos_findnext (&dirp->current.data) != 0) {
/* _dos_findnext and findnext will set errno to ENOENT when no
* more entries could be retrieved. */
return NULL;
}
# endif
_setdirname (dirp);
assert (dirp->dirent_filled == 0);
}
return &dirp->current;
}
/*
* Close directory stream opened by opendir() function. Close of the
* directory stream invalidates the DIR structure as well as any previously
* read directory entry.
*
* Usually, the function returns 0 on success and -1 on failure. However,
* on some systems, the function has been declared to return void. If you
* want to keep your code portable, it may be better to ignore the return
* value altogether.
*/
static int
closedir (DIR *dirp)
{
int retcode = 0;
/* make sure that dirp points to legal structure */
assert (dirp != NULL);
if (dirp == NULL) {
errno = EBADF;
return -1;
}
/* free directory name */
if (dirp->dirname != NULL) {
free (dirp->dirname);
}
/* release search handle */
#if defined(DIRENT_WIN32_INTERFACE)
if (dirp->search_handle != INVALID_HANDLE_VALUE) {
if (FindClose (dirp->search_handle) == FALSE) {
/* Unknown error */
retcode = -1;
errno = EBADF;
}
}
#endif
/* clear dirp structure to make sure that it cannot be used anymore*/
memset (dirp, 0, sizeof (*dirp));
# if defined(DIRENT_WIN32_INTERFACE)
dirp->search_handle = INVALID_HANDLE_VALUE;
# endif
free (dirp);
return retcode;
}
/*
* Rewind the directory stream to re-read the directory entries. If new
* files or directories have been created since opendir(), then also these
* new files will be available with readdir().
*
* Almost every dirent implementation ensures that rewinddir() updates its
* internal caches to reflect the current directory structure on disk.
* However, if you really depend on this feature, it may be better to close
* and re-open the directory stream. I recall one particual dirent
* interface, where rewinddir() did not update its internal cache.
*
* BUGS: If the current working directory is changed between opendir() and
* rewinddir(), then the rewound directory stream may refer a non-existent
* directory, or at worst case, to another directory.
*/
static void
rewinddir (DIR *dirp)
{
/* make sure that dirp is legal */
assert (dirp != NULL);
if (dirp == NULL) {
errno = EBADF;
return;
}
assert (dirp->dirname != NULL);
/* close previous stream */
#if defined(DIRENT_WIN32_INTERFACE)
if (dirp->search_handle != INVALID_HANDLE_VALUE) {
if (FindClose (dirp->search_handle) == FALSE) {
/* Unknown error */
errno = EBADF;
}
}
#endif
/* re-open previous stream */
if (_initdir (dirp) == 0) {
/* initialization failed but we cannot deal with error. User will notice
* error later when she tries to retrieve first directory enty. */
/*EMPTY*/;
}
}
/*
* Open native directory stream object and retrieve first file.
* Be sure to close previous stream before opening new one.
*/
static int
_initdir (DIR *dirp)
{
assert (dirp != NULL);
assert (dirp->dirname != NULL);
dirp->dirent_filled = 0;
# if defined(DIRENT_WIN32_INTERFACE)
/* Open stream and retrieve first file */
dirp->search_handle = FindFirstFile (dirp->dirname, &dirp->current.data);
if (dirp->search_handle == INVALID_HANDLE_VALUE) {
/* something went wrong but we don't know what. GetLastError() could
* give us more information about the error, but then we should map
* the error code into errno. */
errno = ENOENT;
return 0;
}
# elif defined(DIRENT_MSDOS_INTERFACE)
if (_dos_findfirst (dirp->dirname,
_A_SUBDIR | _A_RDONLY | _A_ARCH | _A_SYSTEM | _A_HIDDEN,
&dirp->current.data) != 0)
{
/* _dos_findfirst and findfirst will set errno to ENOENT when no
* more entries could be retrieved. */
return 0;
}
# endif
/* initialize DIR and it's first entry */
_setdirname (dirp);
dirp->dirent_filled = 1;
return 1;
}
/*
* Return implementation dependent name of the current directory entry.
*/
static const char *
_getdirname (const struct dirent *dp)
{
#if defined(DIRENT_WIN32_INTERFACE)
return dp->data.cFileName;
#elif defined(DIRENT_USE_FFBLK)
return dp->data.ff_name;
#else
return dp->data.name;
#endif
}
/*
* Copy name of implementation dependent directory entry to the d_name field.
*/
static void
_setdirname (struct DIR *dirp) {
/* make sure that d_name is long enough */
assert (strlen (_getdirname (&dirp->current)) <= NAME_MAX);
strncpy (dirp->current.d_name,
_getdirname (&dirp->current),
NAME_MAX);
dirp->current.d_name[NAME_MAX] = '\0'; /*char d_name[NAME_MAX+1]*/
}
# ifdef __cplusplus
}
# endif
# define NAMLEN(dp) ((int)(strlen((dp)->d_name)))
#else
# error "missing dirent interface"
#endif
#endif /*DIRENT_H*/

View File

@ -1,796 +0,0 @@
diff -riwBu -Xex gettext-0.15\gettext-runtime\config.h.msvc gettext-0.15-modified\gettext-runtime\config.h.msvc
--- gettext-0.15\gettext-runtime\config.h.msvc Fri Jul 21 16:30:08 2006
+++ gettext-0.15-modified\gettext-runtime\config.h.msvc Sat Oct 21 23:37:47 2006
@@ -1,5 +1,7 @@
/* config.h.in. Generated from configure.ac by autoheader. */
+#define EXEEXT '.exe'
+
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
diff -riwBu -Xex gettext-0.15\gettext-runtime\intl\Makefile.msvc gettext-0.15-modified\gettext-runtime\intl\Makefile.msvc
--- gettext-0.15\gettext-runtime\intl\Makefile.msvc Mon Aug 01 13:14:02 2005
+++ gettext-0.15-modified\gettext-runtime\intl\Makefile.msvc Fri Oct 20 12:23:09 2006
@@ -204,6 +204,7 @@
# intl.dll and intl.lib are created together.
intl.lib : $(OBJECTS) $(RESOURCES)
$(CC) $(MFLAGS) $(DEBUGFLAGS) -LD $(OBJECTS) $(libdir)\iconv.lib $(RESOURCES) -Feintl.dll
+ mt.exe -manifest intl.dll.manifest -outputresource:intl.dll;2
intl.res : $(srcdir)\..\windows\intl.rc
rc -Fo intl.res $(srcdir)\..\windows\intl.rc
diff -riwBu -Xex gettext-0.15\gettext-runtime\src\Makefile.msvc gettext-0.15-modified\gettext-runtime\src\Makefile.msvc
--- gettext-0.15\gettext-runtime\src\Makefile.msvc Thu Feb 10 17:49:08 2005
+++ gettext-0.15-modified\gettext-runtime\src\Makefile.msvc Fri Oct 20 12:22:23 2006
@@ -107,12 +107,15 @@
gettext.exe : $(gettext_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(gettext_OBJECTS) ..\lib\grt.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Fegettext.exe
+ mt.exe -manifest gettext.exe.manifest -outputresource:gettext.exe;1
ngettext.exe : $(ngettext_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(ngettext_OBJECTS) ..\lib\grt.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Fengettext.exe
+ mt.exe -manifest ngettext.exe.manifest -outputresource:ngettext.exe;1
envsubst.exe : $(envsubst_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(ngettext_OBJECTS) ..\lib\grt.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Feenvsubst.exe
+ mt.exe -manifest envsubst.exe.manifest -outputresource:envsubst.exe;1
install : all force
-mkdir $(prefix)
diff -riwBu -Xex gettext-0.15\gettext-tools\config.h.msvc gettext-0.15-modified\gettext-tools\config.h.msvc
--- gettext-0.15\gettext-tools\config.h.msvc Fri Jul 21 16:30:18 2006
+++ gettext-0.15-modified\gettext-tools\config.h.msvc Wed Oct 18 23:51:07 2006
@@ -1,5 +1,6 @@
/* config.h.in. Generated from configure.ac by autoheader. */
+#define EXEEXT '.exe'
/* Default value for alignment of strings in .mo file. */
#define DEFAULT_OUTPUT_ALIGNMENT 1
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\addext.c gettext-0.15-modified\gettext-tools\lib\addext.c
--- gettext-0.15\gettext-tools\lib\addext.c Mon Apr 24 13:17:08 2006
+++ gettext-0.15-modified\gettext-tools\lib\addext.c Sat Oct 14 00:03:13 2006
@@ -43,7 +43,9 @@
# include <strings.h>
#endif
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include "basename.h"
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\clean-temp.c gettext-0.15-modified\gettext-tools\lib\clean-temp.c
--- gettext-0.15\gettext-tools\lib\clean-temp.c Mon Jul 03 17:13:08 2006
+++ gettext-0.15-modified\gettext-tools\lib\clean-temp.c Sat Oct 14 00:04:01 2006
@@ -28,7 +28,10 @@
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include "error.h"
#include "fatal-signal.h"
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\copy-file.c gettext-0.15-modified\gettext-tools\lib\copy-file.c
--- gettext-0.15\gettext-tools\lib\copy-file.c Mon Apr 24 13:17:08 2006
+++ gettext-0.15-modified\gettext-tools\lib\copy-file.c Sat Oct 14 00:05:52 2006
@@ -28,7 +28,10 @@
#include <fcntl.h>
#include <stddef.h>
#include <sys/stat.h>
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#if HAVE_UTIME || HAVE_UTIMES
# if HAVE_UTIME_H
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\execute.c gettext-0.15-modified\gettext-tools\lib\execute.c
--- gettext-0.15\gettext-tools\lib\execute.c Mon Apr 24 13:17:08 2006
+++ gettext-0.15-modified\gettext-tools\lib\execute.c Sat Oct 14 00:07:17 2006
@@ -29,7 +29,10 @@
#include <stdbool.h>
#include <stdlib.h>
#include <signal.h>
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include "error.h"
#include "exit.h"
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\fatal-signal.c gettext-0.15-modified\gettext-tools\lib\fatal-signal.c
--- gettext-0.15\gettext-tools\lib\fatal-signal.c Mon Apr 24 13:17:08 2006
+++ gettext-0.15-modified\gettext-tools\lib\fatal-signal.c Sat Oct 14 00:07:42 2006
@@ -27,7 +27,10 @@
#include <stdbool.h>
#include <stdlib.h>
#include <signal.h>
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include "xalloc.h"
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\findprog.c gettext-0.15-modified\gettext-tools\lib\findprog.c
--- gettext-0.15\gettext-tools\lib\findprog.c Mon Apr 24 13:17:08 2006
+++ gettext-0.15-modified\gettext-tools\lib\findprog.c Sat Oct 14 00:08:03 2006
@@ -27,7 +27,10 @@
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include "xalloc.h"
#include "pathname.h"
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\getopt_.h gettext-0.15-modified\gettext-tools\lib\getopt_.h
--- gettext-0.15\gettext-tools\lib\getopt_.h Mon Apr 24 13:17:08 2006
+++ gettext-0.15-modified\gettext-tools\lib\getopt_.h Fri Oct 13 23:13:47 2006
@@ -42,7 +42,9 @@
#if defined __GETOPT_PREFIX && !defined __need_getopt
# include <stdlib.h>
# include <stdio.h>
+#ifdef HAVE_UNISTD_H
# include <unistd.h>
+#endif
# undef __need_getopt
# undef getopt
# undef getopt_long
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\gettext.h gettext-0.15-modified\gettext-tools\lib\gettext.h
--- gettext-0.15\gettext-tools\lib\gettext.h Fri Jun 09 22:29:10 2006
+++ gettext-0.15-modified\gettext-tools\lib\gettext.h Sat Oct 14 00:28:04 2006
@@ -142,8 +142,10 @@
#include <string.h>
+#ifndef _MSC_VER
#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
(__GNUC__ >= 3 || defined __cplusplus)
+#endif
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
#include <stdlib.h>
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\javacomp.c gettext-0.15-modified\gettext-tools\lib\javacomp.c
--- gettext-0.15\gettext-tools\lib\javacomp.c Tue Jul 11 14:08:16 2006
+++ gettext-0.15-modified\gettext-tools\lib\javacomp.c Sat Oct 14 00:08:25 2006
@@ -29,7 +29,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
+
#include <sys/types.h>
#include <sys/stat.h>
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\mkdtemp.c gettext-0.15-modified\gettext-tools\lib\mkdtemp.c
--- gettext-0.15\gettext-tools\lib\mkdtemp.c Fri Jun 30 16:17:32 2006
+++ gettext-0.15-modified\gettext-tools\lib\mkdtemp.c Sat Oct 14 00:10:09 2006
@@ -46,7 +46,9 @@
# include <inttypes.h>
#endif
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#if HAVE_GETTIMEOFDAY || _LIBC
# if HAVE_SYS_TIME_H || _LIBC
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\pathmax.h gettext-0.15-modified\gettext-tools\lib\pathmax.h
--- gettext-0.15\gettext-tools\lib\pathmax.h Mon Apr 24 13:17:08 2006
+++ gettext-0.15-modified\gettext-tools\lib\pathmax.h Sat Oct 14 00:05:25 2006
@@ -18,7 +18,9 @@
#ifndef _PATHMAX_H
# define _PATHMAX_H
+#ifdef HAVE_UNISTD_H
# include <unistd.h>
+#endif
/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
PATH_MAX but might cause redefinition warnings when sys/param.h is
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\pipe.c gettext-0.15-modified\gettext-tools\lib\pipe.c
--- gettext-0.15\gettext-tools\lib\pipe.c Mon Apr 24 13:17:08 2006
+++ gettext-0.15-modified\gettext-tools\lib\pipe.c Sat Oct 14 00:06:14 2006
@@ -28,7 +28,10 @@
#include <fcntl.h>
#include <stdlib.h>
#include <signal.h>
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include "error.h"
#include "exit.h"
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\pipe.h gettext-0.15-modified\gettext-tools\lib\pipe.h
--- gettext-0.15\gettext-tools\lib\pipe.h Mon Apr 24 13:17:08 2006
+++ gettext-0.15-modified\gettext-tools\lib\pipe.h Sat Oct 14 00:06:34 2006
@@ -21,7 +21,11 @@
/* Get pid_t. */
#include <stdlib.h>
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
+
#include <sys/types.h>
#include <stdbool.h>
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\progreloc.c gettext-0.15-modified\gettext-tools\lib\progreloc.c
--- gettext-0.15\gettext-tools\lib\progreloc.c Wed May 17 12:12:44 2006
+++ gettext-0.15-modified\gettext-tools\lib\progreloc.c Sat Oct 21 23:39:19 2006
@@ -313,7 +313,7 @@
the filenames may have undergone a case conversion since
they were packaged. In other words, EXEEXT may be ".exe"
on one system and ".EXE" on another. */
- static const char exeext[] = EXEEXT;
+ static const char exeext = EXEEXT;
const char *s1 = argv0 + argv0_len - exeext_len;
const char *s2 = exeext;
for (; *s1 != '\0'; s1++, s2++)
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\safe-read.c gettext-0.15-modified\gettext-tools\lib\safe-read.c
--- gettext-0.15\gettext-tools\lib\safe-read.c Mon Apr 24 13:17:08 2006
+++ gettext-0.15-modified\gettext-tools\lib\safe-read.c Sat Oct 14 00:09:37 2006
@@ -29,7 +29,10 @@
/* Get ssize_t. */
#include <sys/types.h>
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <errno.h>
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\unsetenv.c gettext-0.15-modified\gettext-tools\lib\unsetenv.c
--- gettext-0.15\gettext-tools\lib\unsetenv.c Sat Jun 17 17:51:52 2006
+++ gettext-0.15-modified\gettext-tools\lib\unsetenv.c Sat Oct 14 00:10:34 2006
@@ -27,7 +27,10 @@
#include <stdlib.h>
#include <string.h>
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#if !_LIBC
# define __environ environ
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\wait-process.h gettext-0.15-modified\gettext-tools\lib\wait-process.h
--- gettext-0.15\gettext-tools\lib\wait-process.h Mon Apr 24 13:17:08 2006
+++ gettext-0.15-modified\gettext-tools\lib\wait-process.h Sat Oct 14 00:06:56 2006
@@ -21,7 +21,11 @@
/* Get pid_t. */
#include <stdlib.h>
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
+
#include <sys/types.h>
#include <stdbool.h>
diff -riwBu -Xex gettext-0.15\gettext-tools\lib\xvasprintf.c gettext-0.15-modified\gettext-tools\lib\xvasprintf.c
--- gettext-0.15\gettext-tools\lib\xvasprintf.c Tue May 09 19:01:24 2006
+++ gettext-0.15-modified\gettext-tools\lib\xvasprintf.c Wed Oct 18 22:21:39 2006
@@ -22,6 +22,13 @@
/* Specification. */
#include "xvasprintf.h"
+#ifndef va_copy
+
+/* Assumes typical stack machine */
+#define va_copy(dst, src) ((void)((dst) = (src)))
+
+#endif
+
#include <errno.h>
#include <limits.h>
#include <string.h>
diff -riwBu -Xex gettext-0.15\gettext-tools\src\Makefile.msvc gettext-0.15-modified\gettext-tools\src\Makefile.msvc
--- gettext-0.15\gettext-tools\src\Makefile.msvc Wed Mar 29 13:29:20 2006
+++ gettext-0.15-modified\gettext-tools\src\Makefile.msvc Fri Oct 20 12:20:56 2006
@@ -122,14 +122,18 @@
write-stringtable.obj \
write-po.obj \
msgl-ascii.obj \
+ msgl-check.obj \
msgl-iconv.obj \
msgl-equal.obj \
msgl-cat.obj \
msgl-english.obj \
+ msgl-fsearch.obj \
file-list.obj \
msgl-charset.obj \
po-time.obj \
- plural.obj \
+ po-xerror.obj \
+ plural-exp.obj \
+ plural-eval.obj \
plural-table.obj \
format.obj \
format-c.obj \
@@ -224,6 +228,9 @@
msgl-ascii.obj : msgl-ascii.c
$(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c msgl-ascii.c
+msgl-check.obj : msgl-check.c
+ $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c msgl-check.c
+
msgl-iconv.obj : msgl-iconv.c
$(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c msgl-iconv.c
@@ -245,8 +252,11 @@
po-time.obj : po-time.c
$(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c po-time.c
-plural.obj : plural.c
- $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c plural.c
+po-xerror.obj : po-xerror.c
+ $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c po-xerror.c
+
+plural-exp.obj : plural-exp.c
+ $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c plural-exp.c
plural-table.obj : plural-table.c
$(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c plural-table.c
@@ -322,6 +332,7 @@
# gettextsrc.dll and gettextsrc.lib are created together.
gettextsrc.lib : ..\windows\gettextsrc.def $(OBJECTS) $(RESOURCES)
$(CC) $(MFLAGS) $(DEBUGFLAGS) -LD ..\windows\gettextsrc.def $(OBJECTS) ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(RESOURCES) -Fegettextsrc.dll
+ mt.exe -manifest gettextsrc.dll.manifest -outputresource:gettextsrc.dll;2
gettextsrc.res : ../windows/gettextsrc.rc
rc -Fo gettextsrc.res ../windows/gettextsrc.rc
@@ -488,51 +499,67 @@
msgcmp.exe : $(msgcmp_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(msgcmp_OBJECTS) gettextsrc.lib ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Femsgcmp.exe
+ mt.exe -manifest msgcmp.exe.manifest -outputresource:msgcmp.exe;1
msgfmt.exe : $(msgfmt_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(msgfmt_OBJECTS) gettextsrc.lib ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Femsgfmt.exe
+ mt.exe -manifest msgfmt.exe.manifest -outputresource:msgfmt.exe;1
msgmerge.exe : $(msgmerge_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(msgmerge_OBJECTS) gettextsrc.lib ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Femsgmerge.exe
+ mt.exe -manifest msgmerge.exe.manifest -outputresource:msgmerge.exe;1
msgunfmt.exe : $(msgunfmt_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(msgunfmt_OBJECTS) gettextsrc.lib ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Femsgunfmt.exe
+ mt.exe -manifest msgunfmt.exe.manifest -outputresource:msgunfmt.exe;1
xgettext.exe : $(xgettext_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(xgettext_OBJECTS) ..\libuniname\uniname.lib gettextsrc.lib ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Fexgettext.exe
+ mt.exe -manifest xgettext.exe.manifest -outputresource:xgettext.exe;1
msgattrib.exe : $(msgattrib_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(msgattrib_OBJECTS) gettextsrc.lib ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Femsgattrib.exe
+ mt.exe -manifest msgattrib.exe.manifest -outputresource:msgattrib.exe;1
msgcat.exe : $(msgcat_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(msgcat_OBJECTS) gettextsrc.lib ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Femsgcat.exe
+ mt.exe -manifest msgcat.exe.manifest -outputresource:msgcat.exe;1
msgcomm.exe : $(msgcomm_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(msgcomm_OBJECTS) gettextsrc.lib ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Femsgcomm.exe
+ mt.exe -manifest msgcomm.exe.manifest -outputresource:msgcomm.exe;1
msgconv.exe : $(msgconv_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(msgconv_OBJECTS) gettextsrc.lib ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Femsgconv.exe
+ mt.exe -manifest msgconv.exe.manifest -outputresource:msgconv.exe;1
msgen.exe : $(msgen_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(msgen_OBJECTS) gettextsrc.lib ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Femsgen.exe
+ mt.exe -manifest msgen.exe.manifest -outputresource:msgen.exe;1
msgexec.exe : $(msgexec_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(msgexec_OBJECTS) gettextsrc.lib ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Femsgexec.exe
+ mt.exe -manifest msgexec.exe.manifest -outputresource:msgexec.exe;1
msgfilter.exe : $(msgfilter_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(msgfilter_OBJECTS) gettextsrc.lib ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Femsgfilter.exe
+ mt.exe -manifest msgfilter.exe.manifest -outputresource:msgfilter.exe;1
msggrep.exe : $(msggrep_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(msggrep_OBJECTS) ..\libgrep\grep.lib gettextsrc.lib ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Femsggrep.exe
+ mt.exe -manifest msggrep.exe.manifest -outputresource:msggrep.exe;1
msginit.exe : $(msginit_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(msginit_OBJECTS) ..\intl\localename.obj gettextsrc.lib ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Femsginit.exe
+ mt.exe -manifest msginit.exe.manifest -outputresource:msginit.exe;1
msguniq.exe : $(msguniq_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(msguniq_OBJECTS) gettextsrc.lib ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Femsguniq.exe
+ mt.exe -manifest msguniq.exe.manifest -outputresource:msguniq.exe;1
recode-sr-latin.exe : $(recode_sr_latin_OBJECTS)
$(CC) $(MFLAGS) $(DEBUGFLAGS) $(recode_sr_latin_OBJECTS) ..\lib\gettextlib.lib ..\intl\intl.lib $(libdir)\iconv.lib $(LDADD) -Ferecode-sr-latin.exe
+ mt.exe -manifest recode-sr-latin.exe.manifest -outputresource:recode-sr-latin.exe;1
# Compilation rules for gettextpo.lib objects, with $(PICFLAGS).
diff -riwBu -Xex gettext-0.15\gettext-tools\src\msgattrib.c gettext-0.15-modified\gettext-tools\src\msgattrib.c
--- gettext-0.15\gettext-tools\src\msgattrib.c Mon Apr 03 13:27:40 2006
+++ gettext-0.15-modified\gettext-tools\src\msgattrib.c Wed Oct 18 23:53:18 2006
@@ -147,7 +147,9 @@
/* Set the text message domain. */
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
+#ifdef BISON_LOCALEDIR
bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR));
+#endif
textdomain (PACKAGE);
/* Ensure that write errors on stdout are detected. */
diff -riwBu -Xex gettext-0.15\gettext-tools\src\msgcat.c gettext-0.15-modified\gettext-tools\src\msgcat.c
--- gettext-0.15\gettext-tools\src\msgcat.c Mon Apr 03 13:27:40 2006
+++ gettext-0.15-modified\gettext-tools\src\msgcat.c Wed Oct 18 23:53:18 2006
@@ -119,7 +119,9 @@
/* Set the text message domain. */
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
+#ifdef BISON_LOCALEDIR
bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR));
+#endif
textdomain (PACKAGE);
/* Ensure that write errors on stdout are detected. */
diff -riwBu -Xex gettext-0.15\gettext-tools\src\msgcmp.c gettext-0.15-modified\gettext-tools\src\msgcmp.c
--- gettext-0.15\gettext-tools\src\msgcmp.c Mon Apr 03 13:27:40 2006
+++ gettext-0.15-modified\gettext-tools\src\msgcmp.c Wed Oct 18 23:53:18 2006
@@ -90,7 +90,9 @@
/* Set the text message domain. */
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
+#ifdef BISON_LOCALEDIR
bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR));
+#endif
textdomain (PACKAGE);
/* Ensure that write errors on stdout are detected. */
diff -riwBu -Xex gettext-0.15\gettext-tools\src\msgcomm.c gettext-0.15-modified\gettext-tools\src\msgcomm.c
--- gettext-0.15\gettext-tools\src\msgcomm.c Mon Apr 03 13:27:40 2006
+++ gettext-0.15-modified\gettext-tools\src\msgcomm.c Wed Oct 18 23:53:18 2006
@@ -121,7 +121,9 @@
/* Set the text message domain. */
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
+#ifdef BISON_LOCALEDIR
bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR));
+#endif
textdomain (PACKAGE);
/* Ensure that write errors on stdout are detected. */
diff -riwBu -Xex gettext-0.15\gettext-tools\src\msgconv.c gettext-0.15-modified\gettext-tools\src\msgconv.c
--- gettext-0.15\gettext-tools\src\msgconv.c Mon Apr 03 13:27:42 2006
+++ gettext-0.15-modified\gettext-tools\src\msgconv.c Wed Oct 18 23:53:18 2006
@@ -111,7 +111,9 @@
/* Set the text message domain. */
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
+#ifdef BISON_LOCALEDIR
bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR));
+#endif
textdomain (PACKAGE);
/* Ensure that write errors on stdout are detected. */
diff -riwBu -Xex gettext-0.15\gettext-tools\src\msgen.c gettext-0.15-modified\gettext-tools\src\msgen.c
--- gettext-0.15\gettext-tools\src\msgen.c Mon Apr 03 13:27:42 2006
+++ gettext-0.15-modified\gettext-tools\src\msgen.c Wed Oct 18 23:53:18 2006
@@ -101,10 +100,11 @@
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
#endif
-
/* Set the text message domain. */
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
+#ifdef BISON_LOCALEDIR
bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR));
+#endif
textdomain (PACKAGE);
/* Ensure that write errors on stdout are detected. */
diff -riwBu -Xex gettext-0.15\gettext-tools\src\msgexec.c gettext-0.15-modified\gettext-tools\src\msgexec.c
--- gettext-0.15\gettext-tools\src\msgexec.c Tue May 02 14:28:34 2006
+++ gettext-0.15-modified\gettext-tools\src\msgexec.c Wed Oct 18 23:53:18 2006
@@ -29,7 +29,10 @@
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include "closeout.h"
#include "dir-list.h"
@@ -114,7 +117,9 @@
/* Set the text message domain. */
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
+#ifdef BISON_LOCALEDIR
bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR));
+#endif
textdomain (PACKAGE);
/* Ensure that write errors on stdout are detected. */
diff -riwBu -Xex gettext-0.15\gettext-tools\src\msgfilter.c gettext-0.15-modified\gettext-tools\src\msgfilter.c
--- gettext-0.15\gettext-tools\src\msgfilter.c Mon May 22 14:15:32 2006
+++ gettext-0.15-modified\gettext-tools\src\msgfilter.c Wed Oct 18 23:53:18 2006
@@ -35,7 +35,10 @@
# include <sys/time.h>
#endif
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
+
#if defined _MSC_VER || defined __MINGW32__
# include <io.h>
#endif
@@ -164,7 +167,9 @@
/* Set the text message domain. */
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
+#ifdef BISON_LOCALEDIR
bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR));
+#endif
textdomain (PACKAGE);
/* Ensure that write errors on stdout are detected. */
diff -riwBu -Xex gettext-0.15\gettext-tools\src\msgfmt.c gettext-0.15-modified\gettext-tools\src\msgfmt.c
--- gettext-0.15\gettext-tools\src\msgfmt.c Tue May 02 14:28:34 2006
+++ gettext-0.15-modified\gettext-tools\src\msgfmt.c Wed Oct 18 23:53:19 2006
@@ -28,6 +28,10 @@
#include <string.h>
#include <locale.h>
+#ifdef _MSC_VER
+#define ENDIANNESS 0
+#endif
+
#include "closeout.h"
#include "dir-list.h"
#include "error.h"
@@ -217,7 +221,9 @@
/* Set the text message domain. */
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
+#ifdef BISON_LOCALEDIR
bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR));
+#endif
textdomain (PACKAGE);
/* Ensure that write errors on stdout are detected. */
diff -riwBu -Xex gettext-0.15\gettext-tools\src\msggrep.c gettext-0.15-modified\gettext-tools\src\msggrep.c
--- gettext-0.15\gettext-tools\src\msggrep.c Mon Apr 24 13:17:08 2006
+++ gettext-0.15-modified\gettext-tools\src\msggrep.c Wed Oct 18 23:53:19 2006
@@ -31,7 +31,10 @@
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
+
#if defined _MSC_VER || defined __MINGW32__
# include <io.h>
#endif
@@ -161,7 +164,9 @@
/* Set the text message domain. */
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
+#ifdef BISON_LOCALEDIR
bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR));
+#endif
textdomain (PACKAGE);
/* Ensure that write errors on stdout are detected. */
diff -riwBu -Xex gettext-0.15\gettext-tools\src\msginit.c gettext-0.15-modified\gettext-tools\src\msginit.c
--- gettext-0.15\gettext-tools\src\msginit.c Fri Jun 30 16:34:40 2006
+++ gettext-0.15-modified\gettext-tools\src\msginit.c Wed Oct 18 23:53:19 2006
@@ -37,7 +37,9 @@
# include <pwd.h>
#endif
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#if HAVE_DIRENT_H
# include <dirent.h>
@@ -160,7 +162,9 @@
/* Set the text message domain. */
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
+#ifdef BISON_LOCALEDIR
bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR));
+#endif
textdomain (PACKAGE);
/* Ensure that write errors on stdout are detected. */
diff -riwBu -Xex gettext-0.15\gettext-tools\src\msgmerge.c gettext-0.15-modified\gettext-tools\src\msgmerge.c
--- gettext-0.15\gettext-tools\src\msgmerge.c Mon Apr 03 13:27:42 2006
+++ gettext-0.15-modified\gettext-tools\src\msgmerge.c Wed Oct 18 23:53:19 2006
@@ -170,7 +170,9 @@
/* Set the text message domain. */
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
+#ifdef BISON_LOCALEDIR
bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR));
+#endif
textdomain (PACKAGE);
/* Ensure that write errors on stdout are detected. */
diff -riwBu -Xex gettext-0.15\gettext-tools\src\msgunfmt.c gettext-0.15-modified\gettext-tools\src\msgunfmt.c
--- gettext-0.15\gettext-tools\src\msgunfmt.c Mon Apr 03 13:27:42 2006
+++ gettext-0.15-modified\gettext-tools\src\msgunfmt.c Wed Oct 18 23:53:19 2006
@@ -130,7 +130,9 @@
/* Set the text message domain. */
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
+#ifdef BISON_LOCALEDIR
bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR));
+#endif
textdomain (PACKAGE);
/* Ensure that write errors on stdout are detected. */
diff -riwBu -Xex gettext-0.15\gettext-tools\src\msguniq.c gettext-0.15-modified\gettext-tools\src\msguniq.c
--- gettext-0.15\gettext-tools\src\msguniq.c Mon Apr 03 13:27:42 2006
+++ gettext-0.15-modified\gettext-tools\src\msguniq.c Wed Oct 18 23:53:19 2006
@@ -114,7 +114,9 @@
/* Set the text message domain. */
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
+#ifdef BISON_LOCALEDIR
bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR));
+#endif
textdomain (PACKAGE);
/* Ensure that write errors on stdout are detected. */
diff -riwBu -Xex gettext-0.15\gettext-tools\src\write-mo.c gettext-0.15-modified\gettext-tools\src\write-mo.c
--- gettext-0.15\gettext-tools\src\write-mo.c Thu Oct 06 13:08:06 2005
+++ gettext-0.15-modified\gettext-tools\src\write-mo.c Sat Oct 14 01:02:50 2006
@@ -38,7 +38,12 @@
#include "gmo.h"
#include "hash-string.h"
+#ifndef _MSC_VER
#include "byteswap.h"
+#else
+#include "byteswap_.h"
+#endif
+
#include "error.h"
#include "hash.h"
#include "message.h"
diff -riwBu -Xex gettext-0.15\gettext-tools\src\xgettext.c gettext-0.15-modified\gettext-tools\src\xgettext.c
--- gettext-0.15\gettext-tools\src\xgettext.c Fri Jun 09 22:27:24 2006
+++ gettext-0.15-modified\gettext-tools\src\xgettext.c Wed Oct 18 23:53:19 2006
@@ -293,7 +293,9 @@
/* Set the text message domain. */
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
+#ifdef BISON_LOCALEDIR
bindtextdomain ("bison-runtime", relocate (BISON_LOCALEDIR));
+#endif
textdomain (PACKAGE);
/* Ensure that write errors on stdout are detected. */
diff -riwBu -Xex gettext-0.15\gettext-tools\windows\gettextlib.def gettext-0.15-modified\gettext-tools\windows\gettextlib.def
--- gettext-0.15\gettext-tools\windows\gettextlib.def Tue Feb 08 13:26:08 2005
+++ gettext-0.15-modified\gettext-tools\windows\gettextlib.def Wed Oct 18 22:18:21 2006
@@ -40,7 +40,6 @@
create_pipe_bidi
create_pipe_in
create_pipe_out
-delete_hash
error
error_at_line
error_one_per_line
@@ -49,7 +48,6 @@
execute_csharp_program
execute_java_class
find_backup_file_name
-find_entry
find_in_path
freesa
fstrcmp
@@ -61,9 +59,6 @@
gnu_basename
gnu_mbswidth
gnu_stpncpy
-init_hash
-insert_entry
-iterate_table
locale_charset
mallocsa
maybe_print_progname
@@ -92,8 +87,6 @@
shell_quote_copy
shell_quote_length
stpcpy
-strcasecmp
-strncasecmp
u8_possible_linebreaks
u8_width_linebreaks
uc_width
@@ -110,3 +103,19 @@
xrealloc
xsetenv
xstrdup
+cleanup_temp_dir
+unregister_temp_subdir
+unregister_temp_file
+register_temp_subdir
+register_temp_file
+create_temp_dir
+hash_destroy
+hash_iterate
+hash_init
+proper_name
+proper_name_utf8
+hash_insert_entry
+hash_find_entry
+hash_set_value
+hash_iterate_modify
+iconv_string
diff -riwBu -Xex gettext-0.15\gettext-tools\windows\gettextsrc.def gettext-0.15-modified\gettext-tools\windows\gettextsrc.def
--- gettext-0.15\gettext-tools\windows\gettextsrc.def Sat Feb 12 21:07:36 2005
+++ gettext-0.15-modified\gettext-tools\windows\gettextsrc.def Wed Oct 18 22:19:25 2006
@@ -65,7 +65,6 @@
dir_list_nth
dir_list_restore
dir_list_save_reset
-extract_plural_expression
get_sysdep_c_format_directives
iconv_message_list
iconv_msgdomain_list
@@ -92,7 +91,6 @@
message_list_list_append
message_list_list_append_list
message_list_list_search
-message_list_list_search_fuzzy
message_list_prepend
message_list_remove_if_not
message_list_search
@@ -120,7 +118,6 @@
msgdomain_list_sort_by_msgid
msgdomain_list_sublist
open_po_file
-parse_plural_expression
po_callback_comment
po_callback_comment_filepos
po_callback_domain
@@ -157,3 +154,16 @@
string_list_init
string_list_join
string_list_member
+check_message_list
+parse_plural_expression
+plural_eval
+po_xerror
+extract_plural_expression
+message_fuzzy_index_alloc
+fuzzy_search_goal_function
+message_list_list_free
+po_charset_character_iterator
+get_python_format_unnamed_arg_count
+check_message
+textmode_xerror
+textmode_xerror2

View File

@ -1,131 +0,0 @@
diff -riwBu -Xex libiconv-1.11\config.h.msvc libiconv-1.11-modified\config.h.msvc
--- libiconv-1.11\config.h.msvc Wed Jul 19 21:10:22 2006
+++ libiconv-1.11-modified\config.h.msvc Sat Oct 14 01:36:15 2006
@@ -1,5 +1,11 @@
/* config.h.in. Generated from configure.ac by autoheader. */
+#define EXEEXT '.exe'
+
+typedef __int8 uint8_t;
+typedef __int16 uint16_t;
+typedef __int32 uint32_t;
+
/* Define to the number of bits in type 'int16_t'. */
#undef BITSIZEOF_INT16_T
diff -riwBu -Xex libiconv-1.11\lib\Makefile.msvc libiconv-1.11-modified\lib\Makefile.msvc
--- libiconv-1.11\lib\Makefile.msvc Thu Jan 06 18:37:08 2005
+++ libiconv-1.11-modified\lib\Makefile.msvc Fri Oct 20 12:25:08 2006
@@ -121,6 +121,7 @@
# iconv.dll and iconv.lib are created together.
iconv.lib : $(OBJECTS) $(RESOURCES)
$(CC) $(MFLAGS) $(DEBUGFLAGS) -LD $(OBJECTS) $(RESOURCES) -Feiconv.dll
+ mt.exe -manifest iconv.dll.manifest -outputresource:iconv.dll;2
iconv.res : $(srcdir)/../windows/iconv.rc
rc -Fo iconv.res $(srcdir)/../windows/iconv.rc
diff -riwBu -Xex libiconv-1.11\libcharset\lib\Makefile.msvc libiconv-1.11-modified\libcharset\lib\Makefile.msvc
--- libiconv-1.11\libcharset\lib\Makefile.msvc Thu Jan 06 18:46:04 2005
+++ libiconv-1.11-modified\libcharset\lib\Makefile.msvc Sat Oct 21 23:23:55 2006
@@ -116,6 +116,7 @@
# charset.dll and charset.lib are created together.
charset.lib : $(OBJECTS) $(RESOURCES)
$(CC) $(MFLAGS) $(DEBUGFLAGS) -LD $(OBJECTS) $(RESOURCES) -Fecharset.dll
+ mt.exe -manifest charset.dll.manifest -outputresource:charset.dll;2
charset.res : $(srcdir)/../windows/charset.rc
rc -Fo charset.res $(srcdir)/../windows/charset.rc
diff -riwBu -Xex libiconv-1.11\src\Makefile.msvc libiconv-1.11-modified\src\Makefile.msvc
--- libiconv-1.11\src\Makefile.msvc Sun May 18 13:27:30 2003
+++ libiconv-1.11-modified\src\Makefile.msvc Fri Oct 20 12:24:14 2006
@@ -93,18 +93,29 @@
SHELL = /bin/sh
+!if $(NO_NLS)
all : iconv_no_i18n.exe iconv.exe
+!else
+all : iconv.exe
+!endif
# This is the temporary iconv executable, without internationalization.
+
+!if $(NO_NLS)
+
iconv_no_i18n.exe : $(srcdir)/iconv_no_i18n.c $(srcdir)/iconv.c ../srclib/icrt.lib ../lib/iconv.lib
$(CC) $(INCLUDES) -I..\lib $(CFLAGS) -DINSTALLPREFIX=\"$(IIprefix)\" -DINSTALLDIR=\"$(IIbindir)\" $(srcdir)/iconv_no_i18n.c ../srclib/icrt.lib ../lib/iconv.lib -Feiconv_no_i18n.exe
+ mt.exe -manifest iconv_no_i18n.exe.manifest -outputresource:iconv_no_i18n.exe;1
$(RM) iconv_no_i18n.obj
!if $(DLL)
copy ..\lib\iconv.dll iconv.dll
!endif
+!endif
+
iconv.exe : $(srcdir)/iconv.c ../srclib/icrt.lib ../lib/iconv.lib
$(CC) $(INCLUDES) -I..\lib $(CFLAGS) -DINSTALLPREFIX=\"$(IIprefix)\" -DINSTALLDIR=\"$(IIbindir)\" $(srcdir)/iconv.c ../srclib/icrt.lib $(LIBINTL) ../lib/iconv.lib -Feiconv.exe
+ mt.exe -manifest iconv.exe.manifest -outputresource:iconv.exe;1
$(RM) iconv.obj
!if $(DLL)
copy ..\lib\iconv.dll iconv.dll
diff -riwBu -Xex libiconv-1.11\srclib\Makefile.msvc libiconv-1.11-modified\srclib\Makefile.msvc
--- libiconv-1.11\srclib\Makefile.msvc Sat Jan 24 11:11:24 2004
+++ libiconv-1.11-modified\srclib\Makefile.msvc Fri Oct 13 22:54:03 2006
@@ -90,7 +90,7 @@
xmalloc.obj xstrdup.obj \
\
relocatable.obj \
- setenv.obj unsetenv.obj
+ setenv.obj unsetenv.obj width.obj
all : icrt.lib
@@ -120,6 +120,9 @@
unsetenv.obj : unsetenv.c
$(CC) $(INCLUDES) $(CFLAGS) -c unsetenv.c
+
+width.obj : width.c
+ $(CC) $(INCLUDES) $(CFLAGS) -c width.c
icrt.lib : $(OBJECTS)
-$(RM) icrt.lib
diff -riwBu -Xex libiconv-1.11\srclib\progreloc.c libiconv-1.11-modified\srclib\progreloc.c
--- libiconv-1.11\srclib\progreloc.c Wed May 17 12:12:44 2006
+++ libiconv-1.11-modified\srclib\progreloc.c Fri Oct 13 22:23:31 2006
@@ -313,7 +313,7 @@
the filenames may have undergone a case conversion since
they were packaged. In other words, EXEEXT may be ".exe"
on one system and ".EXE" on another. */
- static const char exeext[] = EXEEXT;
+ static const char exeext = EXEEXT;
const char *s1 = argv0 + argv0_len - exeext_len;
const char *s2 = exeext;
for (; *s1 != '\0'; s1++, s2++)
diff -riwBu -Xex libiconv-1.11\srclib\unitypes.h libiconv-1.11-modified\srclib\unitypes.h
--- libiconv-1.11\srclib\unitypes.h Thu May 19 18:58:24 2005
+++ libiconv-1.11-modified\srclib\unitypes.h Fri Oct 13 22:37:58 2006
@@ -20,7 +20,9 @@
#define _UNITYPES_H
/* Get uint8_t, uint16_t, uint32_t. */
+#ifdef FULL_PATH_STDINT_H
#include <stdint.h>
+#endif
/* Type representing a Unicode character. */
typedef uint32_t ucs4_t;
diff -riwBu -Xex libiconv-1.11\srclib\unsetenv.c libiconv-1.11-modified\srclib\unsetenv.c
--- libiconv-1.11\srclib\unsetenv.c Sat Jun 17 17:51:52 2006
+++ libiconv-1.11-modified\srclib\unsetenv.c Fri Oct 13 22:24:29 2006
@@ -27,7 +27,10 @@
#include <stdlib.h>
#include <string.h>
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#if !_LIBC
# define __environ environ