aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/ChangeLog3
-rw-r--r--common/mkdtemp.c3
-rw-r--r--common/sysutils.h8
-rw-r--r--common/util.h4
4 files changed, 17 insertions, 1 deletions
diff --git a/common/ChangeLog b/common/ChangeLog
index eeba09341..11bf8029a 100644
--- a/common/ChangeLog
+++ b/common/ChangeLog
@@ -1,5 +1,8 @@
2004-12-20 Werner Koch <[email protected]>
+ * sysutils.h [W32]: Define sleep.
+ * util.h: Add prototype for mkdtemp.
+
* membuf.c (put_membuf): Wipe out buffer after a failed realloc.
2004-12-19 Werner Koch <[email protected]>
diff --git a/common/mkdtemp.c b/common/mkdtemp.c
index abe731e0a..a85b89eb4 100644
--- a/common/mkdtemp.c
+++ b/common/mkdtemp.c
@@ -35,7 +35,8 @@
# define mkdir(a,b) mkdir(a)
#endif
-char *mkdtemp(char *template)
+char *
+mkdtemp (char *template)
{
int attempts,idx,count=0;
unsigned char *ch;
diff --git a/common/sysutils.h b/common/sysutils.h
index 9df292031..08198f685 100644
--- a/common/sysutils.h
+++ b/common/sysutils.h
@@ -28,11 +28,19 @@ const unsigned char *get_session_marker (size_t *rlen);
int check_permissions (const char *path,int extension,int checkonly);
#ifdef HAVE_W32_SYSTEM
+/* Windows declares sleep as obsolete, but provides a definition for
+ _sleep but non for the still existing sleep. */
+#define sleep(a) _sleep ((a))
+
/*-- w32reg.c --*/
char *read_w32_registry_string( const char *root,
const char *dir, const char *name );
int write_w32_registry_string(const char *root, const char *dir,
const char *name, const char *value);
+
#endif /*HAVE_W32_SYSTEM*/
+
+
+
#endif /*GNUPG_COMMON_SYSUTILS_H*/
diff --git a/common/util.h b/common/util.h
index 835be4e0e..1159da925 100644
--- a/common/util.h
+++ b/common/util.h
@@ -150,6 +150,10 @@ char *strsep (char **stringp, const char *delim);
#ifndef HAVE_TTYNAME
char *ttyname (int fd);
#endif
+#ifndef HAVE_MKDTEMP
+char *mkdtemp (char *template);
+#endif
+
/*-- some macros to replace ctype ones and avoid locale problems --*/
#define spacep(p) (*(p) == ' ' || *(p) == '\t')