Merge branch 'windows-fix-for-thomas--2021-11-04'

pull/63/head
Thomas 1 year ago
commit 7971c791e4

@ -100,8 +100,11 @@ ifeq ($(BUILD_FOR),OS/390)
CFLAGS+= -I/usr/include
CFLAGS+= -DZOS -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112L -qlanglvl=NOLIBEXT
else ifeq ($(BUILD_FOR),Linux)
CFLAGS+= -DUNIX
CFLAGS+=-fPIC -fstrict-aliasing -fdiagnostics-color=auto
else ifeq ($(BUILD_FOR),Darwin)
CFLAGS+= -DUNIX
CFLAGS+= -DDARWIN
CFLAGS+=-pthread -fPIC -fstrict-aliasing -fcolor-diagnostics
endif

@ -22,29 +22,6 @@ PY -m pip install --upgrade pip
PY -m pip install wheel
PY -m pip install yml2
:: Generate code in ...\libpEpTransport\src
CD ..\..\libpEpTransport\src
IF NOT EXIST generated MKDIR generated
PY %YML2PROC% -E utf-8 -y gen_c.ysl2 transport_status_code.yml2 -o generated\transport_status_code.h
IF %ERRORLEVEL% NEQ 0 GOTO end
PY %YML2PROC% -E utf-8 -y gen_strings.ysl2 transport_status_code.yml2 -o generated\transport_status_code.c
IF %ERRORLEVEL% NEQ 0 GOTO end
PY %YML2PROC% -E utf-8 -y gen_objc.ysl2 transport_status_code.yml2 -o generated\PEPTransportStatusCode.h
IF %ERRORLEVEL% NEQ 0 GOTO end
PY %YML2PROC% -E utf-8 -y gen_kotlin.ysl2 transport_status_code.yml2 -o generated\TransportStatusCode.kt
IF %ERRORLEVEL% NEQ 0 GOTO end
PY %YML2PROC% -E utf-8 -y gen_cs.ysl2 transport_status_code.yml2 -o generated\TransportStatusCode.cs
IF %ERRORLEVEL% NEQ 0 GOTO end
XCOPY /y generated\*.c ..\..\pEpEngine\src\
XCOPY /y generated\*.h ..\..\pEpEngine\src\
:: Generate code in ...\pEpEngine\codegen
CD ..\..\pEpEngine\codegen

@ -226,6 +226,9 @@
<ProjectReference Include="..\..\libetpan\build-windows\libetpan\libetpan.vcxproj">
<Project>{ba4ded3c-e56f-4484-bfc3-9c13e461a1be}</Project>
</ProjectReference>
<ProjectReference Include="..\..\libpEpTransport\build-windows\libpEpTransport.vcxproj">
<Project>{13f8fc08-53f8-4615-8445-3d713c0374e4}</Project>
</ProjectReference>
<ProjectReference Include="libpEpasn1\libpEpasn1.vcxproj">
<Project>{9a67164d-b8f8-4601-a24b-28afe774d41c}</Project>
</ProjectReference>

@ -128,7 +128,8 @@ HEADERS_TO_INSTALL = \
timestamp.h identity_list.h bloblist.h stringpair.h message.h mime.h group.h \
cryptotech.h sync_api.h pEp_string.h openpgp_compat.h engine_sql.h \
labeled_int_list.h key_reset.h base64.h sync_codec.h distribution_codec.h \
storage_codec.h status_to_string.h keyreset_command.h platform.h platform_unix.h \
storage_codec.h status_to_string.h keyreset_command.h platform.h \
platform_unix.h platform_windows.h platform_zos.h \
transport.h growing_buf.h $(wildcard ../asn.1/*.h)
# CAVEAT:

@ -31,7 +31,7 @@ extern "C" {
#define PEP_ENGINE_VERSION_PATCH 0
// This should be the index of the last already released RC. In practice, if
// the release candidate N is about to be tagged, this should be defined as N+1.
#define PEP_ENGINE_VERSION_RC 7 // the last RC was 6
#define PEP_ENGINE_VERSION_RC 8 // the last RC was 7
#define PEP_OWN_USERID "pEp_own_userId"

@ -11,10 +11,14 @@
extern "C" {
#endif
#ifdef _WIN32
#include "platform_windows.h"
#if defined (_WIN32)
# include "platform_windows.h"
#elif defined (UNIX)
# include "platform_unix.h"
#elif defined (ZOS)
# include "platform_zos.h"
#else
#include "platform_unix.h"
# error "unknown platform"
#endif
#ifdef __cplusplus

@ -0,0 +1,15 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
/* Include the entire useful part of this compilation unit within a CPP
conditional, so that the entire file expands to nothing if this is not
the platform it is used on. */
#ifdef ZOS
#include "pEpEngine.h"
#include "platform_zos.h"
#include "dynamic_api.h"
/* Nothing useful here at this time. */
#endif // #ifdef ZOS

@ -0,0 +1,32 @@
/**
* @file platform_zos.h
* @brief z/OS platform-specific implementation details
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#ifndef PEP_PLATFORM_ZOS_H
#define PEP_PLATFORM_ZOS_H
#if ! defined (ZOS)
# error "this header should only ever be included on z/OS"
#endif
/* Workaround standard header problems. */
#ifdef __cplusplus
# undef _EXT
# define _NO_EXT
#endif
#include_next <stdlib.h>
#ifndef __cplusplus
char * stpcpy (char *dst, const char *src);
char * strndup (const char *s, size_t n);
size_t strnlen (const char *s, size_t maxlen);
#endif
#include <strings.h>
#include_next <string.h>
#endif // #ifndef PEP_PLATFORM_ZOS_H

@ -1,8 +0,0 @@
#ifdef ZOS
#ifdef __cplusplus
#undef _EXT
#define _NO_EXT
#endif
#endif
#include_next <stdlib.h>

@ -1,10 +0,0 @@
#ifdef ZOS
#ifndef __cplusplus
char * stpcpy (char *dst, const char *src);
char * strndup (const char *s, size_t n);
size_t strnlen (const char *s, size_t maxlen);
#endif
#include <strings.h>
#endif
#include_next <string.h>
Loading…
Cancel
Save