mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 18:40:27 +01:00
Merge pull request #1809 from hintjens/master
Number of fixes for gyp builds
This commit is contained in:
commit
7200f473ad
7
.gitignore
vendored
7
.gitignore
vendored
@ -22,9 +22,11 @@ autom4te.cache
|
|||||||
*.html
|
*.html
|
||||||
*.pdf
|
*.pdf
|
||||||
*.ps
|
*.ps
|
||||||
.*
|
|
||||||
*~
|
*~
|
||||||
.*~
|
.*~
|
||||||
|
.deps
|
||||||
|
.dirstamp
|
||||||
|
.libs
|
||||||
curve_keygen
|
curve_keygen
|
||||||
test_heartbeats
|
test_heartbeats
|
||||||
test_msg_ffn
|
test_msg_ffn
|
||||||
@ -170,6 +172,3 @@ zeromq-*.zip
|
|||||||
core
|
core
|
||||||
build
|
build
|
||||||
test-suite.log
|
test-suite.log
|
||||||
project.Makefile
|
|
||||||
libzmq.target.mk
|
|
||||||
out/
|
|
||||||
|
@ -368,8 +368,8 @@ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/lib)
|
|||||||
# platform specifics
|
# platform specifics
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
# Socket limit is 4K (can be raised arbitrarily)
|
# Socket limit is 16K (can be raised arbitrarily)
|
||||||
add_definitions (-DFD_SETSIZE=4096)
|
add_definitions (-DFD_SETSIZE=16384)
|
||||||
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
5
builds/gyp/.gitignore
vendored
Normal file
5
builds/gyp/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
project.Makefile
|
||||||
|
*.mk
|
||||||
|
out/
|
||||||
|
Makefile
|
||||||
|
|
@ -33,6 +33,11 @@
|
|||||||
// This file provides the configuration for Linux, Windows, and OS/X
|
// This file provides the configuration for Linux, Windows, and OS/X
|
||||||
// as determined by ZMQ_HAVE_XXX macros passed from project.gyp
|
// as determined by ZMQ_HAVE_XXX macros passed from project.gyp
|
||||||
|
|
||||||
|
// Check that we're being called from our gyp makefile
|
||||||
|
#ifndef ZMQ_GYP_BUILD
|
||||||
|
# error "foreign platform.hpp detected, please re-configure"
|
||||||
|
#endif
|
||||||
|
|
||||||
// Set for all platforms
|
// Set for all platforms
|
||||||
#define ZMQ_HAVE_CURVE 1
|
#define ZMQ_HAVE_CURVE 1
|
||||||
#define ZMQ_USE_TWEETNACL 1
|
#define ZMQ_USE_TWEETNACL 1
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
#
|
#
|
||||||
# gyp --depth=. --format=make
|
# gyp --depth=. --format=make
|
||||||
# make
|
# make
|
||||||
#
|
|
||||||
{
|
{
|
||||||
'includes': [
|
'includes': [
|
||||||
'project-tests.gypi',
|
'project-tests.gypi',
|
||||||
@ -16,13 +15,18 @@
|
|||||||
'.'
|
'.'
|
||||||
],
|
],
|
||||||
'defines': [
|
'defines': [
|
||||||
'ZMQ_CUSTOM_PLATFORM_HPP'
|
'_REENTRANT',
|
||||||
|
'_THREAD_SAFE',
|
||||||
|
'ZMQ_CUSTOM_PLATFORM_HPP',
|
||||||
|
'ZMQ_GYP_BUILD'
|
||||||
],
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
[ 'OS=="win"', {
|
[ 'OS=="win"', {
|
||||||
'defines': [
|
'defines': [
|
||||||
'ZMQ_HAVE_WINDOWS=1',
|
'ZMQ_HAVE_WINDOWS',
|
||||||
'ZMQ_STATIC'
|
'ZMQ_STATIC',
|
||||||
|
'FD_SETSIZE=16384',
|
||||||
|
'_CRT_SECURE_NO_WARNINGS'
|
||||||
],
|
],
|
||||||
'libraries': [
|
'libraries': [
|
||||||
'ws2_32',
|
'ws2_32',
|
||||||
@ -32,12 +36,18 @@
|
|||||||
}],
|
}],
|
||||||
[ 'OS=="mac"', {
|
[ 'OS=="mac"', {
|
||||||
'defines': [
|
'defines': [
|
||||||
'ZMQ_HAVE_OSX=1'
|
'ZMQ_HAVE_OSX'
|
||||||
]
|
],
|
||||||
|
'xcode_settings': {
|
||||||
|
'GCC_ENABLE_CPP_RTTI': 'YES'
|
||||||
|
}
|
||||||
}],
|
}],
|
||||||
[ 'OS=="linux"', {
|
[ 'OS=="linux"', {
|
||||||
'defines': [
|
'defines': [
|
||||||
'ZMQ_HAVE_LINUX=1'
|
'ZMQ_HAVE_LINUX'
|
||||||
|
],
|
||||||
|
'cflags_cc!': [
|
||||||
|
'-fno-rtti'
|
||||||
],
|
],
|
||||||
'libraries': [
|
'libraries': [
|
||||||
'-lpthread'
|
'-lpthread'
|
||||||
@ -263,6 +273,14 @@
|
|||||||
'../../src/yqueue.hpp',
|
'../../src/yqueue.hpp',
|
||||||
'../../src/zmq.cpp',
|
'../../src/zmq.cpp',
|
||||||
'../../src/zmq_utils.cpp'
|
'../../src/zmq_utils.cpp'
|
||||||
|
],
|
||||||
|
'copies': [
|
||||||
|
{
|
||||||
|
'destination': '../../src',
|
||||||
|
'files': [
|
||||||
|
'platform.hpp'
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
24
configure.ac
24
configure.ac
@ -101,17 +101,9 @@ AC_RUN_IFELSE(
|
|||||||
|
|
||||||
AC_MSG_RESULT([$libzmq_tipc_support])
|
AC_MSG_RESULT([$libzmq_tipc_support])
|
||||||
|
|
||||||
AC_ARG_WITH([relaxed],
|
AC_ARG_ENABLE([pedantic],
|
||||||
[AS_HELP_STRING([--with-relaxed],
|
[AS_HELP_STRING([--disable-pedantic], [disable pedantic compiler checks [default=enabled]])],
|
||||||
[switch off pedantic compiler])],
|
[libzmq_pedantic=$enableval], [libzmq_pedantic=yes])
|
||||||
[zmq_relaxed="yes"],
|
|
||||||
[])
|
|
||||||
|
|
||||||
if test "x$zmq_relaxed" = "xyes"; then
|
|
||||||
libzmq_pedantic="no"
|
|
||||||
else
|
|
||||||
libzmq_pedantic="yes"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_ARG_WITH([militant],
|
AC_ARG_WITH([militant],
|
||||||
[AS_HELP_STRING([--with-militant],
|
[AS_HELP_STRING([--with-militant],
|
||||||
@ -137,8 +129,8 @@ libzmq_on_android="no"
|
|||||||
libzmq_on_linux="no"
|
libzmq_on_linux="no"
|
||||||
libzmq_on_gnu="no"
|
libzmq_on_gnu="no"
|
||||||
|
|
||||||
# Set some default features required by 0MQ code.
|
# Set some default features required by ZeroMQ code
|
||||||
CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS"
|
CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE -Wno-long-long $CPPFLAGS"
|
||||||
|
|
||||||
# For host type checks
|
# For host type checks
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
@ -255,10 +247,6 @@ case "${host_os}" in
|
|||||||
[AC_MSG_ERROR([cannot link with rpcrt4.dll.])])
|
[AC_MSG_ERROR([cannot link with rpcrt4.dll.])])
|
||||||
AC_CHECK_LIB(iphlpapi, main, ,
|
AC_CHECK_LIB(iphlpapi, main, ,
|
||||||
[AC_MSG_ERROR([cannot link with iphlpapi.dll.])])
|
[AC_MSG_ERROR([cannot link with iphlpapi.dll.])])
|
||||||
# mingw defines __int64_t as long long
|
|
||||||
AC_LANG_PUSH([C++])
|
|
||||||
LIBZMQ_CHECK_LANG_FLAG_PREPEND([-Wno-long-long])
|
|
||||||
AC_LANG_POP([C++])
|
|
||||||
libzmq_on_mingw="yes"
|
libzmq_on_mingw="yes"
|
||||||
libzmq_dso_visibility="no"
|
libzmq_dso_visibility="no"
|
||||||
|
|
||||||
@ -450,7 +438,6 @@ elif test "x$with_libsodium" == "xyes"; then
|
|||||||
case "${host_os}" in
|
case "${host_os}" in
|
||||||
*solaris*)
|
*solaris*)
|
||||||
LDFLAGS="-lssp $LDFLAGS"
|
LDFLAGS="-lssp $LDFLAGS"
|
||||||
CPPFLAGS="-Wno-long-long $CPPFLAGS"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
@ -458,7 +445,6 @@ else
|
|||||||
AC_DEFINE(ZMQ_HAVE_CURVE, [1], [Using curve encryption])
|
AC_DEFINE(ZMQ_HAVE_CURVE, [1], [Using curve encryption])
|
||||||
AC_DEFINE(ZMQ_USE_TWEETNACL, [1], [Using tweetnacl for curve encryption])
|
AC_DEFINE(ZMQ_USE_TWEETNACL, [1], [Using tweetnacl for curve encryption])
|
||||||
curve_library="tweetnacl"
|
curve_library="tweetnacl"
|
||||||
libzmq_pedantic="no" # Disable pedantic warnings
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL(USE_LIBSODIUM, test "$curve_library" == "libsodium")
|
AM_CONDITIONAL(USE_LIBSODIUM, test "$curve_library" == "libsodium")
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
#include "platform.hpp"
|
#include "platform.hpp"
|
||||||
#if defined (ZMQ_USE_TWEETNACL)
|
#if defined (ZMQ_USE_TWEETNACL)
|
||||||
|
|
||||||
|
#pragma GCC diagnostic ignored "-Wsign-compare"
|
||||||
|
|
||||||
#include "tweetnacl.h"
|
#include "tweetnacl.h"
|
||||||
|
|
||||||
#define FOR(i,n) for (i = 0;i < n;++i)
|
#define FOR(i,n) for (i = 0;i < n;++i)
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#define TWEETNACL_H
|
#define TWEETNACL_H
|
||||||
|
|
||||||
#include "platform.hpp"
|
#include "platform.hpp"
|
||||||
|
|
||||||
#if defined (ZMQ_USE_TWEETNACL)
|
#if defined (ZMQ_USE_TWEETNACL)
|
||||||
|
|
||||||
#define crypto_box_SECRETKEYBYTES 32
|
#define crypto_box_SECRETKEYBYTES 32
|
||||||
|
Loading…
Reference in New Issue
Block a user