Hi David, It looks like the new feature of supporting unix domain sockets missed some #ifndef NO_SYS_UN_H statements in s_client.c. Please find attached the patch for Configure (to add the NON_SYS_UN_H as default to the mingw and mingw64 targets), and the patch for apps/s_client.c (for some #ifndef NO_SYS_UN_H statements). This should make compiling using mingw and mingw64 working again.
Maintainers, Could you please check this patch and if ok, apply it to the master branch ? Thanks, Peter Mosmans On 1-07-2014 18:20, dcrue...@qualitesys.com wrote: > Hi > > I use a WIndows Mingw config, with default parameters > > perl .\Configure mingw > make depend > make > make tests > > Nothing special, in fact. > The "make" command fails with the errors below > The snapshots for versions 1.0.x are ok but not openssl-SNAP-20140630 > I really don't understand why > > Bye > > Le 01.07.2014 00:23, Support a écrit : >> Hi Didier, >> >> Which Configure options do you use ? Are you using MSYS and mingw ? >> As far as I know the compiler flag NO_SYS_UN_H should be set on Windows >> platforms, which should prevent that error from occurring. >> >> >> Peter >> >> On 1-07-2014 07:14, dcrue...@qualitesys.com wrote: >>> Hello >>> >>> >>> openssl-SNAP-20140630 >>> >>> make ko >>> in apps/speed.c:318:4 >>> warning: format '%d' expects argument of type 'init', but >>> argument 3 has type 'DWORD' : BIO_printf(bio_err, "unable do >>> CreateThread (%d)",ret); >>> >>> in apps/s_socket.c in function 'init_client_unix', storage size of >>> 'them' isn't known >>> not configured as windows it seems >>> >>> Question : how is this snapshot handled ? >>> >>> Didier >>> >>> >>> ______________________________________________________________________ >>> OpenSSL Project http://www.openssl.org >>> Development Mailing List openssl-dev@openssl.org >>> Automated List Manager majord...@openssl.org >> >> ______________________________________________________________________ >> OpenSSL Project http://www.openssl.org >> Development Mailing List openssl-dev@openssl.org >> Automated List Manager majord...@openssl.org > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > Development Mailing List openssl-dev@openssl.org > Automated List Manager majord...@openssl.org
diff --git a/Configure b/Configure index b346826..4a803e8 100755 --- a/Configure +++ b/Configure @@ -550,7 +550,7 @@ my %table=( "BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN:${no_asm}:win32", # MinGW -"mingw", "gcc:-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall::-D_MT:MINGW32:-lws2_32 -lgdi32 -lcrypt32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_asm}:coff:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a", +"mingw", "gcc:-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DNO_SYS_UN_H -fomit-frame-pointer -O3 -march=i486 -Wall::-D_MT:MINGW32:-lws2_32 -lgdi32 -lcrypt32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_asm}:coff:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a", # As for OPENSSL_USE_APPLINK. Applink makes it possible to use .dll # compiled with one compiler with application compiled with another # compiler. It's possible to engage Applink support in mingw64 build, @@ -558,7 +558,7 @@ my %table=( # handling, one can't seriously consider its binaries for using with # non-mingw64 run-time environment. And as mingw64 is always consistent # with itself, Applink is never engaged and can as well be omitted. -"mingw64", "gcc:-mno-cygwin -DL_ENDIAN -O3 -Wall -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE::-D_MT:MINGW64:-lws2_32 -lgdi32 -lcrypt32:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:${x86_64_asm}:mingw64:win32:cygwin-shared:-D_WINDLL:-mno-cygwin:.dll.a", +"mingw64", "gcc:-mno-cygwin -DL_ENDIAN -O3 -Wall -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -DNO_SYS_UN_H::-D_MT:MINGW64:-lws2_32 -lgdi32 -lcrypt32:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:${x86_64_asm}:mingw64:win32:cygwin-shared:-D_WINDLL:-mno-cygwin:.dll.a", # UWIN "UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32", diff --git a/apps/s_client.c b/apps/s_client.c index de6a984..12f1565 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -324,7 +324,9 @@ static void sc_usage(void) BIO_printf(bio_err," -host host - use -connect instead\n"); BIO_printf(bio_err," -port port - use -connect instead\n"); BIO_printf(bio_err," -connect host:port - connect over TCP/IP (default is %s:%s)\n",SSL_HOST_NAME,PORT_STR); +#ifndef NO_SYS_UN_H BIO_printf(bio_err," -unix path - connect over unix domain sockets\n"); +#endif /* NO_SYS_UN_H */ BIO_printf(bio_err," -verify arg - turn on peer certificate verification\n"); BIO_printf(bio_err," -cert arg - certificate file to use, PEM format assumed\n"); BIO_printf(bio_err," -certform arg - certificate format (PEM or DER) PEM default\n"); @@ -763,11 +765,13 @@ static char *jpake_secret = NULL; if (!extract_host_port(*(++argv),&host,NULL,&port)) goto bad; } +#ifndef NO_SYS_UN_H else if (strcmp(*argv,"-unix") == 0) { if (--argc < 1) goto bad; unix_path = *(++argv); } +#endif /* NO_SYS_UN_H */ else if (strcmp(*argv,"-xmpphost") == 0) { if (--argc < 1) goto bad; @@ -1162,12 +1166,13 @@ bad: sc_usage(); goto end; } - +#ifndef NO_SYS_UN_H if (unix_path && (socket_type != SOCK_STREAM)) { BIO_printf(bio_err, "Can't use unix sockets and datagrams together\n"); goto end; } +#endif /* NO_SYS_UN_H */ #if !defined(OPENSSL_NO_JPAKE) && !defined(OPENSSL_NO_PSK) if (jpake_secret) { @@ -1511,9 +1516,12 @@ bad: #endif re_start: - +#ifndef NO_SYS_UN_H if ((!unix_path && (init_client(&s,host,port,socket_type) == 0)) || (unix_path && (init_client_unix(&s,unix_path) == 0))) +#else + if (init_client(&s,host,port,socket_type) == 0) +#endif /* NO_SYS_UN_H */ { BIO_printf(bio_err,"connect:errno=%d\n",get_last_socket_error()); SHUTDOWN(s);