Cygwin support

This commit is contained in:
Martin Lucina 2010-02-26 20:03:58 +01:00
parent deda7ca54a
commit efefa069b2
3 changed files with 13 additions and 3 deletions

View File

@ -211,7 +211,14 @@ case "${host_os}" in
install_man="no" install_man="no"
;; ;;
*cygwin*) *cygwin*)
# Define on Cygwin to enable all library features
CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
AC_DEFINE(ZMQ_HAVE_CYGWIN, 1, [Have Cygwin]) AC_DEFINE(ZMQ_HAVE_CYGWIN, 1, [Have Cygwin])
# Cygwin provides libuuid as part of the e2fsprogs package, and somewhat
# uselessly installs the library in /usr/lib/e2fsprogs
LDFLAGS="${LDFLAGS} -L/usr/lib/e2fsprogs"
AC_CHECK_LIB(uuid, uuid_generate, ,
[AC_MSG_ERROR([cannot link with -luuid, install the e2fsprogs package.])])
;; ;;
*) *)
AC_MSG_ERROR([unsupported system: ${host_os}.]) AC_MSG_ERROR([unsupported system: ${host_os}.])

View File

@ -75,7 +75,8 @@ const char *zmq::uuid_t::to_string ()
return string_buf; return string_buf;
} }
#elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_OSX #elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_SOLARIS ||\
defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_CYGWIN
#include <uuid/uuid.h> #include <uuid/uuid.h>

View File

@ -25,7 +25,8 @@
#if defined ZMQ_HAVE_FREEBSD || defined ZMQ_HAVE_NETBSD #if defined ZMQ_HAVE_FREEBSD || defined ZMQ_HAVE_NETBSD
#include <uuid.h> #include <uuid.h>
#elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_OSX #elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_SOLARIS ||\
defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_CYGWIN
#include <uuid/uuid.h> #include <uuid/uuid.h>
#elif defined ZMQ_HAVE_WINDOWS #elif defined ZMQ_HAVE_WINDOWS
#include <Rpc.h> #include <Rpc.h>
@ -75,7 +76,8 @@ namespace zmq
#elif defined ZMQ_HAVE_FREEBSD || defined ZMQ_HAVE_NETBSD #elif defined ZMQ_HAVE_FREEBSD || defined ZMQ_HAVE_NETBSD
::uuid_t uuid; ::uuid_t uuid;
char *string_buf; char *string_buf;
#elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_OSX #elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_SOLARIS ||\
defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_CYGWIN
::uuid_t uuid; ::uuid_t uuid;
char string_buf [uuid_string_len + 1]; char string_buf [uuid_string_len + 1];
#else #else