Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Win32 fixes #500

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,31 @@ jobs:
run: |
cd build
make test

win32:
runs-on: windows-latest
steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
pacboy: >-
toolchain:p
cmake:p
- name: Build
shell: msys2 {0}
run: |
mkdir build
cd build
export CFLAGS="-D__USE_MINGW_ANSI_STDIO=1"
# CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS doesn't work correctly in the
# presence of explicit dllexports for the gcc/binutils toolchain
export LDFLAGS="-Wl,--export-all-symbols"
cmake -DENABLE_STATIC=ON -DWITHOUT_COOKIEOPEN=ON ..
ninja
- name: Test
shell: msys2 {0}
run: |
cd build
export PATH="$(pwd)/src:$(pwd)/ext:${PATH}"
ninja test
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ INSTALL (TARGETS libsolv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DES

IF (ENABLE_STATIC AND NOT DISABLE_SHARED)
ADD_LIBRARY (libsolv_static STATIC ${libsolv_SRCS})
IF (WIN32)
TARGET_COMPILE_DEFINITIONS(libsolv_static PUBLIC SOLV_STATIC_LIB)
ENDIF (WIN32)
SET_TARGET_PROPERTIES(libsolv_static PROPERTIES OUTPUT_NAME "solv")
SET_TARGET_PROPERTIES(libsolv_static PROPERTIES SOVERSION ${LIBSOLV_SOVERSION})
INSTALL (TARGETS libsolv_static LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
Expand Down
2 changes: 1 addition & 1 deletion win32/regex.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern "C" {
#define CHARCLASS_NAME_MAX 14
#define RE_DUP_MAX 255

#include <BaseTsd.h>
#include <basetsd.h>
typedef SSIZE_T regoff_t;
// #include <bits/alltypes.h>

Expand Down