From: Nikos Mavrogiannopoulos Date: Fri, 10 Feb 2012 12:17:32 +0000 (+0100) Subject: fixes to allow libopts to compile in windows X-Git-Tag: gnutls_3_0_13~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78f921261af3a1cbf79b5ad41c82d332968e2d89;p=thirdparty%2Fgnutls.git fixes to allow libopts to compile in windows --- diff --git a/configure.ac b/configure.ac index b992f35d09..7aa4148930 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,7 @@ dnl Process this file with autoconf to produce a configure script. # USA AC_PREREQ(2.61) -AC_INIT([GnuTLS], [3.0.12], [bug-gnutls@gnu.org]) +AC_INIT([GnuTLS], [3.0.13], [bug-gnutls@gnu.org]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) @@ -118,7 +118,7 @@ AC_C_BIGENDIAN dnl No fork on MinGW, disable some self-tests until we fix them. -AC_CHECK_FUNCS([fork getrusage getpwuid_r daemon],,) +AC_CHECK_FUNCS([fork getrusage getpwuid_r daemon fchmod],,) AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no") AC_LIB_HAVE_LINKFLAGS(pthread,, [#include ], [pthread_mutex_lock (0);]) diff --git a/src/libopts/compat/compat.h b/src/libopts/compat/compat.h index 230aef9cb3..b288a7c2a3 100644 --- a/src/libopts/compat/compat.h +++ b/src/libopts/compat/compat.h @@ -82,7 +82,9 @@ # include #endif #include -#include +#ifdef HAVE_SYS_WAIT_H +# include +#endif #if defined( HAVE_SOLARIS_SYSINFO ) # include diff --git a/src/libopts/cook.c b/src/libopts/cook.c index 811ce59308..49c12a3294 100644 --- a/src/libopts/cook.c +++ b/src/libopts/cook.c @@ -59,7 +59,7 @@ contiguous_quote(char ** pps, char * pq, int * lnct_p); * err: @code{NULL} is returned if the string is mal-formed. =*/ unsigned int -ao_string_cook_escape_char( char const* pzIn, char* pRes, u_int nl ) +ao_string_cook_escape_char( char const* pzIn, char* pRes, unsigned nl ) { unsigned int res = 1; @@ -282,7 +282,7 @@ ao_string_cook(char * pzScan, int * lnct_p) * THEN we do the full escape character processing */ else if (q != '\'') { - int ct = ao_string_cook_escape_char( pzS, pzD-1, (u_int)'\n' ); + int ct = ao_string_cook_escape_char( pzS, pzD-1, (unsigned)'\n' ); if (ct == 0) return NULL; diff --git a/src/libopts/makeshell.c b/src/libopts/makeshell.c index 7b9b6cdde1..20964ff316 100644 --- a/src/libopts/makeshell.c +++ b/src/libopts/makeshell.c @@ -471,7 +471,9 @@ optionParseShell(tOptions* pOpts) printf("\nenv | grep '^%s_'\n", pOpts->pzPROGNAME); fflush(stdout); +#ifdef HAVE_FCHMOD fchmod(STDOUT_FILENO, 0755); +#endif fclose(stdout); if (ferror(stdout)) { fputs(zOutputFail, stderr); diff --git a/src/libopts/text_mmap.c b/src/libopts/text_mmap.c index 4a7a9df28b..e46d594690 100644 --- a/src/libopts/text_mmap.c +++ b/src/libopts/text_mmap.c @@ -96,7 +96,7 @@ load_text_file(tmap_info_t * mapinfo) if (rdct <= 0) { mapinfo->txt_errno = errno; fprintf(stderr, zFSErrReadFile, - errno, strerror(errno), pzFile); + errno, strerror(errno), "mapped file"); free(mapinfo->txt_data); return; }