-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Part1|xwindow PR] Split up to dbus #22642
Merged
Merged
Changes from 50 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
464cdd2
first batch of xwindow PR ports - up to dbus
Neumann-A 7e9e1c6
first batch of xwindow PR ports - up to dbus
Neumann-A 80200f9
Merge branch 'xwindows_to_dbus' of https://github.com/Neumann-A/vcpkg…
Neumann-A c0e7784
Merge remote-tracking branch 'upstream/master' into xwindows_to_dbus
Neumann-A 6d912fb
format manifest
Neumann-A 3f606c0
version stuff
Neumann-A 60af225
remove if block
Neumann-A 8e2c588
version stuff
Neumann-A 6b110e5
fix xcb hash
Neumann-A 1a265e8
fix xproto dependency on meson blocking cross builds
Neumann-A 4cdd864
adjust message
Neumann-A 0f3fda9
use X11_xcb_LIB
Neumann-A 3107751
version stuff
Neumann-A 05779b4
put xlib arm64-windows on baseline
Neumann-A 18f6351
fix dbus on osx and linux
Neumann-A 5b6f45f
version stuff
Neumann-A faedbf6
forget to set the value
Neumann-A 8235be2
fix --export-dynamic on osx
Neumann-A cdcadf4
version dbus
Neumann-A a49e1a2
ci-retrigger
Neumann-A b86ca3b
Merge branch 'master' into xwindows_to_dbus
LilyWangLL 02ae414
Merge remote-tracking branch 'upstream/master' into xwindows_to_dbus
e2b2ceb
add license (needs tool update)
66508e2
version adjustments
1e07d62
version update
18f986a
Merge remote-tracking branch 'upstream/master' into xwindows_to_dbus
Neumann-A da0825f
Merge branch 'microsoft:master' into xwindows_to_dbus
Neumann-A 65212fa
Merge branch 'master' of https://github.com/microsoft/vcpkg into xwin…
6401079
Merge branch 'master' of https://github.com/microsoft/vcpkg into xwin…
c3efd0b
Merge remote-tracking branch 'upstream/master' into xwindows_to_dbus
Neumann-A 65338c5
remove unnecessary comments
Neumann-A 1487910
v db
Neumann-A 55b1be2
Merge remote-tracking branch 'upstream/master' into xwindows_to_dbus
Neumann-A 9f38ff3
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal b1f2a39
Apply suggestions from code review
Neumann-A b99527f
Merge branch 'xwindows_to_dbus' of https://github.com/Neumann-A/vcpkg…
Neumann-A a505443
Merge remote-tracking branch 'upstream/master' into xwindows_to_dbus
Neumann-A 6ca0394
nitpicks
Neumann-A b96b22a
rename xau to libxau
Neumann-A 0739e4c
use vcpkg_install_copyright and silence usage
Neumann-A 8288ee0
xtrans silence usage
Neumann-A 634fe05
format-manifest
Neumann-A 6aee76e
v db
Neumann-A 6d7ae3f
make license null for ports without exact match
Neumann-A b5ea100
xdmcp rename to libxdmcp
Neumann-A 1088d6c
merge x11 wrapper into xlib
Neumann-A 3a29d50
Merge remote-tracking branch 'upstream/master' into xwindows_to_dbus
Neumann-A 3de1318
v db
Neumann-A f703d74
missed dbus depending on x11.
Neumann-A 1a13860
v db
Neumann-A c9a9b68
Update scripts/ci.baseline.txt
Neumann-A File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt | ||
index 8cde1ffe0..d4d09f223 100644 | ||
--- a/tools/CMakeLists.txt | ||
+++ b/tools/CMakeLists.txt | ||
@@ -91,7 +91,9 @@ endif() | ||
add_executable(dbus-launch ${dbus_launch_SOURCES}) | ||
target_link_libraries(dbus-launch ${DBUS_LIBRARIES}) | ||
if(DBUS_BUILD_X11) | ||
- target_link_libraries(dbus-launch ${X11_LIBRARIES} ) | ||
+ find_package(Threads REQUIRED) | ||
+ target_link_libraries(dbus-launch ${X11_LIBRARIES} ${X11_xcb_LIB} ${X11_Xau_LIB} ${X11_Xdmcp_LIB} Threads::Threads) | ||
+ target_include_directories(dbus-launch PRIVATE ${X11_INCLUDE_DIR}) | ||
endif() | ||
install(TARGETS dbus-launch ${INSTALL_TARGETS_DEFAULT_ARGS}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake | ||
index 7bc789f0e..ec476d9ed 100644 | ||
--- a/cmake/ConfigureChecks.cmake | ||
+++ b/cmake/ConfigureChecks.cmake | ||
@@ -44,6 +44,7 @@ check_include_file(sys/inotify.h DBUS_BUS_ENABLE_INOTIFY) | ||
|
||
check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE) # dbus-sysdeps.c, dbus-sysdeps-win.c | ||
check_symbol_exists(getgrouplist "grp.h" HAVE_GETGROUPLIST) # dbus-sysdeps.c | ||
+check_symbol_exists(getpeereid "sys/types.h;unistd.h" HAVE_GETPEEREID) # dbus-sysdeps.c, | ||
check_symbol_exists(getpeerucred "ucred.h" HAVE_GETPEERUCRED) # dbus-sysdeps.c, dbus-sysdeps-win.c | ||
check_symbol_exists(nanosleep "time.h" HAVE_NANOSLEEP) # dbus-sysdeps.c | ||
check_symbol_exists(getpwnam_r "errno.h;pwd.h" HAVE_GETPWNAM_R) # dbus-sysdeps-util-unix.c | ||
diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake | ||
index cbffcfa91..1f055ddb9 100644 | ||
--- a/cmake/config.h.cmake | ||
+++ b/cmake/config.h.cmake | ||
@@ -169,6 +169,9 @@ | ||
/* Define to 1 if you have getgrouplist */ | ||
#cmakedefine HAVE_GETGROUPLIST 1 | ||
|
||
+/* Define to 1 if you have getpeereid */ | ||
+#cmakedefine HAVE_GETPEEREID 1 | ||
+ | ||
/* Define to 1 if you have getpeerucred */ | ||
#cmakedefine HAVE_GETPEERUCRED 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 1c2f6ba5b..a5f7fe222 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -723,8 +723,10 @@ add_custom_target(help-options | ||
# create pkgconfig file | ||
# | ||
if(DBUS_ENABLE_PKGCONFIG) | ||
- set(PLATFORM_LIBS pthread ${LIBRT}) | ||
- if(PKG_CONFIG_FOUND) | ||
+ if(NOT WIN32) | ||
+ set(PLATFORM_LIBS pthread ${LIBRT}) | ||
+ endif() | ||
+ if(1) | ||
# convert lists of link libraries into -lstdc++ -lm etc.. | ||
foreach(LIB ${PLATFORM_LIBS}) | ||
set(LIBDBUS_LIBS "${LIBDBUS_LIBS} -l${LIB}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
vcpkg_from_gitlab( | ||
GITLAB_URL https://gitlab.freedesktop.org/ | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO dbus/dbus | ||
REF c91ca6edad658274607323a438eea7c7c6c5e392 #1.13.18 | ||
SHA512 4dd4d369152591040ebe9f474a0ba8911d8a91546d64b1d6f7335b7fd8026bd99a8a4fe1c78b80eb2e31e9e58324d432857e2a7af1d1cb950d22b4430cc0f7ac | ||
HEAD_REF master | ||
PATCHES | ||
cmake.dep.patch | ||
rt_pc_link.patch | ||
pkgconfig.patch | ||
getpeereid.patch # missing check from configure.ac | ||
rdynamic.patch # OSX doesn't like '-Wl,--export-dynamic' | ||
) | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
-DDBUS_BUILD_TESTS=OFF | ||
-DDBUS_ENABLE_XML_DOCS=OFF | ||
-DDBUS_INSTALL_SYSTEM_LIBS=OFF | ||
-DDBUS_ENABLE_PKGCONFIG=ON | ||
#-DDBUS_SERVICE=ON | ||
-DDBUS_WITH_GLIB=ON | ||
-DXSLTPROC_EXECUTABLE=FALSE | ||
-DENABLE_SYSTEMD=ON | ||
-DDBUS_ENABLE_PKGCONFIG=ON | ||
-DPKG_CONFIG_FOUND=TRUE | ||
"-DCMAKE_INSTALL_SYSCONFDIR=${CURRENT_PACKAGES_DIR}/etc/${PORT}" | ||
"-DWITH_SYSTEMD_SYSTEMUNITDIR=lib/systemd/system" | ||
"-DWITH_SYSTEMD_USERUNITDIR=lib/systemd/user" | ||
) | ||
vcpkg_cmake_install() | ||
vcpkg_copy_pdbs() | ||
vcpkg_cmake_config_fixup(PACKAGE_NAME "DBus1" CONFIG_PATH "lib/cmake/DBus1") | ||
vcpkg_fixup_pkgconfig() | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") | ||
|
||
# Handle copyright | ||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) | ||
|
||
Neumann-A marked this conversation as resolved.
Show resolved
Hide resolved
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/var/" | ||
"${CURRENT_PACKAGES_DIR}/var" | ||
"${CURRENT_PACKAGES_DIR}/share/dbus-1/services" | ||
"${CURRENT_PACKAGES_DIR}/share/dbus-1/session.d" | ||
"${CURRENT_PACKAGES_DIR}/share/dbus-1/system-services" | ||
"${CURRENT_PACKAGES_DIR}/share/dbus-1/system.d") | ||
|
||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}") | ||
set(TOOLS daemon launch monitor run-session send test-tool update-activation-environment) | ||
if(VCPKG_TARGET_IS_WINDOWS) | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/dbus-env.bat" "${CURRENT_PACKAGES_DIR}" "%~dp0/..") | ||
else() | ||
list(APPEND TOOLS cleanup-sockets uuidgen) | ||
endif() | ||
list(TRANSFORM TOOLS PREPEND "dbus-" ) | ||
vcpkg_copy_tools(TOOL_NAMES ${TOOLS} AUTO_CLEAN) | ||
|
||
|
||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 1c2f6ba5b..6a4c5410b 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -277,8 +277,8 @@ endif() | ||
|
||
if(UNIX AND NOT DBUS_DISABLE_ASSERT) | ||
# required for backtrace | ||
- set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wl,--export-dynamic") | ||
- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wl,--export-dynamic") | ||
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -rdynamic") | ||
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -rdynamic") | ||
add_definitions(-DDBUS_BUILT_R_DYNAMIC) | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index caef73840..caf7e61bf 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -726,7 +726,7 @@ if(DBUS_ENABLE_PKGCONFIG) | ||
set(PLATFORM_LIBS pthread ${LIBRT}) | ||
if(PKG_CONFIG_FOUND) | ||
# convert lists of link libraries into -lstdc++ -lm etc.. | ||
- foreach(LIB ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${PLATFORM_LIBS}) | ||
+ foreach(LIB ${PLATFORM_LIBS}) | ||
set(LIBDBUS_LIBS "${LIBDBUS_LIBS} -l${LIB}") | ||
endforeach() | ||
set(original_prefix "${CMAKE_INSTALL_PREFIX}") | ||
diff --git a/dbus/CMakeLists.txt b/dbus/CMakeLists.txt | ||
index 63070b69b..5752b7492 100644 | ||
--- a/dbus/CMakeLists.txt | ||
+++ b/dbus/CMakeLists.txt | ||
@@ -253,6 +253,9 @@ endif() | ||
|
||
# for clock_getres() on e.g. GNU/Linux (but not Android) | ||
find_library(LIBRT rt) | ||
+get_filename_component(LIBRT "${LIBRT}" NAME_WLE) | ||
+string(REPLACE "lib" "" LIBRT "${LIBRT}") | ||
+set(LIBRT "${LIBRT}" CACHE STRING "" FORCE) | ||
|
||
# for socket() on QNX | ||
find_library(LIBSOCKET socket) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "dbus", | ||
"version": "1.13.18", | ||
"description": "D-Bus specification and reference implementation, including libdbus and dbus-daemon", | ||
"homepage": "https://gitlab.freedesktop.org/dbus/dbus", | ||
"license": "AFL-2.1 OR GPL-2.0-or-later", | ||
"dependencies": [ | ||
"expat", | ||
"glib", | ||
"libx11", | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h | ||
index 844571688..e46c4ec5d 100644 | ||
--- a/include/X11/Xlibint.h | ||
+++ b/include/X11/Xlibint.h | ||
@@ -1351,11 +1351,14 @@ extern int _XOpenFile( | ||
int /* flags */ | ||
); | ||
|
||
+#if defined(_MSC_VER) && !defined(mode_t) | ||
+typedef int mode_t; | ||
+#endif | ||
extern int _XOpenFileMode( | ||
_Xconst char* /* path */, | ||
int /* flags */, | ||
mode_t /* mode */ | ||
); | ||
|
||
extern void* _XFopenFile( | ||
_Xconst char* /* path */, | ||
diff --git a/modules/im/ximcp/imLcLkup.c b/modules/im/ximcp/imLcLkup.c | ||
index 56dba9673..d10de825e 100644 | ||
--- a/modules/im/ximcp/imLcLkup.c | ||
+++ b/modules/im/ximcp/imLcLkup.c | ||
@@ -61,27 +61,37 @@ _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; | ||
+#ifndef _MSC_VER | ||
char mb2[XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)]; | ||
+#else | ||
+ char *mb2 = (char*)malloc(XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)*sizeof(char)); | ||
+#endif | ||
ret = _Xlcwctomb(ic->core.im->core.lcd, mb2, BRL_UC_ROW | pattern); | ||
if(ret > bytes) { | ||
if(status) *status = XBufferOverflow; | ||
+#ifdef _MSC_VER | ||
+ free(mb2); | ||
+#endif | ||
return(ret); | ||
} | ||
if(keysym) *keysym = XK_braille_blank | pattern; | ||
if(ret > 0) { | ||
if (keysym) { | ||
if(status) *status = XLookupBoth; | ||
} else { | ||
if(status) *status = XLookupChars; | ||
} | ||
memcpy(buffer, mb2, ret); | ||
} else { | ||
if(keysym) { | ||
if(status) *status = XLookupKeySym; | ||
} else { | ||
if(status) *status = XLookupNone; | ||
} | ||
} | ||
+#ifdef _MSC_VER | ||
+ free(mb2); | ||
+#endif | ||
} else { /* Composed Event */ | ||
ret = strlen(&mb[b[ic->private.local.composed].mb]); | ||
if(ret > bytes) { | ||
diff --git a/src/XlibInt.c b/src/XlibInt.c | ||
index e4fb4e5f2..4cfa1aeab 100644 | ||
--- a/src/XlibInt.c | ||
+++ b/src/XlibInt.c | ||
@@ -60,6 +60,8 @@ from The Open Group. | ||
/* Needed for ioctl() on Solaris */ | ||
#ifdef HAVE_UNISTD_H | ||
#include <unistd.h> | ||
+#else | ||
+ #define F_OK 0 | ||
#endif | ||
|
||
#ifdef XTHREADS | ||
@@ -985,7 +987,7 @@ _XWireToEvent( | ||
case KeymapNotify: | ||
{ | ||
register XKeymapEvent *ev = (XKeymapEvent *) re; | ||
- ev->window = None; | ||
+ ev->window = 0; | ||
memcpy(&ev->key_vector[1], | ||
(char *)((xKeymapEvent *) event)->map, | ||
sizeof (((xKeymapEvent *) event)->map)); | ||
@@ -1919,7 +1925,11 @@ int _XOpenFileMode(path, flags, mode) | ||
UINT olderror = SetErrorMode (SEM_FAILCRITICALERRORS); | ||
|
||
if (AccessFile (path, buf, MAX_PATH, &bufp)) | ||
+#ifndef _MSC_VER | ||
ret = open (bufp, flags, mode); | ||
+#else | ||
+ ret = _open (bufp, flags, mode); | ||
+#endif | ||
|
||
(void) SetErrorMode (olderror); | ||
|
||
diff --git a/src/xlibi18n/XDefaultOMIF.c b/src/xlibi18n/XDefaultOMIF.c | ||
index 9345547c3..77d914fe1 100644 | ||
--- a/src/xlibi18n/XDefaultOMIF.c | ||
+++ b/src/xlibi18n/XDefaultOMIF.c | ||
@@ -70,6 +70,14 @@ Sun Microsystems, Inc. or its licensors is granted. | ||
#include <X11/Xatom.h> | ||
#include <stdio.h> | ||
|
||
+#if !defined(ssize_t) | ||
+ #ifdef _WIN64 | ||
+ #define ssize_t long long | ||
+ #else | ||
+ #define ssize_t long | ||
+ #endif | ||
+#endif | ||
+ | ||
#define MAXFONTS 100 | ||
|
||
#define XOM_GENERIC(om) (&((XOMGeneric) om)->gen) | ||
diff --git a/src/xlibi18n/lcDB.c b/src/xlibi18n/lcDB.c | ||
index e04a5d89f..fa46f8ecc 100644 | ||
--- a/src/xlibi18n/lcDB.c | ||
+++ b/src/xlibi18n/lcDB.c | ||
@@ -65,6 +65,14 @@ | ||
|
||
#include <stdio.h> | ||
|
||
+#if !defined(ssize_t) | ||
+ #ifdef _WIN64 | ||
+ #define ssize_t long long | ||
+ #else | ||
+ #define ssize_t long | ||
+ #endif | ||
+#endif | ||
+ | ||
typedef struct _DatabaseRec { | ||
char *category; | ||
char *name; | ||
diff --git a/src/xlibi18n/lcFile.c b/src/xlibi18n/lcFile.c | ||
index e43ac2c0e..d9f49b725 100644 | ||
--- a/src/xlibi18n/lcFile.c | ||
+++ b/src/xlibi18n/lcFile.c | ||
@@ -32,7 +32,9 @@ | ||
#include "Xlibint.h" | ||
#include "XlcPubI.h" | ||
#include <X11/Xos.h> | ||
+#ifdef HAVE_UNISTD_H | ||
#include <unistd.h> | ||
+#endif | ||
|
||
/************************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h | ||
index 603d05669..8596cb434 100644 | ||
--- a/include/X11/Xlibint.h | ||
+++ b/include/X11/Xlibint.h | ||
@@ -389,23 +389,26 @@ struct _XLockPtrs { | ||
#define _XLockMutex_fn (*_XLockMutex_fn_p) | ||
#define _XUnlockMutex_fn (*_XUnlockMutex_fn_p) | ||
#define _Xglobal_lock (*_Xglobal_lock_p) | ||
+#define X_LOCK_EXTERN __declspec(dllimport) extern | ||
+#else | ||
+#define X_LOCK_EXTERN extern | ||
#endif | ||
|
||
/* in XlibInt.c */ | ||
-extern void (*_XCreateMutex_fn)( | ||
+X_LOCK_EXTERN void (*_XCreateMutex_fn)( | ||
LockInfoPtr /* lock */ | ||
); | ||
-extern void (*_XFreeMutex_fn)( | ||
+X_LOCK_EXTERN void (*_XFreeMutex_fn)( | ||
LockInfoPtr /* lock */ | ||
); | ||
-extern void (*_XLockMutex_fn)( | ||
+X_LOCK_EXTERN void (*_XLockMutex_fn)( | ||
LockInfoPtr /* lock */ | ||
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) | ||
, char * /* file */ | ||
, int /* line */ | ||
#endif | ||
); | ||
-extern void (*_XUnlockMutex_fn)( | ||
+X_LOCK_EXTERN void (*_XUnlockMutex_fn)( | ||
LockInfoPtr /* lock */ | ||
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) | ||
, char * /* file */ | ||
@@ -413,7 +416,7 @@ extern void (*_XUnlockMutex_fn)( | ||
#endif | ||
); | ||
|
||
-extern LockInfoPtr _Xglobal_lock; | ||
+X_LOCK_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__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/src/XlibInt.c b/src/XlibInt.c | ||
index bab39bc00..31b6511cb 100644 | ||
--- a/src/XlibInt.c | ||
+++ b/src/XlibInt.c | ||
@@ -45,6 +45,7 @@ from The Open Group. | ||
#include <stdio.h> | ||
#ifdef WIN32 | ||
#include <direct.h> | ||
+#include <io.h> | ||
#endif | ||
|
||
/* Needed for FIONREAD on Solaris */ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this interrogate the results of
find_package(Threads)
to determine if pthread is required?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a bit hard to parse:
I would rather say upstream has to come up with the correct logic to make it work for all cases. I just fix the windows case which normally does not install pc files.