Skip to content
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

dllexport solv_version as well #379

Open
wants to merge 1 commit 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
8 changes: 4 additions & 4 deletions src/solvversion.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "solvversion.h"

const char solv_version[] = LIBSOLV_VERSION_STRING;
int solv_version_major = LIBSOLV_VERSION_MAJOR;
int solv_version_minor = LIBSOLV_VERSION_MINOR;
int solv_version_patch = LIBSOLV_VERSION_PATCH;
SOLV_API const char solv_version[] = LIBSOLV_VERSION_STRING;
SOLV_API int solv_version_major = LIBSOLV_VERSION_MAJOR;
SOLV_API int solv_version_minor = LIBSOLV_VERSION_MINOR;
SOLV_API int solv_version_patch = LIBSOLV_VERSION_PATCH;
15 changes: 11 additions & 4 deletions src/solvversion.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,17 @@
#define LIBSOLV_VERSION_PATCH @LIBSOLV_PATCH@
#define LIBSOLV_VERSION (LIBSOLV_VERSION_MAJOR * 10000 + LIBSOLV_VERSION_MINOR * 100 + LIBSOLV_VERSION_PATCH)

extern const char solv_version[];
extern int solv_version_major;
extern int solv_version_minor;
extern int solv_version_patch;
#ifdef _WIN32
// include win32/config.h for SOLV_API
#include "win32_config.h"
#else
#define SOLV_API
#endif

SOLV_API extern const char solv_version[];
SOLV_API extern int solv_version_major;
SOLV_API extern int solv_version_minor;
SOLV_API extern int solv_version_patch;

#cmakedefine LIBSOLV_FEATURE_LINKED_PKGS
#cmakedefine LIBSOLV_FEATURE_COMPLEX_DEPS
Expand Down
5 changes: 4 additions & 1 deletion win32/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/win32)

SET (WIN32_COMPAT_SOURCES
${PROJECT_SOURCE_DIR}/win32/fnmatch.c
${PROJECT_SOURCE_DIR}/win32/getopt.c
${PROJECT_SOURCE_DIR}/win32/regcomp.c
${PROJECT_SOURCE_DIR}/win32/regexec.c
${PROJECT_SOURCE_DIR}/win32/strfncs.c
${PROJECT_SOURCE_DIR}/win32/tre-mem.c
)
)

INSTALL (FILES ${PROJECT_SOURCE_DIR}/win32/win32_config.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/solv")
13 changes: 0 additions & 13 deletions win32/config.h

This file was deleted.

2 changes: 1 addition & 1 deletion win32/getopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <stdlib.h>
#include <stdio.h>

#include "config.h"
#include "win32_config.h"

SOLV_API char *optarg;
SOLV_API int optind=1, opterr=1, optopt, __optpos, __optreset=0;
Expand Down
2 changes: 1 addition & 1 deletion win32/getopt.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
extern "C" {
#endif

#include "config.h"
#include "win32_config.h"

int getopt(int, char * const [], const char *);

Expand Down