diff options
Diffstat (limited to 'libX11')
62 files changed, 1480 insertions, 78 deletions
diff --git a/libX11/cpprules.mak b/libX11/cpprules.mak new file mode 100644 index 000000000..9f485ac0d --- /dev/null +++ b/libX11/cpprules.mak @@ -0,0 +1,19 @@ +
+ifdef x11thislocaledir
+
+$(x11thislocaledir)\%: %.pre
+ cl /nologo /EP $< -DXCOMM\#\# > $@
+
+$(x11thislocaledir):
+ $(CREATEDIR)
+
+all: $(x11thislocaledir)
+endif
+
+$(eval $(locales:%=$(X11_LOCALEDATADIR)\%\XLC_LOCALE : %\XLC_LOCALE.pre$n cl /nologo /EP $$< -DXCOMM\#\# > $$@$n))
+
+$(eval $(locales:%=$(X11_LOCALEDATADIR)\%\Compose : %\Compose.pre$n cl /nologo /EP $$< -DXCOMM\#\# > $$@$n))
+
+$(eval $(locales:%=$(X11_LOCALEDATADIR)\%\XI18N_OBJS : $(X11_LOCALEDATADIR)\% %\XI18N_OBJS$n copy %\XI18N_OBJS $$@$n))
+
+$(eval $(locales:%=$(X11_LOCALEDATADIR)\% :$n mkdir $$@$n ))
diff --git a/libX11/include/X11/Xlib.h b/libX11/include/X11/Xlib.h index 2bffa76de..8ecaea48f 100644 --- a/libX11/include/X11/Xlib.h +++ b/libX11/include/X11/Xlib.h @@ -79,8 +79,8 @@ _Xmblen( typedef char *XPointer; -#define Bool int -#define Status int +typedef int Bool; +typedef int Status; #define True 1 #define False 0 diff --git a/libX11/include/X11/Xlibint.h b/libX11/include/X11/Xlibint.h index 443155964..e7d2487cf 100644 --- a/libX11/include/X11/Xlibint.h +++ b/libX11/include/X11/Xlibint.h @@ -273,29 +273,32 @@ struct _XLockPtrs { ); }; -#if defined(WIN32) && !defined(_XLIBINT_) -#define _XCreateMutex_fn (*_XCreateMutex_fn_p) -#define _XFreeMutex_fn (*_XFreeMutex_fn_p) -#define _XLockMutex_fn (*_XLockMutex_fn_p) -#define _XUnlockMutex_fn (*_XUnlockMutex_fn_p) -#define _Xglobal_lock (*_Xglobal_lock_p) +#ifdef WIN32 +#ifdef LIB11_DLL +#define X11_EXTERN __declspec(dllexport) extern +#else +#define X11_EXTERN __declspec(dllimport) extern #endif +#else +#define X11_EXTERN extern +#endif + /* in XlibInt.c */ -extern void (*_XCreateMutex_fn)( +X11_EXTERN void (*_XCreateMutex_fn)( LockInfoPtr /* lock */ ); -extern void (*_XFreeMutex_fn)( +X11_EXTERN void (*_XFreeMutex_fn)( LockInfoPtr /* lock */ ); -extern void (*_XLockMutex_fn)( +X11_EXTERN void (*_XLockMutex_fn)( LockInfoPtr /* lock */ #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char * /* file */ , int /* line */ #endif ); -extern void (*_XUnlockMutex_fn)( +X11_EXTERN void (*_XUnlockMutex_fn)( LockInfoPtr /* lock */ #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char * /* file */ @@ -303,7 +306,7 @@ extern void (*_XUnlockMutex_fn)( #endif ); -extern LockInfoPtr _Xglobal_lock; +X11_EXTERN LockInfoPtr _Xglobal_lock; #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) #define LockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->lock_display)((d),__FILE__,__LINE__) @@ -826,10 +829,10 @@ extern int _XError( extern int _XIOError( Display* /* dpy */ ) _X_NORETURN; -extern int (*_XIOErrorFunction)( +X11_EXTERN int (*_XIOErrorFunction)( Display* /* dpy */ ); -extern int (*_XErrorFunction)( +X11_EXTERN int (*_XErrorFunction)( Display* /* dpy */, XErrorEvent* /* error_event */ ); diff --git a/libX11/include/X11/Xregion.h b/libX11/include/X11/Xregion.h index cf10f86df..70caa1a03 100644 --- a/libX11/include/X11/Xregion.h +++ b/libX11/include/X11/Xregion.h @@ -58,8 +58,10 @@ typedef struct { #define TRUE 1 #define FALSE 0 +#ifndef MAXSHORT #define MAXSHORT 32767 #define MINSHORT -MAXSHORT +#endif #ifndef MAX #define MAX(a,b) (((a) > (b)) ? (a) : (b)) #endif diff --git a/libX11/libX11.def b/libX11/libX11.def new file mode 100644 index 000000000..9d2977e93 --- /dev/null +++ b/libX11/libX11.def @@ -0,0 +1,360 @@ +LIBRARY libX11
+EXPORTS
+ _XAllocScratch
+ _XAllocTemp
+ _XDeqAsyncHandler
+ _XEatData
+ _XEatDataWords
+ _XFlushGCCache
+ _XFlushIt
+ _XFreeTemp
+ _XGetAsyncReply
+ _XGetBitsPerPixel
+ _XGetRequest
+ _XGetScanlinePad
+ _Xglobal_lock
+ _Xglobal_lock_p
+ _XInitImageFuncPtrs
+ _XIOError
+ _XLockMutex_fn
+ _XLockMutex_fn_p
+ _XRead
+ _XReadPad
+ _XReply
+ _XSend
+ _XSetLastRequestRead
+ _Xsetlocale
+ _XUnlockMutex_fn
+ _XUnlockMutex_fn_p
+ _XVIDtoVisual
+ XAddConnectionWatch
+ XAddExtension
+ XAddHost
+ XAllocColor
+ XAllocColorCells
+ XAllocIconSize
+ XAllocNamedColor
+ XAllocSizeHints
+ XAllocStandardColormap
+ XBell
+ XChangeGC
+ XChangeProperty
+ XChangeWindowAttributes
+ XCheckIfEvent
+ XClearArea
+ XClipBox
+ XCloseDisplay
+ XCloseIM
+ XConfigureWindow
+ XConvertCase
+ XConvertSelection
+ XCopyArea
+ XCopyPlane
+ XCreateBitmapFromData
+ XCreateColormap
+ XCreateFontCursor
+ XCreateFontSet
+ XCreateGC
+ XCreateGlyphCursor
+ XCreateIC
+ XCreateImage
+ XCreatePixmap
+ XCreatePixmapCursor
+ XCreatePixmapFromBitmapData
+ XCreateRegion
+ XCreateSimpleWindow
+ XCreateWindow
+ XDefaultColormap
+ XDefaultDepth
+ XDefaultScreen
+ XDefaultVisual
+ XDefineCursor
+ XDeleteContext
+ XDeleteProperty
+ XDestroyIC
+ XDestroyRegion
+ XDestroyWindow
+ XDisableAccessControl
+ XDisplayKeycodes
+ XDisplayName
+ XDisplayOfIM
+ XDisplayOfScreen
+ XDisplayString
+ XDrawArc
+ XDrawArcs
+ XDrawImageString
+ XDrawLine
+ XDrawLines
+ XDrawPoint
+ XDrawPoints
+ XDrawRectangle
+ XDrawSegments
+ XDrawString
+ XDrawString16
+ XEmptyRegion
+ XEnableAccessControl
+ XEqualRegion
+ XESetCloseDisplay
+ XESetCopyGC
+ XESetCreateFont
+ XESetCreateGC
+ XESetError
+ XESetErrorString
+ XESetEventToWire
+ XESetFlushGC
+ XESetFreeFont
+ XESetFreeGC
+ XESetWireToEvent
+ XEventsQueued
+ XExtentsOfFontSet
+ XFetchBuffer
+ XFetchName
+ XFillArc
+ XFillArcs
+ XFillPolygon
+ XFillRectangle
+ XFillRectangles
+ XFilterEvent
+ XFindContext
+ XFlush
+ XFontsOfFontSet
+ XFree
+ XFreeColormap
+ XFreeColors
+ XFreeCursor
+ XFreeExtensionList
+ XFreeFont
+ XFreeFontSet
+ XFreeGC
+ XFreeModifiermap
+ XFreePixmap
+ XFreeStringList
+ XGContextFromGC
+ XGetAtomName
+ XGetClassHint
+ XGetDefault
+ XGetErrorDatabaseText
+ XGetErrorText
+ XGetFontProperty
+ XGetGCValues
+ XGetGeometry
+ XGetICValues
+ XGetImage
+ XGetIMValues
+ XGetInputFocus
+ XGetKeyboardMapping
+ XGetModifierMapping
+ XGetRGBColormaps
+ XGetSelectionOwner
+ XGetVisualInfo
+ XGetWindowAttributes
+ XGetWindowProperty
+ XGetWMHints
+ XGetWMName
+ XGetWMNormalHints
+ XGetWMProtocols
+ XGrabButton
+ XGrabKey
+ XGrabKeyboard
+ XGrabPointer
+ XGrabServer
+ XIconifyWindow
+ XIfEvent
+ XInitExtension
+ XInitThreads
+ XInternAtom
+ XInternAtoms
+ XIntersectRegion
+ XkbAddGeomColor
+ XkbAddGeomDoodad
+ XkbAddGeomKey
+ XkbAddGeomOutline
+ XkbAddGeomOverlay
+ XkbAddGeomOverlayRow
+ XkbAddGeomProperty
+ XkbAddGeomRow
+ XkbAddGeomSection
+ XkbAddGeomShape
+ XkbAllocClientMap
+ XkbAllocCompatMap
+ XkbAllocControls
+ XkbAllocGeometry
+ XkbAllocGeomKeyAliases
+ XkbAllocIndicatorMaps
+ XkbAllocKeyboard
+ XkbAllocNames
+ XkbAllocServerMap
+ XkbBell
+ XkbBellEvent
+ XkbComputeEffectiveMap
+ XkbComputeSectionBounds
+ XkbComputeShapeBounds
+ XkbGetCompatMap
+ XkbGetControls
+ XkbGetGeometry
+ XkbGetIndicatorMap
+ XkbGetMap
+ XkbGetNames
+ XkbGetUpdatedMap
+ XkbInitCanonicalKeyTypes
+ XkbLibraryVersion
+ XkbLookupKeySym
+ XkbOpenDisplay
+ XkbResizeKeyActions
+ XkbResizeKeySyms
+ XkbSetCompatMap
+ XkbSetGeometry
+ XkbSetIndicatorMap
+ XkbSetMap
+ XkbSetNames
+ XkbVirtualModsToReal
+ XKeysymToString
+ XKillClient
+ XListDepths
+ XListExtensions
+ XListHosts
+ XListPixmapFormats
+ XLoadFont
+ XLoadQueryFont
+ XLookupColor
+ XLookupString
+ XLowerWindow
+ XMapRaised
+ XMapSubwindows
+ XMapWindow
+ XMatchVisualInfo
+ XMaxRequestSize
+ XmbDrawImageString
+ XmbDrawString
+ XmbLookupString
+ XmbTextEscapement
+ XmbTextListToTextProperty
+ XmbTextPropertyToTextList
+ XMoveResizeWindow
+ XNextEvent
+ XNextRequest
+ XOpenDisplay
+ XOpenIM
+ XParseColor
+ XPeekEvent
+ XPeekIfEvent
+ XPending
+ XProcessInternalConnection
+ XPutBackEvent
+ XPutImage
+ XQueryColor
+ XQueryColors
+ XQueryExtension
+ XQueryFont
+ XQueryPointer
+ XQueryTree
+ XRaiseWindow
+ XReadBitmapFileData
+ XRecolorCursor
+ XRectInRegion
+ XRefreshKeyboardMapping
+ XRemoveHost
+ XResourceManagerString
+ XrmCombineDatabase
+ XrmCombineFileDatabase
+ XrmDestroyDatabase
+ XrmEnumerateDatabase
+ XrmGetDatabase
+ XrmGetFileDatabase
+ XrmGetResource
+ XrmGetStringDatabase
+ XrmInitialize
+ XrmMergeDatabases
+ XrmParseCommand
+ XrmPermStringToQuark
+ XrmPutLineResource
+ XrmPutStringResource
+ XrmQGetResource
+ XrmQGetSearchList
+ XrmQGetSearchResource
+ XrmQPutResource
+ XrmQuarkToString
+ XrmSetDatabase
+ XrmStringToBindingQuarkList
+ XrmStringToQuark
+ XrmUniqueQuark
+ XRotateBuffers
+ XSaveContext
+ XScreenNumberOfScreen
+ XScreenResourceString
+ XSelectInput
+ XSendEvent
+ XSetArcMode
+ XSetAuthorization
+ XSetBackground
+ XSetClipMask
+ XSetClipOrigin
+ XSetClipRectangles
+ XSetCloseDownMode
+ XSetCommand
+ XSetDashes
+ XSetErrorHandler
+ XSetFillRule
+ XSetFillStyle
+ XSetFont
+ XSetForeground
+ XSetFunction
+ XSetGraphicsExposures
+ XSetICFocus
+ XSetIconSizes
+ XSetICValues
+ XSetInputFocus
+ XSetIOErrorHandler
+ XSetLocaleModifiers
+ XSetPlaneMask
+ XSetRegion
+ XSetRGBColormaps
+ XSetSelectionOwner
+ XSetStipple
+ XSetSubwindowMode
+ XSetTile
+ XSetTransientForHint
+ XSetTSOrigin
+ XSetWindowBorder
+ XSetWindowBorderPixmap
+ XSetWindowBorderWidth
+ XSetWMHints
+ XSetWMIconName
+ XSetWMName
+ XSetWMNormalHints
+ XSetWMProperties
+ XSetWMProtocols
+ XStoreColors
+ XStoreName
+ XStringToKeysym
+ XSubtractRegion
+ XSupportsLocale
+ XSync
+ XSynchronize
+ XTextWidth
+ XTextWidth16
+ XTranslateCoordinates
+ XUndefineCursor
+ XUngrabButton
+ XUngrabKey
+ XUngrabKeyboard
+ XUngrabPointer
+ XUngrabServer
+ XUnionRectWithRegion
+ XUnionRegion
+ XUnloadFont
+ XUnmapWindow
+ XUnsetICFocus
+ Xutf8TextListToTextProperty
+ Xutf8TextPropertyToTextList
+ XVaCreateNestedList
+ XVisualIDFromVisual
+ XwcDrawImageString
+ XwcDrawString
+ XwcFreeStringList
+ XwcLookupString
+ XwcTextEscapement
+ XwcTextListToTextProperty
+ XwcTextPropertyToTextList
+ XWithdrawWindow
+ XWMGeometry
\ No newline at end of file diff --git a/libX11/makefile b/libX11/makefile new file mode 100644 index 000000000..67e45be17 --- /dev/null +++ b/libX11/makefile @@ -0,0 +1,24 @@ +SHAREDLIB=libX11
+
+INCLUDELIBFILES = \
+ modules\im\ximcp\$(OBJDIR)\libximcp.lib \
+ src\xlibi18n\$(OBJDIR)\libi18n.lib \
+ src\$(OBJDIR)\libx11.lib \
+ src\xcms\$(OBJDIR)\libxcms.lib \
+ src\xkb\$(OBJDIR)\libxkb.lib \
+ modules\om\generic\$(OBJDIR)\libxomGeneric.lib \
+ modules\lc\utf8\$(OBJDIR)\libxlcUTF8Load.lib \
+ modules\lc\def\$(OBJDIR)\libxlcDef.lib \
+ modules\lc\gen\$(OBJDIR)\liblcGenConvLoad.lib \
+ $(MHMAKECONF)\libXau\$(OBJDIR)\libXau.lib \
+ $(MHMAKECONF)\libxcb\src\$(OBJDIR)\libxcb.lib
+
+LIBDIRS=$(dir $(INCLUDELIBFILES))
+
+load_makefile $(LIBDIRS:%$(OBJDIR)\=%makefile MAKESERVER=0 DEBUG=$(DEBUG);)
+
+LINKLIBS += $(PTHREADLIB)
+
+load_makefile nls\makefile MAKESERVER=0 DEBUG=0
+
+$(OBJDIR)\libX11.lib : $(OBJDIR) nls\all
diff --git a/libX11/modules/im/ximcp/imInt.c b/libX11/modules/im/ximcp/imInt.c index ee9f45122..aceb5fdf7 100644 --- a/libX11/modules/im/ximcp/imInt.c +++ b/libX11/modules/im/ximcp/imInt.c @@ -29,6 +29,7 @@ PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include <config.h> #endif +#include <unistd.h> #include <X11/Xatom.h> #include <X11/Xlib.h> #include <X11/Xmd.h> diff --git a/libX11/modules/im/ximcp/imLcLkup.c b/libX11/modules/im/ximcp/imLcLkup.c index 9e4aec319..c15346746 100644 --- a/libX11/modules/im/ximcp/imLcLkup.c +++ b/libX11/modules/im/ximcp/imLcLkup.c @@ -61,7 +61,7 @@ _XimLocalMbLookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes, ||(ic->private.local.brl_committed != 0))) { if (ic->private.local.brl_committed != 0) { /* Braille Event */ unsigned char pattern = ic->private.local.brl_committed; - char mb[XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)]; + char *mb=alloca(XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)); ret = _Xlcwctomb(ic->core.im->core.lcd, mb, BRL_UC_ROW | pattern); if(ret > bytes) { if(status) *status = XBufferOverflow; diff --git a/libX11/modules/im/ximcp/imRm.c b/libX11/modules/im/ximcp/imRm.c index cb9e1b2c5..3e51ceb17 100644 --- a/libX11/modules/im/ximcp/imRm.c +++ b/libX11/modules/im/ximcp/imRm.c @@ -34,6 +34,7 @@ PERFORMANCE OF THIS SOFTWARE. #include <config.h> #endif #include <stdio.h> +#include <unistd.h> #include <X11/Xlib.h> #include "Xlibint.h" #include "Xlcint.h" diff --git a/libX11/modules/im/ximcp/imTrans.c b/libX11/modules/im/ximcp/imTrans.c index ae644ab61..5bbd86365 100644 --- a/libX11/modules/im/ximcp/imTrans.c +++ b/libX11/modules/im/ximcp/imTrans.c @@ -53,9 +53,11 @@ PERFORMANCE OF THIS SOFTWARE. #include <config.h> #endif #include <stdio.h> +#include <unistd.h> #include <X11/Xatom.h> #include <X11/Xmd.h> #include "Xlibint.h" +#include <X11/Xwindows.h> #include <X11/Xtrans/Xtrans.h> #include "Xlcint.h" #include "Ximint.h" diff --git a/libX11/modules/im/ximcp/makefile b/libX11/modules/im/ximcp/makefile new file mode 100644 index 000000000..3e7997cad --- /dev/null +++ b/libX11/modules/im/ximcp/makefile @@ -0,0 +1,36 @@ +DEFINES += XIM_t TRANS_CLIENT + +LIBRARY=libximcp + +DEFINES += LIB11_DLL + +CSRCS = \ + imCallbk.c \ + imDefFlt.c \ + imDefIc.c \ + imDefIm.c \ + imDefLkup.c \ + imDispch.c \ + imEvToWire.c \ + imExten.c \ + imImSw.c \ + imInsClbk.c \ + imInt.c \ + imLcFlt.c \ + imLcGIc.c \ + imLcIc.c \ + imLcIm.c \ + imLcLkup.c \ + imLcPrs.c \ + imLcSIc.c \ + imRmAttr.c \ + imRm.c \ + imThaiFlt.c \ + imThaiIc.c \ + imThaiIm.c \ + imTrans.c \ + imTransR.c \ + imTrX.c + +INCLUDES += ..\..\..\include\X11 ..\..\..\src\xlibi18n ..\..\..\src + diff --git a/libX11/modules/lc/Utf8/makefile b/libX11/modules/lc/Utf8/makefile new file mode 100644 index 000000000..1dd942816 --- /dev/null +++ b/libX11/modules/lc/Utf8/makefile @@ -0,0 +1,8 @@ +LIBRARY = libxlcUTF8Load + +DEFINES += LIB11_DLL + +CSRCS=lcUTF8Load.c + +INCLUDES += ..\..\..\include\X11 ..\..\..\src\xlibi18n ..\..\..\src + diff --git a/libX11/modules/lc/def/makefile b/libX11/modules/lc/def/makefile new file mode 100644 index 000000000..10a2f3521 --- /dev/null +++ b/libX11/modules/lc/def/makefile @@ -0,0 +1,7 @@ +LIBRARY = libxlcDef +CSRCS = lcDefConv.c + +DEFINES += LIB11_DLL + +INCLUDES += ..\..\..\include\X11 ..\..\..\src\xlibi18n ..\..\..\src + diff --git a/libX11/modules/lc/gen/makefile b/libX11/modules/lc/gen/makefile new file mode 100644 index 000000000..a06a39b01 --- /dev/null +++ b/libX11/modules/lc/gen/makefile @@ -0,0 +1,8 @@ +LIBRARY = liblcGenConvLoad + +DEFINES += LIB11_DLL + +CSRCS=lcGenConv.c + +INCLUDES += ..\..\..\include\X11 ..\..\..\src\xlibi18n ..\..\..\src + diff --git a/libX11/modules/om/generic/makefile b/libX11/modules/om/generic/makefile new file mode 100644 index 000000000..14e7a8119 --- /dev/null +++ b/libX11/modules/om/generic/makefile @@ -0,0 +1,17 @@ +LIBRARY = libxomGeneric + +DEFINES += LIB11_DLL + +CSRCS = \ + omDefault.c \ + omGeneric.c \ + omImText.c \ + omText.c \ + omTextEsc.c \ + omTextExt.c \ + omTextPer.c \ + omXChar.c + +INCLUDES += ..\..\..\include\X11 ..\..\..\src\xlibi18n ..\..\..\src ..\..\..\src\xlibi18n + + diff --git a/libX11/modules/om/generic/omGeneric.c b/libX11/modules/om/generic/omGeneric.c index 0d202c0f6..d9dc18bb3 100644 --- a/libX11/modules/om/generic/omGeneric.c +++ b/libX11/modules/om/generic/omGeneric.c @@ -56,6 +56,7 @@ #include <X11/Xos.h> #include <X11/Xatom.h> #include <stdio.h> +#include <unistd.h> #include <string.h> #include <ctype.h> diff --git a/libX11/nls/makefile b/libX11/nls/makefile new file mode 100644 index 000000000..18cbe1c82 --- /dev/null +++ b/libX11/nls/makefile @@ -0,0 +1,38 @@ +X11_LOCALEDATADIR = ..\..\xorg-server\locale
+
+x11localedir = $(X11_LOCALEDATADIR)
+x11locale_DATA = locale.alias locale.dir compose.dir
+
+# Copied from ../configure.ac
+locales = \
+ am_ET.UTF-8 armscii-8 C el_GR.UTF-8 en_US.UTF-8 fi_FI.UTF-8 \
+ georgian-academy georgian-ps ibm-cp1133 iscii-dev isiri-3342 \
+ iso8859-1 iso8859-10 iso8859-11 iso8859-13 iso8859-14 iso8859-15 \
+ iso8859-2 iso8859-3 iso8859-4 iso8859-5 iso8859-6 iso8859-7 \
+ iso8859-8 iso8859-9 iso8859-9e ja ja.JIS ja_JP.UTF-8\
+ ja.SJIS ko koi8-c koi8-r \
+ koi8-u ko_KR.UTF-8 microsoft-cp1251 microsoft-cp1255 \
+ microsoft-cp1256 mulelao-1 nokhchi-1 pt_BR.UTF-8 ru_RU.UTF-8 \
+ tatar-cyr th_TH th_TH.UTF-8 tscii-0 vi_VN.tcvn vi_VN.viscii \
+ zh_CN zh_CN.gb18030 zh_CN.gbk zh_CN.UTF-8 zh_HK.big5 \
+ zh_HK.big5hkscs zh_HK.UTF-8 zh_TW zh_TW.big5 zh_TW.UTF-8
+
+include ../cpprules.mak
+
+
+$(X11_LOCALEDATADIR)\%: %.pre
+ cl /nologo /EP $< -DXCOMM\#\# > $<.l1
+ sed -e "/^[^\#][^ ]*:/s/://" -e "/^[^\#].*[ ].*:/d" < $<.l1 > $<.l2
+ type $<.l2 $<.l1 > $@
+ del $<.l1
+ del $<.l2
+
+# Per-locale data files
+
+nobase_dist_x11locale_DATA = $(locales:%=%\XI18N_OBJS)
+
+nobase_x11locale_DATA = $(locales:%=%\XLC_LOCALE) $(locales:%=%\Compose)
+
+all_DATA = $(nobase_dist_x11locale_DATA) $(nobase_x11locale_DATA) $(x11locale_DATA)
+
+all: $(all_DATA:%=$(X11_LOCALEDATADIR)\%)
diff --git a/libX11/src/ConvSel.c b/libX11/src/ConvSel.c index fb6e8e338..2dece58b5 100644 --- a/libX11/src/ConvSel.c +++ b/libX11/src/ConvSel.c @@ -49,5 +49,5 @@ XConvertSelection( req->time = time; UnlockDisplay(dpy); SyncHandle(); - return 1; + return Success; } diff --git a/libX11/src/CrBFData.c b/libX11/src/CrBFData.c index 6708a9b91..b5c4c30b6 100644 --- a/libX11/src/CrBFData.c +++ b/libX11/src/CrBFData.c @@ -60,18 +60,18 @@ Pixmap XCreateBitmapFromData( return (Pixmap) None; } else { XImage ximage = { - .height = height, - .width = width, - .depth = 1, - .bits_per_pixel = 1, - .xoffset = 0, - .format = XYPixmap, - .data = (char *) data, - .byte_order = LSBFirst, - .bitmap_unit = 8, - .bitmap_bit_order = LSBFirst, - .bitmap_pad = 8, - .bytes_per_line = (width + 7) / 8, + /*.width =*/ width, + /*.height =*/ height, + /*.xoffset =*/ 0, + /*.format =*/ XYPixmap, + /*.data =*/ (char *) data, + /*.byte_order =*/ LSBFirst, + /*.bitmap_unit =*/ 8, + /*.bitmap_bit_order =*/ LSBFirst, + /*.bitmap_pad =*/ 8, + /*.depth =*/ 1, + /*.bytes_per_line =*/ (width + 7) / 8, + /*.bits_per_pixel =*/ 1 }; XPutImage(display, pix, gc, &ximage, 0, 0, 0, 0, width, height); XFreeGC(display, gc); diff --git a/libX11/src/CrGlCur.c b/libX11/src/CrGlCur.c index 460660f81..510ff5d75 100644 --- a/libX11/src/CrGlCur.c +++ b/libX11/src/CrGlCur.c @@ -51,8 +51,14 @@ in this Software without prior written authorization from The Open Group. #if defined(hpux) typedef shl_t XModuleType; #else +#ifdef _MSC_VER +#include <X11/XWindows.h> +typedef HANDLE XModuleType; +#define dlsym GetProcAddress +#else typedef void *XModuleType; #endif +#endif #ifndef LIBXCURSOR #define LIBXCURSOR "libXcursor.so.1" @@ -71,8 +77,12 @@ open_library (void) #if defined(hpux) module = shl_load(library, BIND_DEFERRED, 0L); #else +#ifdef _MSC_VER + module = LoadLibrary(library); +#else module = dlopen(library, RTLD_LAZY); #endif +#endif if (module) return module; dot = strrchr (library, '.'); diff --git a/libX11/src/CrPFBData.c b/libX11/src/CrPFBData.c index 17d551bb7..a736b9b84 100644 --- a/libX11/src/CrPFBData.c +++ b/libX11/src/CrPFBData.c @@ -60,8 +60,10 @@ Pixmap XCreatePixmapFromBitmapData( { Pixmap pix = XCreatePixmap(display, d, width, height, depth); XGCValues gcv = { - .foreground = fg, - .background = bg + /*.function =*/ 0, + /*.plane_mask =*/ 0, + /*.foreground =*/ fg, + /*.background =*/ bg }; GC gc = XCreateGC(display, pix, GCForeground|GCBackground, &gcv); if (gc == NULL) { @@ -69,18 +71,18 @@ Pixmap XCreatePixmapFromBitmapData( return (Pixmap) None; } else { XImage ximage = { - .height = height, - .width = width, - .depth = 1, - .bits_per_pixel = 1, - .xoffset = 0, - .format = XYBitmap, - .data = data, - .byte_order = LSBFirst, - .bitmap_unit = 8, - .bitmap_bit_order = LSBFirst, - .bitmap_pad = 8, - .bytes_per_line = (width + 7) / 8 + /*.width =*/ width, + /*.height =*/ height, + /*.xoffset =*/ 0, + /*.format =*/ XYBitmap, + /*.data =*/ data, + /*.byte_order =*/ LSBFirst, + /*.bitmap_unit =*/ 8, + /*.bitmap_bit_order =*/ LSBFirst, + /*.bitmap_pad =*/ 8, + /*.depth =*/ 1, + /*.bytes_per_line =*/ (width + 7) / 8, + /*.bits_per_pixel =*/ 1 }; XPutImage(display, pix, gc, &ximage, 0, 0, 0, 0, width, height); XFreeGC(display, gc); diff --git a/libX11/src/CrWindow.c b/libX11/src/CrWindow.c index 7b5460186..84101ff9b 100644 --- a/libX11/src/CrWindow.c +++ b/libX11/src/CrWindow.c @@ -29,6 +29,10 @@ in this Software without prior written authorization from The Open Group. #endif #include "Xlibint.h" +#ifdef _MSC_VER +#undef CreateWindow +#endif + Window XCreateSimpleWindow( register Display *dpy, Window parent, diff --git a/libX11/src/ErrDes.c b/libX11/src/ErrDes.c index ef5edad6c..f5f610fac 100644 --- a/libX11/src/ErrDes.c +++ b/libX11/src/ErrDes.c @@ -55,6 +55,7 @@ SOFTWARE. #include <X11/Xos.h> #include "Xresource.h" #include <stdio.h> +#include <unistd.h> #ifndef ERRORDB #ifndef XERRORDB diff --git a/libX11/src/FSWrap.c b/libX11/src/FSWrap.c index 12d0406ba..49ec3ff29 100644 --- a/libX11/src/FSWrap.c +++ b/libX11/src/FSWrap.c @@ -63,7 +63,7 @@ from The Open Group. #include "Xlcint.h" #include <ctype.h> #include <X11/Xos.h> - +#include <unistd.h> #define XMAXLIST 256 diff --git a/libX11/src/GetDflt.c b/libX11/src/GetDflt.c index 496253065..68ab4c918 100644 --- a/libX11/src/GetDflt.c +++ b/libX11/src/GetDflt.c @@ -63,6 +63,7 @@ SOFTWARE. #include <X11/Xos_r.h> #endif #include <stdio.h> +#include <unistd.h> #include <ctype.h> @@ -137,9 +138,13 @@ InitDefaults( * ~/.Xdefaults. Next, if there is an XENVIRONMENT environment variable, * then load that file. */ - + if (dpy->xdefaults == NULL) { + #ifdef _MSC_VER + const char *slashDotXdefaults = ".Xdefaults"; + #else const char *slashDotXdefaults = "/.Xdefaults"; + #endif (void) GetHomeDir (fname, PATH_MAX - strlen (slashDotXdefaults) - 1); (void) strcat (fname, slashDotXdefaults); @@ -149,7 +154,11 @@ InitDefaults( } if (!(xenv = getenv ("XENVIRONMENT"))) { + #ifdef _MSC_VER + const char *slashDotXdefaultsDash = ".Xdefaults-"; + #else const char *slashDotXdefaultsDash = "/.Xdefaults-"; + #endif int len; (void) GetHomeDir (fname, PATH_MAX - strlen (slashDotXdefaultsDash) - 1); diff --git a/libX11/src/Host.c b/libX11/src/Host.c index b07c9c312..cdf079758 100644 --- a/libX11/src/Host.c +++ b/libX11/src/Host.c @@ -64,6 +64,10 @@ X Window System is a trademark of The Open Group. #endif #include "Xlibint.h" +#ifdef _MSC_VER +#define inline __inline +#endif + static inline int changehost (Display *dpy, XHostAddress *host, BYTE mode) { diff --git a/libX11/src/InitExt.c b/libX11/src/InitExt.c index 0ff3732bf..1d58e879f 100644 --- a/libX11/src/InitExt.c +++ b/libX11/src/InitExt.c @@ -32,6 +32,7 @@ from The Open Group. #include <X11/Xlibint.h> #include <X11/Xos.h> #include <stdio.h> +#include <unistd.h> /* * This routine is used to link a extension in so it will be called diff --git a/libX11/src/KeysymStr.c b/libX11/src/KeysymStr.c index c7c470468..00483085a 100644 --- a/libX11/src/KeysymStr.c +++ b/libX11/src/KeysymStr.c @@ -34,6 +34,7 @@ in this Software without prior written authorization from The Open Group. #include "Xresinternal.h" #include <stdio.h> /* sprintf */ +#include <unistd.h> /* snprintf */ #define NEEDVTABLE #include "ks_tables.h" diff --git a/libX11/src/OpenDis.c b/libX11/src/OpenDis.c index 379381489..607b5a077 100644 --- a/libX11/src/OpenDis.c +++ b/libX11/src/OpenDis.c @@ -32,6 +32,7 @@ in this Software without prior written authorization from The Open Group. #include <X11/Xatom.h> #include <X11/Xresource.h> #include <stdio.h> +#include <unistd.h> #include "Xintconn.h" #ifdef XKB diff --git a/libX11/src/QuColors.c b/libX11/src/QuColors.c index 0b9bc508f..add2376bf 100644 --- a/libX11/src/QuColors.c +++ b/libX11/src/QuColors.c @@ -73,8 +73,8 @@ _XQueryColors( int XQueryColors( - register Display * const dpy, - const Colormap cmap, + register Display * dpy, + Colormap cmap, XColor *defs, /* RETURN */ int ncolors) { diff --git a/libX11/src/RdBitF.c b/libX11/src/RdBitF.c index 31bf583c9..7f6750d64 100644 --- a/libX11/src/RdBitF.c +++ b/libX11/src/RdBitF.c @@ -54,22 +54,23 @@ from The Open Group. #define MAX_SIZE 255 /* shared data for the image read/parse logic */ -static const short hexTable[256] = { - ['0'] = 0, ['1'] = 1, - ['2'] = 2, ['3'] = 3, - ['4'] = 4, ['5'] = 5, - ['6'] = 6, ['7'] = 7, - ['8'] = 8, ['9'] = 9, - ['A'] = 10, ['B'] = 11, - ['C'] = 12, ['D'] = 13, - ['E'] = 14, ['F'] = 15, - ['a'] = 10, ['b'] = 11, - ['c'] = 12, ['d'] = 13, - ['e'] = 14, ['f'] = 15, - - [' '] = -1, [','] = -1, - ['}'] = -1, ['\n'] = -1, - ['\t'] = -1 +static const signed char hexTable[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + ,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0 + , 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0 + , 0, 10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* diff --git a/libX11/src/SetLocale.c b/libX11/src/SetLocale.c index 69c25c2c3..40ea3ac4d 100644 --- a/libX11/src/SetLocale.c +++ b/libX11/src/SetLocale.c @@ -63,11 +63,12 @@ from The Open Group. #include <X11/Xlocale.h> #include <X11/Xos.h> #include "XlcPubI.h" +#include <unistd.h> #define MAXLOCALE 64 /* buffer size of locale name */ -#if defined(__APPLE__) || defined(__CYGWIN__) +#if defined(__APPLE__) || defined(__CYGWIN__) || defined(_MSC_VER) char * _Xsetlocale( int category, diff --git a/libX11/src/StrKeysym.c b/libX11/src/StrKeysym.c index 12fce6872..8b875a328 100644 --- a/libX11/src/StrKeysym.c +++ b/libX11/src/StrKeysym.c @@ -39,12 +39,14 @@ in this Software without prior written authorization from The Open Group. #ifndef KEYSYMDB #ifndef XKEYSYMDB -#define KEYSYMDB "/usr/lib/X11/XKeysymDB" +#define KEYSYMDB "XKeysymDB" #else #define KEYSYMDB XKEYSYMDB #endif #endif +#include <unistd.h> + static Bool initialized; static XrmDatabase keysymdb; static XrmQuark Qkeysym[2]; diff --git a/libX11/src/Window.c b/libX11/src/Window.c index 85a28f372..341efee0f 100644 --- a/libX11/src/Window.c +++ b/libX11/src/Window.c @@ -29,6 +29,10 @@ in this Software without prior written authorization from The Open Group. #endif #include "Xlibint.h" +#ifdef _MSC_VER +#undef CreateWindow +#endif + void _XProcessWindowAttributes ( register Display *dpy, xChangeWindowAttributesReq *req, diff --git a/libX11/src/XlibInt.c b/libX11/src/XlibInt.c index a5350e953..15f94aa0a 100644 --- a/libX11/src/XlibInt.c +++ b/libX11/src/XlibInt.c @@ -33,6 +33,7 @@ from The Open Group. #ifdef WIN32 #define _XLIBINT_ +#include <X11\Xw32defs.h> #endif #ifdef HAVE_CONFIG_H #include <config.h> @@ -42,6 +43,7 @@ from The Open Group. #include <X11/Xpoll.h> #include <assert.h> #include <stdio.h> +#include <unistd.h> #ifdef WIN32 #include <direct.h> #endif @@ -112,6 +114,19 @@ xthread_t (*_Xthread_self_fn)(void) = NULL; #define POLLFD_CACHE_SIZE 5 +#if _WIN32_WINNT < _WIN32_WINNT_VISTA +struct pollfd { + + SOCKET fd; + SHORT events; + SHORT revents; + +}; +#define POLLRDNORM 0x0100 +#define POLLRDBAND 0x0200 +#define POLLIN (POLLRDNORM | POLLRDBAND) +#endif + /* initialize the struct array passed to poll() below */ Bool _XPollfdCacheInit( Display *dpy) @@ -165,6 +180,11 @@ void _XPollfdCacheDel( #endif } +#ifdef _MSC_VER +#undef min +#define min __min +#endif + static int sync_hazard(Display *dpy) { unsigned long span = dpy->request - dpy->last_request_read; diff --git a/libX11/src/config.h b/libX11/src/config.h new file mode 100644 index 000000000..abbac6e3b --- /dev/null +++ b/libX11/src/config.h @@ -0,0 +1,243 @@ +/* src/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if `struct sockaddr_in' has a `sin_len' member */ +/* #undef BSD44SOCKETS */ + +/* Include compose table cache support */ +#define COMPOSECACHE 1 + +/* Has getresuid() & getresgid() functions */ +/* #undef HASGETRESUID */ + +/* Has issetugid() function */ +/* #undef HASSETUGID */ + +/* Has shm*() functions */ +//MH#define HAS_SHM 1 + +/* Define to 1 if you have the `authdes_create' function. */ +/* #undef HAVE_AUTHDES_CREATE */ + +/* Define to 1 if you have the `authdes_seccreate' function. */ +/* #undef HAVE_AUTHDES_SECCREATE */ + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the <endian.h> header file. */ +#define HAVE_ENDIAN_H 1 + +/* Use dlopen to load shared libraries */ +#define HAVE_DLOPEN 1 + +/* Define to 1 if you have the <dl.h> header file. */ +/* #undef HAVE_DL_H */ + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* launchd support available */ +/* #undef HAVE_LAUNCHD */ + +/* Define to 1 if you have the <memory.h> header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `poll' function. */ +#define HAVE_POLL 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Use shl_load to load shared libraries */ +/* #undef HAVE_SHL_LOAD */ + +/* Define to 1 if the system has the type `socklen_t'. */ +#define HAVE_SOCKLEN_T 0 + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the <sys/poll.h> header file. */ +#define HAVE_SYS_POLL_H 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Support IPv6 for TCP connections */ +/* #undef IPv6 */ + +/* Support dynamically loaded font modules */ +#define LOADABLEFONTS 1 + +/* Support os-specific local connections */ +/* #undef LOCALCONN */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Disable XLOCALEDIR environment variable */ +#define NO_XLOCALEDIR 1 + +/* Name of package */ +#define PACKAGE "libX11" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=xorg" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libX11" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libX11 1.1.5" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libX11" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.1.5" + +/* Major version of this package */ +#define PACKAGE_VERSION_MAJOR 1 + +/* Minor version of this package */ +#define PACKAGE_VERSION_MINOR 1 + +/* Patch version of this package */ +#define PACKAGE_VERSION_PATCHLEVEL 5 + +/* Define as the return type of signal handlers (`int' or `void'). */ +/* #undef RETSIGTYPE */ + +/* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */ +/* #undef SECURE_RPC */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Support TCP socket connections */ +#define TCPCONN 1 + +/* launchd support available */ +/* #undef TRANS_REOPEN */ + +/* Support UNIX socket connections */ +#define UNIXCONN 1 + +/* Split some i18n functions into loadable modules */ +/* #undef USE_DYNAMIC_LC */ + +/* Use the X cursor library to load cursors */ +#define USE_DYNAMIC_XCURSOR 1 + +/* poll() function is available */ +#define USE_POLL 1 + +/* Use XCB for low-level protocol implementation */ +#define USE_XCB 1 + +/* Version number of package */ +#define VERSION "1.1.5" + +/* Support bdf format bitmap font files */ +#define XFONT_BDFFORMAT 1 + +/* Location of libX11 data */ +#define X11_DATADIR "/usr/share/X11" + +/* Location of libX11 library data */ +#define X11_LIBDIR "/usr/lib/X11" + +/* Include support for XCMS */ +#define XCMS 1 + +/* Location of error message database */ +#define XERRORDB "XErrorDB" + +/* Enable XF86BIGFONT extension */ +/* #undef XF86BIGFONT */ + +/* Use XKB */ +#define XKB 1 + +/* Location of keysym database */ +#define XKEYSYMDB "XKeysymDB" + +/* support for X Locales */ +#define XLOCALE 1 + +/* Location of libX11 locale data */ +#define XLOCALEDATADIR "locale" + +/* Location of libX11 locale data */ +#define XLOCALEDIR "locale" + +/* Location of libX11 locale libraries */ +#define XLOCALELIBDIR "locale" + +/* Whether libX11 is compiled with thread support */ +#define XTHREADS /**/ + +/* Whether libX11 needs to use MT safe API's */ +#define XUSE_MTSAFE_API /**/ + +/* Enable GNU and other extensions to the C environment for glibc */ +/* #undef _GNU_SOURCE */ + +/* Support bitmap font files */ +#define XFONT_BITMAP 1 + +/* Support built-in fonts */ +#define XFONT_BUILTINS 1 + +/* Support the X Font Services Protocol */ +#define XFONT_FC 1 + +/* Support fonts in files */ +#define XFONT_FONTFILE 1 + +/* Support FreeType rasterizer for nearly all font file formats */ +#define XFONT_FREETYPE 1 + +/* Support pcf format bitmap font files */ +#define XFONT_PCFFORMAT 1 + +/* Support snf format bitmap font files */ +#define XFONT_SNFFORMAT 1 + +/* Support Speedo font files */ +#define XFONT_SPEEDO 1 + +/* Support IBM Type 1 rasterizer for Type1 font files */ +#define XFONT_TYPE1 1 + +/* Support bzip2 for bitmap fonts */ +/* #undef X_BZIP2_FONT_COMPRESSION */ + +/* Support gzip for bitmap fonts */ +#define X_GZIP_FONT_COMPRESSION 1 + +#define INCL_WINSOCK_API_TYPEDEFS 1 +#include <X11/Xwinsock.h> +#include <X11/Xwindows.h> diff --git a/libX11/src/genhextable.py b/libX11/src/genhextable.py new file mode 100644 index 000000000..2a45a9e83 --- /dev/null +++ b/libX11/src/genhextable.py @@ -0,0 +1,39 @@ +import sys
+
+HexTable={
+ '0' : 0, '1' : 1,
+ '2' : 2, '3' : 3,
+ '4' : 4, '5' : 5,
+ '6' : 6, '7' : 7,
+ '8' : 8, '9' : 9,
+ 'A' : 10, 'B' : 11,
+ 'C' : 12, 'D' : 13,
+ 'E' : 14, 'F' : 15,
+ 'a' : 10, 'b' : 11,
+ 'c' : 12, 'd' : 13,
+ 'e' : 14, 'f' : 15,
+
+ ' ' : -1, ',' : -1,
+ '}' : -1, '\n' : -1,
+ '\t' : -1
+}
+
+OutHexTable=[0]*256
+
+for Char,Val in HexTable.iteritems():
+ OutHexTable[ord(Char)]=Val
+
+print "static const short hexTable[256] = {"
+i=0
+for Item in OutHexTable:
+ if i==0:
+ PreFix=" "
+ elif i%16 == 0:
+ PreFix="\n ,"
+ else:
+ PreFix=", "
+ i+=1
+ Val="%d"%Item
+ if len(Val)==1: Val = " "+Val
+ sys.stdout.write("%s%s"%(PreFix,Val))
+print "\n};"
\ No newline at end of file diff --git a/libX11/src/makefile b/libX11/src/makefile new file mode 100644 index 000000000..456ad4895 --- /dev/null +++ b/libX11/src/makefile @@ -0,0 +1,277 @@ +LIBRARY=libx11 + +DEFINES += X11_t TRANS_CLIENT LIB11_DLL + + +CSRCS = \ + AllCells.c \ + AllowEv.c \ + AllPlanes.c \ + AutoRep.c \ + Backgnd.c \ + BdrWidth.c \ + Bell.c \ + Border.c \ + ChAccCon.c \ + ChActPGb.c \ + ChClMode.c \ + ChCmap.c \ + ChGC.c \ + ChKeyCon.c \ + ChkIfEv.c \ + ChkMaskEv.c \ + ChkTypEv.c \ + ChkTypWEv.c \ + ChkWinEv.c \ + ChPntCon.c \ + ChProp.c \ + ChSaveSet.c \ + ChWAttrs.c \ + ChWindow.c \ + CirWin.c \ + CirWinDn.c \ + CirWinUp.c \ + ClDisplay.c \ + ClearArea.c \ + Clear.c \ + ConfWind.c \ + Context.c \ + ConvSel.c \ + CopyArea.c \ + CopyCmap.c \ + CopyGC.c \ + CopyPlane.c \ + CrBFData.c \ + CrCmap.c \ + CrCursor.c \ + CrGC.c \ + CrGlCur.c \ + CrPFBData.c \ + CrPixmap.c \ + CrWindow.c \ + Cursor.c \ + DefCursor.c \ + DelProp.c \ + Depths.c \ + DestSubs.c \ + DestWind.c \ + DisName.c \ + DrArc.c \ + DrArcs.c \ + DrLine.c \ + DrLines.c \ + DrPoint.c \ + DrPoints.c \ + DrRect.c \ + DrRects.c \ + DrSegs.c \ + ErrDes.c \ + ErrHndlr.c \ + evtomask.c \ + EvToWire.c \ + FetchName.c \ + FillArc.c \ + FillArcs.c \ + FillPoly.c \ + FillRct.c \ + FillRcts.c \ + FilterEv.c \ + Flush.c \ + Font.c \ + FontInfo.c \ + FontNames.c \ + FreeCmap.c \ + FreeCols.c \ + FreeCurs.c \ + FreeEData.c \ + FreeEventData.c \ + FreeGC.c \ + FreePix.c \ + FSSaver.c \ + FSWrap.c \ + GCMisc.c \ + Geom.c \ + GetAtomNm.c \ + GetColor.c \ + GetDflt.c \ + GetEventData.c \ + GetFPath.c \ + GetFProp.c \ + GetGCVals.c \ + GetGeom.c \ + GetHColor.c \ + GetHints.c \ + GetIFocus.c \ + GetImage.c \ + GetKCnt.c \ + GetMoEv.c \ + GetNrmHint.c \ + GetPCnt.c \ + GetPntMap.c \ + GetProp.c \ + GetRGBCMap.c \ + GetSOwner.c \ + GetSSaver.c \ + GetStCmap.c \ + GetTxtProp.c \ + GetWAttrs.c \ + GetWMCMapW.c \ + GetWMProto.c \ + globals.c \ + GrButton.c \ + GrKeybd.c \ + GrKey.c \ + GrPointer.c \ + GrServer.c \ + Host.c \ + Iconify.c \ + IfEvent.c \ + imConv.c \ + ImText16.c \ + ImText.c \ + ImUtil.c \ + InitExt.c \ + InsCmap.c \ + IntAtom.c \ + KeyBind.c \ + KeysymStr.c \ + KillCl.c \ + LiHosts.c \ + LiICmaps.c \ + LiProps.c \ + ListExt.c \ + LoadFont.c \ + LockDis.c \ + locking.c \ + LookupCol.c \ + LowerWin.c \ + Macros.c \ + MapRaised.c \ + MapSubs.c \ + MapWindow.c \ + MaskEvent.c \ + Misc.c \ + ModMap.c \ + MoveWin.c \ + NextEvent.c \ + OCWrap.c \ + OMWrap.c \ + OpenDis.c \ + ParseCmd.c \ + ParseCol.c \ + ParseGeom.c \ + PeekEvent.c \ + PeekIfEv.c \ + Pending.c \ + PixFormats.c \ + PmapBgnd.c \ + PmapBord.c \ + PolyReg.c \ + PolyTxt16.c \ + PolyTxt.c \ + PropAlloc.c \ + PutBEvent.c \ + PutImage.c \ + Quarks.c \ + QuBest.c \ + QuColor.c \ + QuColors.c \ + QuCurShp.c \ + QuExt.c \ + QuKeybd.c \ + QuPntr.c \ + QuStipShp.c \ + QuTextE16.c \ + QuTextExt.c \ + QuTileShp.c \ + QuTree.c \ + RaiseWin.c \ + RdBitF.c \ + RecolorC.c \ + ReconfWin.c \ + ReconfWM.c \ + Region.c \ + RegstFlt.c \ + RepWindow.c \ + RestackWs.c \ + RotProp.c \ + ScrResStr.c \ + SelInput.c \ + SendEvent.c \ + SetBack.c \ + SetClMask.c \ + SetClOrig.c \ + SetCRects.c \ + SetDashes.c \ + SetFont.c \ + SetFore.c \ + SetFPath.c \ + SetFunc.c \ + SetHints.c \ + SetIFocus.c \ + SetLocale.c \ + SetLStyle.c \ + SetNrmHint.c \ + SetPMask.c \ + SetPntMap.c \ + SetRGBCMap.c \ + SetSOwner.c \ + SetSSaver.c \ + SetState.c \ + SetStCmap.c \ + SetStip.c \ + SetTile.c \ + SetTSOrig.c \ + SetTxtProp.c \ + SetWMCMapW.c \ + SetWMProto.c \ + StBytes.c \ + StColor.c \ + StColors.c \ + StName.c \ + StNColor.c \ + StrKeysym.c \ + StrToText.c \ + Sync.c \ + Synchro.c \ + Text16.c \ + Text.c \ + TextExt16.c \ + TextExt.c \ + TextToStr.c \ + TrCoords.c \ + UndefCurs.c \ + UngrabBut.c \ + UngrabKbd.c \ + UngrabKey.c \ + UngrabPtr.c \ + UngrabSvr.c \ + UninsCmap.c \ + UnldFont.c \ + UnmapSubs.c \ + UnmapWin.c \ + VisUtil.c \ + WarpPtr.c \ + Window.c \ + WinEvent.c \ + Withdraw.c \ + WMGeom.c \ + WMProps.c \ + WrBitF.c \ + xcb_disp.c \ + xcb_io.c \ + XlibAsync.c \ + XlibInt.c \ + Xrm.c \ + + +INCLUDES := . xcms xlibi18n xkb $(MHMAKECONF)\X11 $(OBJDIR) $(INCLUDES) + +KEYSYMDEF = $(MHMAKECONF)/X11/keysymdef.h + +load_makefile util\makefile MAKESERVER=0 DEBUG=$(DEBUG) + +$(OBJDIR)\ks_tables.h: $(KEYSYMDEF) util\$(OBJDIR)\makekeys.exe + util\$(OBJDIR)\makekeys $(relpath $<) > $(relpath $@) + + diff --git a/libX11/src/util/makefile b/libX11/src/util/makefile new file mode 100644 index 000000000..27da68335 --- /dev/null +++ b/libX11/src/util/makefile @@ -0,0 +1,6 @@ +TTYAPP=makekeys + +DEFINES += X11_t TRANS_CLIENT + +CSRCS = makekeys.c + diff --git a/libX11/src/util/makekeys.c b/libX11/src/util/makekeys.c index 5613e42ff..f1fabaadf 100644 --- a/libX11/src/util/makekeys.c +++ b/libX11/src/util/makekeys.c @@ -34,6 +34,7 @@ from The Open Group. #include <X11/keysymdef.h> #include <stdio.h> #include <stdlib.h> +#include <unistd.h> #include "../Xresinternal.h" @@ -158,7 +159,7 @@ main(int argc, char *argv[]) num_found = 0; for (z = ksnum; z < KTNUM; z++) { max_rehash = 0; - for (name = tab, i = z; --i >= 0;) + for (name = &tab[0], i = z; --i >= 0;) *name++ = 0; for (i = 0; i < ksnum; i++) { name = info[i].name; diff --git a/libX11/src/xcb_io.c b/libX11/src/xcb_io.c index 727c6c79f..db75e4a24 100644 --- a/libX11/src/xcb_io.c +++ b/libX11/src/xcb_io.c @@ -23,6 +23,9 @@ #ifdef HAVE_SYS_SELECT_H #include <sys/select.h> #endif +#include <sys/time.h> + +#include <X11/Xtrans/Xtrans.h> #define xcb_fail_assert(_message, _var) { \ unsigned int _var = 1; \ @@ -148,7 +151,7 @@ static void check_internal_connections(Display *dpy) static PendingRequest *append_pending_request(Display *dpy, unsigned long sequence) { PendingRequest *node = malloc(sizeof(PendingRequest)); - assert(node); + assert(node!=NULL); node->next = NULL; node->sequence = sequence; node->reply_waiter = 0; diff --git a/libX11/src/xcms/config.h b/libX11/src/xcms/config.h new file mode 100644 index 000000000..5052f74ff --- /dev/null +++ b/libX11/src/xcms/config.h @@ -0,0 +1,5 @@ +#include <string.h> +#include <unistd.h> + +#define XCMSDB "Xcms.txt" + diff --git a/libX11/src/xcms/makefile b/libX11/src/xcms/makefile new file mode 100644 index 000000000..0ba42a246 --- /dev/null +++ b/libX11/src/xcms/makefile @@ -0,0 +1,72 @@ +LIBRARY = libxcms + +DEFINES += HAVE_CONFIG_H LIB11_DLL + + +CSRCS = \ + AddDIC.c \ + AddSF.c \ + CCC.c \ + CvColW.c \ + CvCols.c \ + HVC.c \ + HVCGcC.c \ + HVCGcV.c \ + HVCGcVC.c \ + HVCMnV.c \ + HVCMxC.c \ + HVCMxV.c \ + HVCMxVC.c \ + HVCMxVs.c \ + HVCWpAj.c \ + IdOfPr.c \ + LRGB.c \ + Lab.c \ + LabGcC.c \ + LabGcL.c \ + LabGcLC.c \ + LabMnL.c \ + LabMxC.c \ + LabMxL.c \ + LabMxLC.c \ + LabWpAj.c \ + Luv.c \ + LuvGcC.c \ + LuvGcL.c \ + LuvGcLC.c \ + LuvMnL.c \ + LuvMxC.c \ + LuvMxL.c \ + LuvMxLC.c \ + LuvWpAj.c \ + OfCCC.c \ + PrOfId.c \ + QBlack.c \ + QBlue.c \ + QGreen.c \ + QRed.c \ + QWhite.c \ + QuCol.c \ + QuCols.c \ + SetCCC.c \ + SetGetCols.c \ + StCol.c \ + StCols.c \ + UNDEFINED.c \ + XRGB.c \ + XYZ.c \ + cmsAllCol.c \ + cmsAllNCol.c \ + cmsCmap.c \ + cmsColNm.c \ + cmsGlobls.c \ + cmsInt.c \ + cmsLkCol.c \ + cmsMath.c \ + cmsProp.c \ + cmsTrig.c \ + uvY.c \ + xyY.c + +INCLUDES += ..\..\include\X11 ..\..\src\xlibi18n ..\..\src + diff --git a/libX11/src/xkb/Makefile b/libX11/src/xkb/Makefile new file mode 100644 index 000000000..56aecc880 --- /dev/null +++ b/libX11/src/xkb/Makefile @@ -0,0 +1,29 @@ +LIBRARY = libxkb + +DEFINES += LIB11_DLL + +CSRCS = \ + XKB.c \ + XKBBind.c \ + XKBCompat.c \ + XKBCtrls.c \ + XKBCvt.c \ + XKBGetMap.c \ + XKBGetByName.c \ + XKBNames.c \ + XKBRdBuf.c \ + XKBSetMap.c \ + XKBUse.c \ + XKBleds.c \ + XKBBell.c \ + XKBGeom.c \ + XKBSetGeom.c \ + XKBExtDev.c \ + XKBList.c \ + XKBMisc.c \ + XKBMAlloc.c \ + XKBGAlloc.c \ + XKBAlloc.c + +INCLUDES += ..\..\include\X11 ..\..\src\xlibi18n + diff --git a/libX11/src/xkb/XKB.c b/libX11/src/xkb/XKB.c index 6413ba274..dbcfff05d 100644 --- a/libX11/src/xkb/XKB.c +++ b/libX11/src/xkb/XKB.c @@ -28,6 +28,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <config.h> #endif #include <stdio.h> + +#ifdef XKB_IN_SERVER +#define XkbVirtualModsToReal SrvXkbVirtualModsToReal +#endif + #include "Xlibint.h" #include <X11/extensions/XKBproto.h> #include "XKBlibint.h" diff --git a/libX11/src/xkb/XKBBind.c b/libX11/src/xkb/XKBBind.c index 24d37e346..071e02f70 100644 --- a/libX11/src/xkb/XKBBind.c +++ b/libX11/src/xkb/XKBBind.c @@ -31,6 +31,34 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include <config.h> #endif + +#ifdef XKB_IN_SERVER +#define XkbAllocClientMap SrvXkbAllocClientMap +#define XkbAllocServerMap SrvXkbAllocServerMap +#define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey +#define XkbCopyKeyTypes SrvXkbCopyKeyTypes +#define XkbFreeClientMap SrvXkbFreeClientMap +#define XkbFreeServerMap SrvXkbFreeServerMap +#define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols +#define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey +#define XkbResizeKeyActions SrvXkbResizeKeyActions +#define XkbResizeKeySyms SrvXkbResizeKeySyms +#define XkbResizeKeyType SrvXkbResizeKeyType +#define XkbAllocCompatMap SrvXkbAllocCompatMap +#define XkbAllocControls SrvXkbAllocControls +#define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps +#define XkbAllocKeyboard SrvXkbAllocKeyboard +#define XkbAllocNames SrvXkbAllocNames +#define XkbFreeCompatMap SrvXkbFreeCompatMap +#define XkbFreeKeyboard SrvXkbFreeKeyboard +#define XkbFreeNames SrvXkbFreeNames +#define XkbLatchModifiers SrvXkbLatchModifiers +#define XkbLatchGroup SrvXkbLatchGroup +#define XkbVirtualModsToReal SrvXkbVirtualModsToReal +#define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange +#define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges +#endif + #include "XKBlib.h" #include <X11/Xlibint.h> #include <X11/Xutil.h> diff --git a/libX11/src/xkb/XKBGAlloc.c b/libX11/src/xkb/XKBGAlloc.c index 63bb2db38..ecac4f33c 100644 --- a/libX11/src/xkb/XKBGAlloc.c +++ b/libX11/src/xkb/XKBGAlloc.c @@ -28,8 +28,10 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <config.h> #endif - #include <stdio.h> +#include <unistd.h> + + #include "Xlibint.h" #include "XKBlibint.h" #include <X11/extensions/XKBgeom.h> diff --git a/libX11/src/xkb/XKBGeom.c b/libX11/src/xkb/XKBGeom.c index feaaab6f8..c42a453e4 100644 --- a/libX11/src/xkb/XKBGeom.c +++ b/libX11/src/xkb/XKBGeom.c @@ -37,12 +37,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <X11/extensions/XKBproto.h> #include "XKBlibint.h" -#ifndef MINSHORT #define MINSHORT -32768 -#endif -#ifndef MAXSHORT #define MAXSHORT 32767 -#endif /***====================================================================***/ diff --git a/libX11/src/xkb/XKBGetMap.c b/libX11/src/xkb/XKBGetMap.c index 2278c7519..0e4c567ee 100644 --- a/libX11/src/xkb/XKBGetMap.c +++ b/libX11/src/xkb/XKBGetMap.c @@ -28,6 +28,34 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include <config.h> #endif + +#ifdef XKB_IN_SERVER +#define XkbAllocClientMap SrvXkbAllocClientMap +#define XkbAllocServerMap SrvXkbAllocServerMap +#define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey +#define XkbCopyKeyTypes SrvXkbCopyKeyTypes +#define XkbFreeClientMap SrvXkbFreeClientMap +#define XkbFreeServerMap SrvXkbFreeServerMap +#define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols +#define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey +#define XkbResizeKeyActions SrvXkbResizeKeyActions +#define XkbResizeKeySyms SrvXkbResizeKeySyms +#define XkbResizeKeyType SrvXkbResizeKeyType +#define XkbAllocCompatMap SrvXkbAllocCompatMap +#define XkbAllocControls SrvXkbAllocControls +#define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps +#define XkbAllocKeyboard SrvXkbAllocKeyboard +#define XkbAllocNames SrvXkbAllocNames +#define XkbFreeCompatMap SrvXkbFreeCompatMap +#define XkbFreeKeyboard SrvXkbFreeKeyboard +#define XkbFreeNames SrvXkbFreeNames +#define XkbLatchModifiers SrvXkbLatchModifiers +#define XkbLatchGroup SrvXkbLatchGroup +#define XkbVirtualModsToReal SrvXkbVirtualModsToReal +#define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange +#define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges +#endif + #include "Xlibint.h" #include <X11/extensions/XKBproto.h> #include "XKBlibint.h" diff --git a/libX11/src/xkb/XKBMisc.c b/libX11/src/xkb/XKBMisc.c index a6c916c3b..d25aa217b 100644 --- a/libX11/src/xkb/XKBMisc.c +++ b/libX11/src/xkb/XKBMisc.c @@ -35,6 +35,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <X11/keysym.h> #include "XKBlibint.h" +#ifdef XKB_IN_SERVER +#define XkbVirtualModsToReal SrvXkbVirtualModsToReal +#endif /***====================================================================***/ diff --git a/libX11/src/xkb/XKBSetGeom.c b/libX11/src/xkb/XKBSetGeom.c index 7ac37ca61..7998ad72e 100644 --- a/libX11/src/xkb/XKBSetGeom.c +++ b/libX11/src/xkb/XKBSetGeom.c @@ -36,12 +36,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <X11/extensions/XKBgeom.h> #include <X11/extensions/XKBproto.h> -#ifndef MINSHORT #define MINSHORT -32768 -#endif -#ifndef MAXSHORT #define MAXSHORT 32767 -#endif /***====================================================================***/ diff --git a/libX11/src/xkb/XKBUse.c b/libX11/src/xkb/XKBUse.c index 3194137e3..b0a031812 100644 --- a/libX11/src/xkb/XKBUse.c +++ b/libX11/src/xkb/XKBUse.c @@ -29,6 +29,34 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include <stdio.h> #include <ctype.h> + +#ifdef XKB_IN_SERVER +#define XkbAllocClientMap SrvXkbAllocClientMap +#define XkbAllocServerMap SrvXkbAllocServerMap +#define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey +#define XkbCopyKeyTypes SrvXkbCopyKeyTypes +#define XkbFreeClientMap SrvXkbFreeClientMap +#define XkbFreeServerMap SrvXkbFreeServerMap +#define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols +#define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey +#define XkbResizeKeyActions SrvXkbResizeKeyActions +#define XkbResizeKeySyms SrvXkbResizeKeySyms +#define XkbResizeKeyType SrvXkbResizeKeyType +#define XkbAllocCompatMap SrvXkbAllocCompatMap +#define XkbAllocControls SrvXkbAllocControls +#define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps +#define XkbAllocKeyboard SrvXkbAllocKeyboard +#define XkbAllocNames SrvXkbAllocNames +#define XkbFreeCompatMap SrvXkbFreeCompatMap +#define XkbFreeKeyboard SrvXkbFreeKeyboard +#define XkbFreeNames SrvXkbFreeNames +#define XkbLatchModifiers SrvXkbLatchModifiers +#define XkbLatchGroup SrvXkbLatchGroup +#define XkbVirtualModsToReal SrvXkbVirtualModsToReal +#define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange +#define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges +#endif + #include "Xlibint.h" #include <X11/extensions/XKBproto.h> #include "XKBlibint.h" diff --git a/libX11/src/xlibi18n/XDefaultIMIF.c b/libX11/src/xlibi18n/XDefaultIMIF.c index db0f5d1fa..f271bded1 100644 --- a/libX11/src/xlibi18n/XDefaultIMIF.c +++ b/libX11/src/xlibi18n/XDefaultIMIF.c @@ -64,6 +64,7 @@ Sun Microsystems, Inc. or its licensors is granted. #include <config.h> #endif #include <stdio.h> +#include <unistd.h> #include "Xlibint.h" #include "Xlcint.h" #include "XlcGeneric.h" diff --git a/libX11/src/xlibi18n/XDefaultOMIF.c b/libX11/src/xlibi18n/XDefaultOMIF.c index a06f69a1f..2ff6c414c 100644 --- a/libX11/src/xlibi18n/XDefaultOMIF.c +++ b/libX11/src/xlibi18n/XDefaultOMIF.c @@ -69,6 +69,8 @@ Sun Microsystems, Inc. or its licensors is granted. #include <X11/Xos.h> #include <X11/Xatom.h> #include <stdio.h> +#include <unistd.h> +#include <stdint.h> #define MAXFONTS 100 diff --git a/libX11/src/xlibi18n/XimProto.h b/libX11/src/xlibi18n/XimProto.h index 6b0096dd6..9551301a2 100644 --- a/libX11/src/xlibi18n/XimProto.h +++ b/libX11/src/xlibi18n/XimProto.h @@ -143,6 +143,13 @@ PERFORMANCE OF THIS SOFTWARE. /* * byte order */ +#ifdef BIGENDIAN +#undef BIGENDIAN +#endif +#ifdef LITTLEENDIAN +#undef LITTLEENDIAN +#endif + #define BIGENDIAN (CARD8)0x42 /* MSB first */ #define LITTLEENDIAN (CARD8)0x6c /* LSB first */ diff --git a/libX11/src/xlibi18n/lcDB.c b/libX11/src/xlibi18n/lcDB.c index fda3ae7e3..fca9758d8 100644 --- a/libX11/src/xlibi18n/lcDB.c +++ b/libX11/src/xlibi18n/lcDB.c @@ -48,6 +48,8 @@ #endif /* NOT_X_ENV */ +#include <stdint.h> + /* specifying NOT_X_ENV allows users to just use the database parsing routine. */ /* For UDC/VW */ @@ -63,6 +65,7 @@ #endif #include <stdio.h> +#include <unistd.h> typedef struct _DatabaseRec { char *category; diff --git a/libX11/src/xlibi18n/lcDynamic.c b/libX11/src/xlibi18n/lcDynamic.c index 3821bfff1..a50aa70fa 100644 --- a/libX11/src/xlibi18n/lcDynamic.c +++ b/libX11/src/xlibi18n/lcDynamic.c @@ -51,7 +51,7 @@ from The Open Group. #include "Xlcint.h" #ifndef XLOCALEDIR -#define XLOCALEDIR "/usr/lib/X11/locale" +#define XLOCALEDIR "locale" #endif #define LCLIBNAME "xi18n.so" diff --git a/libX11/src/xlibi18n/lcFile.c b/libX11/src/xlibi18n/lcFile.c index bf8908458..c3ea02ead 100644 --- a/libX11/src/xlibi18n/lcFile.c +++ b/libX11/src/xlibi18n/lcFile.c @@ -192,7 +192,7 @@ _XlcParsePath( } #ifndef XLOCALEDIR -#define XLOCALEDIR "/usr/lib/X11/locale" +#define XLOCALEDIR "locale" #endif void diff --git a/libX11/src/xlibi18n/lcGeneric.c b/libX11/src/xlibi18n/lcGeneric.c index 20c455c13..13405a65b 100644 --- a/libX11/src/xlibi18n/lcGeneric.c +++ b/libX11/src/xlibi18n/lcGeneric.c @@ -32,6 +32,7 @@ #include <config.h> #endif #include <stdio.h> +#include <unistd.h> #include "Xlibint.h" #include "XlcGeneric.h" diff --git a/libX11/src/xlibi18n/lcPublic.c b/libX11/src/xlibi18n/lcPublic.c index 39ec0829b..46c652e2b 100644 --- a/libX11/src/xlibi18n/lcPublic.c +++ b/libX11/src/xlibi18n/lcPublic.c @@ -27,6 +27,7 @@ #include <config.h> #endif #include <stdio.h> +#include <unistd.h> #include "Xlibint.h" #include "XlcPubI.h" diff --git a/libX11/src/xlibi18n/lcUTF8.c b/libX11/src/xlibi18n/lcUTF8.c index 0f3d0d2ca..930edcb18 100644 --- a/libX11/src/xlibi18n/lcUTF8.c +++ b/libX11/src/xlibi18n/lcUTF8.c @@ -75,6 +75,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <config.h> #endif #include <stdio.h> +#include <unistd.h> #include "Xlibint.h" #include "XlcPubI.h" #include "XlcGeneric.h" diff --git a/libX11/src/xlibi18n/makefile b/libX11/src/xlibi18n/makefile new file mode 100644 index 000000000..01fcfa26d --- /dev/null +++ b/libX11/src/xlibi18n/makefile @@ -0,0 +1,37 @@ +LIBRARY = libi18n + +INCLUDES += ..\..\include\X11 .. +DEFINES += XLOCALELIBDIR="\".\"" LIB11_DLL + +CSRCS = \ + $(XI18N_DL_SOURCES) \ + XDefaultIMIF.c \ + XDefaultOMIF.c \ + xim_trans.c\ + ICWrap.c\ + IMWrap.c\ + imKStoUCS.c\ + lcCT.c\ + lcCharSet.c\ + lcConv.c\ + lcDB.c\ + lcDynamic.c\ + lcFile.c\ + lcGeneric.c\ + lcInit.c\ + lcPrTxt.c\ + lcPubWrap.c\ + lcPublic.c\ + lcRM.c\ + lcStd.c\ + lcTxtPr.c\ + lcUTF8.c\ + lcUtil.c\ + lcWrap.c\ + mbWMProps.c\ + mbWrap.c\ + utf8WMProps.c\ + utf8Wrap.c\ + wcWrap.c + + |