aboutsummaryrefslogtreecommitdiff
path: root/xkbcomp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-12 18:20:04 +0000
committermarha <marha@users.sourceforge.net>2009-07-12 18:20:04 +0000
commitda8fe31a7ba4acf109097d5696ad0145b991cdfd (patch)
tree1c74d6f075702a73e557872f2a6f020ea4eb5432 /xkbcomp
parent6590f805a12779909cb8504c230fa367148fe38c (diff)
parent529dcfd0858d75cb3c87c73cb0f81dd20bbb9230 (diff)
downloadvcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.gz
vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.bz2
vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.zip
Changes for VC compilation
Diffstat (limited to 'xkbcomp')
-rw-r--r--xkbcomp/keycodes.c2
-rw-r--r--xkbcomp/listing.c9
-rw-r--r--xkbcomp/makefile51
-rw-r--r--xkbcomp/misc.c2
-rw-r--r--xkbcomp/xkbcomp.c7
-rw-r--r--xkbcomp/xkbparse.c4
-rw-r--r--xkbcomp/xkbpath.c2
7 files changed, 74 insertions, 3 deletions
diff --git a/xkbcomp/keycodes.c b/xkbcomp/keycodes.c
index a86592e4d..6c135a01c 100644
--- a/xkbcomp/keycodes.c
+++ b/xkbcomp/keycodes.c
@@ -264,6 +264,8 @@ InitKeyNamesInfo(KeyNamesInfo *info)
info->name= NULL;
info->leds= NULL;
info->aliases= NULL;
+ info->fileID=-1;
+ info->merge=0;
ClearKeyNamesInfo(info);
info->errorCount= 0;
return;
diff --git a/xkbcomp/listing.c b/xkbcomp/listing.c
index cc887b80d..0e9bbe1ff 100644
--- a/xkbcomp/listing.c
+++ b/xkbcomp/listing.c
@@ -78,6 +78,7 @@ SOFTWARE.
#include <sys/types.h>
#include <sys/stat.h>
#include <X11/keysym.h>
+#include <X11/Xwindows.h>
#if defined(sgi)
#include <malloc.h>
@@ -142,6 +143,14 @@ SOFTWARE.
#include "tokens.h"
#include <X11/extensions/XKBgeom.h>
+#ifndef S_ISDIR
+# if defined(_S_IFMT) && defined(_S_IFDIR)
+# define S_ISDIR(a) (((a) & _S_IFMT) == _S_IFDIR)
+# else
+# define S_ISDIR(a) (((a) & S_IFMT) == S_IFDIR)
+# endif
+#endif
+
#define lowbit(x) ((x) & (-(x)))
static int szListing= 0;
diff --git a/xkbcomp/makefile b/xkbcomp/makefile
new file mode 100644
index 000000000..04e479186
--- /dev/null
+++ b/xkbcomp/makefile
@@ -0,0 +1,51 @@
+INCLUDELIBFILES = $(MHMAKECONF)\libx11\src\$(OBJDIR)\libx11.lib \
+ $(MHMAKECONF)\libx11\src\xkb\$(OBJDIR)\libxkb.lib \
+ $(MHMAKECONF)\libx11\src\xlibi18n\$(OBJDIR)\libi18n.lib \
+ $(MHMAKECONF)\libx11\modules\lc\xlocale\$(OBJDIR)\libxlocale.lib \
+ $(MHMAKECONF)\libx11\modules\lc\utf8\$(OBJDIR)\libxlcUTF8Load.lib \
+ $(MHMAKECONF)\libx11\modules\lc\def\$(OBJDIR)\libxlcDef.lib \
+ $(MHMAKECONF)\libx11\modules\om\generic\$(OBJDIR)\libxomGeneric.lib \
+ $(MHMAKECONF)\libx11\modules\lc\gen\$(OBJDIR)\liblcGenConvLoad.lib \
+ $(MHMAKECONF)\libx11\modules\im\ximcp\$(OBJDIR)\libximcp.lib \
+ $(MHMAKECONF)\libxcb\src\$(OBJDIR)\libxcb.lib \
+ $(MHMAKECONF)\libxau\$(OBJDIR)\libxau.lib \
+ $(MHMAKECONF)\libxkbfile\src\$(OBJDIR)\libxkbfile.lib
+
+LIBDIRS=$(dir $(INCLUDELIBFILES))
+
+load_makefile $(LIBDIRS:%$(OBJDIR)\=%makefile MAKESERVER=$(MAKESERVER) DEBUG=$(DEBUG);)
+
+WINAPP = xkbcomp
+
+DEFINES += DFLT_XKB_CONFIG_ROOT="\".\""
+
+CSRCS = action.c \
+ alias.c \
+ compat.c \
+ expr.c \
+ geometry.c \
+ indicators.c \
+ keycodes.c \
+ keymap.c \
+ keytypes.c \
+ listing.c \
+ misc.c \
+ parseutils.c \
+ symbols.c \
+ utils.c \
+ vmod.c \
+ xkbcomp.c \
+ xkbparse.c \
+ xkbpath.c \
+ xkbscan.c
+
+LINKLIBS += $(MHMAKECONF)\openssl\out32\libeay32.lib
+
+ifeq ($(DEBUG),1)
+LINKLIBS += $(MHMAKECONF)\freetype\lib\freetype200b8MT_D.lib \
+ $(MHMAKECONF)\pthreads\pthreadVC2d.lib
+else
+LINKLIBS += $(MHMAKECONF)\freetype\lib\freetype200b8MT.lib \
+ $(MHMAKECONF)\pthreads\pthreadVC2.lib
+endif
+
diff --git a/xkbcomp/misc.c b/xkbcomp/misc.c
index 91688f739..de6afb125 100644
--- a/xkbcomp/misc.c
+++ b/xkbcomp/misc.c
@@ -46,7 +46,7 @@ ProcessIncludeFile( IncludeStmt * stmt,
{
FILE *file;
XkbFile *rtrn,*mapToUse;
-char oldFile[1024];
+char oldFile[1024]="";
int oldLine = lineNum;
rtrn= XkbFindFileInCache(stmt->file,file_type,&stmt->path);
diff --git a/xkbcomp/xkbcomp.c b/xkbcomp/xkbcomp.c
index 111a7b371..419fccdda 100644
--- a/xkbcomp/xkbcomp.c
+++ b/xkbcomp/xkbcomp.c
@@ -438,7 +438,8 @@ register int i,tmp;
if (warningLevel>8) {
WARN1("Changing root directory to \"%s\"\n",rootDir);
}
- if ((chdir(rootDir)<0) && (warningLevel>0)) {
+ XkbAddDirectoryToPath(rootDir);
+ if (!XkbAddDirectoryToPath(rootDir) && (warningLevel>0)) {
WARN1("Couldn't change directory to \"%s\"\n",rootDir);
ACTION("Root directory (-R) option ignored\n");
rootDir= NULL;
@@ -919,8 +920,12 @@ Status status;
break;
}
#endif
+#ifdef _MSC_VER
+ outputFileFd= open(outputFile, O_WRONLY|O_CREAT|O_EXCL|binMode,_S_IREAD | _S_IWRITE);
+#else
outputFileFd= open(outputFile, O_WRONLY|O_CREAT|O_EXCL,
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH|binMode);
+#endif
if (outputFileFd<0) {
ERROR1("Cannot open \"%s\" to write keyboard description\n",
outputFile);
diff --git a/xkbcomp/xkbparse.c b/xkbcomp/xkbparse.c
index 75fc1b106..8c139ea02 100644
--- a/xkbcomp/xkbparse.c
+++ b/xkbcomp/xkbparse.c
@@ -419,14 +419,18 @@ YYID (i)
# define YYMALLOC malloc
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
+#ifndef _MSC_VER
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#endif
# endif
# endif
# ifndef YYFREE
# define YYFREE free
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
+#ifndef _MSC_VER
void free (void *); /* INFRINGES ON USER NAME SPACE */
+#endif
# endif
# endif
# endif
diff --git a/xkbcomp/xkbpath.c b/xkbcomp/xkbpath.c
index 0a7329c8e..5c71ba089 100644
--- a/xkbcomp/xkbpath.c
+++ b/xkbcomp/xkbpath.c
@@ -37,7 +37,7 @@
#include "xkbpath.h"
#ifndef DFLT_XKB_CONFIG_ROOT
-#define DFLT_XKB_CONFIG_ROOT "/usr/lib/X11/xkb"
+#define DFLT_XKB_CONFIG_ROOT "xkb"
#endif
#ifndef PATH_MAX