diff --git a/g10/ChangeLog b/g10/ChangeLog index 636b20254..cc7b2c167 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,15 @@ +2001-12-23 Timo Schulz + + * misc.c (check_permissions): Do not use it for W32 systems. + + * tdbio.c (migrate_from_v2): Define ftruncate as chsize() for W32. + + * mkdtemp.c: W32 support. + + * photoid.c: Ditto. + + * exec.c: Ditto. + 2001-12-22 David Shaw * exec.c (make_tempdir): avoid compiler warning with const diff --git a/g10/exec.c b/g10/exec.c index 09fe67ca4..b5e5db463 100644 --- a/g10/exec.c +++ b/g10/exec.c @@ -24,7 +24,9 @@ #include #include #include +#ifndef HAVE_DOSISH_SYSTEM #include +#endif #include #include #include @@ -380,7 +382,9 @@ int exec_read(struct exec_info *info) goto fail; } + #ifndef HAVE_DOSISH_SYSTEM info->progreturn=WEXITSTATUS(info->progreturn); + #endif if(info->progreturn==127) { diff --git a/g10/keyserver.c b/g10/keyserver.c index 7b9754eb4..b77d2609d 100644 --- a/g10/keyserver.c +++ b/g10/keyserver.c @@ -26,7 +26,9 @@ #include #include #include +#ifndef HAVE_DOSISH_SYSTEM #include +#endif #include #include #include "keyserver-internal.h" diff --git a/g10/misc.c b/g10/misc.c index d1ff14c4b..b98ab8f4c 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -341,6 +341,7 @@ openpgp_md_test_algo( int algo ) int check_permissions(const char *path,int checkonly) { +#ifndef HAVE_DOSISH_SYSTEM #ifdef HAVE_STAT struct stat statbuf; int isdir=0; @@ -392,6 +393,7 @@ check_permissions(const char *path,int checkonly) return 1; } #endif +#endif /*!HAVE_DOSISH_SYSTEM*/ return 0; } diff --git a/g10/mkdtemp.c b/g10/mkdtemp.c index 625ab148f..50a083005 100644 --- a/g10/mkdtemp.c +++ b/g10/mkdtemp.c @@ -11,6 +11,11 @@ #include "types.h" #include "cipher.h" +#ifdef MKDIR_TAKES_ONE_ARG +# undef mkdir +# define mkdir(a,b) mkdir(a) +#endif + char *mkdtemp(char *template) { int attempts,idx,count=0; diff --git a/g10/photoid.c b/g10/photoid.c index bf67c2a66..88d3f8233 100644 --- a/g10/photoid.c +++ b/g10/photoid.c @@ -24,7 +24,9 @@ #include #include #include +#ifndef HAVE_DOSISH_SYSTEM #include +#endif #include #include #include "keydb.h" diff --git a/g10/tdbio.c b/g10/tdbio.c index 0c8f84246..8be44a790 100644 --- a/g10/tdbio.c +++ b/g10/tdbio.c @@ -39,6 +39,9 @@ #include "trustdb.h" #include "tdbio.h" +#ifdef HAVE_DOSISH_SYSTEM +#define ftruncate chsize +#endif /**************** * Yes, this is a very simple implementation. We should really diff --git a/include/util.h b/include/util.h index 295333552..0af1746c9 100644 --- a/include/util.h +++ b/include/util.h @@ -21,7 +21,7 @@ #define G10_UTIL_H #if defined (__MINGW32__) || defined (__CYGWIN32__) -# include +# include #endif #include "types.h" diff --git a/util/simple-gettext.c b/util/simple-gettext.c index 500226709..db229437d 100644 --- a/util/simple-gettext.c +++ b/util/simple-gettext.c @@ -27,7 +27,7 @@ #include #ifdef USE_SIMPLE_GETTEXT -#if defined (__MINGW32__) || defined (__CYGWIN32__) +#if !defined (__MINGW32__) && !defined (__CYGWIN32__) #error This file can only be used with MingW32 or Cygwin32 #endif