]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
fixes to allow libopts to compile in windows
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 10 Feb 2012 12:17:32 +0000 (13:17 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 10 Feb 2012 12:17:32 +0000 (13:17 +0100)
configure.ac
src/libopts/compat/compat.h
src/libopts/cook.c
src/libopts/makeshell.c
src/libopts/text_mmap.c

index b992f35d09bc907e4c0ed6b7ceabbc7251ee7262..7aa4148930fee163fd24ce9ddf5c4cee5cf04429 100644 (file)
@@ -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.h>], [pthread_mutex_lock (0);])
 
index 230aef9cb3520eed6c5b936aebf146427d85df86..b288a7c2a3b4690385724b6704c10f32ccb84ac9 100644 (file)
@@ -82,7 +82,9 @@
 #  include <sys/procset.h>
 #endif
 #include <sys/stat.h>
-#include <sys/wait.h>
+#ifdef HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+#endif
 
 #if defined( HAVE_SOLARIS_SYSINFO )
 #  include <sys/systeminfo.h>
index 811ce593080a9e56f42eacd7f11f4feab31c7d4a..49c12a3294d87139196a10bebc0cceac5a3d4669 100644 (file)
@@ -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;
 
index 7b9b6cdde1798425ffc7001e0d43a225c64f9e2f..20964ff316d13056a326d99f0fc5c0c526ab647f 100644 (file)
@@ -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);
index 4a7a9df28b9a804f64d0e6b6757c060551b25a19..e46d594690ac5158c6037bdcb02a2834fb65e35f 100644 (file)
@@ -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;
             }