By Gisle Vanem.
+2003-09-26 Gisle Vanem <giva@bgnett.no>
+
+ * windows/config.h.ms: Don't declare alloca under compilers that
+ support it.
+
+ * windows/config.h.ms: Define HAVE_SNPRINTF, HAVE_VSNPRINTF, and
+ HAVE_MEMMOVE.
+
2003-09-25 Herold Heiko <Heiko.Herold@previnet.it>
* windows/Makefile.src: Updated OBJ list.
+2003-09-26 Gisle Vanem <giva@bgnett.no>
+
+ * mswindows.c (read_registry): Fix invocation of registry
+ functions.
+
+ * mswindows.c (read_registry): Condition definitions of sleep and
+ usleep with not HAVE_SLEEP and HAVE_USLEEP respectively. Define
+ HAVE_SLEEP and HAVE_USLEEP under __DMC__.
+
2003-09-24 Hrvoje Niksic <hniksic@xemacs.org>
* url.c (url_escape_1): Revert unintentional change to lowercase
static int windows_nt_p;
+#ifndef HAVE_SLEEP
/* Emulation of Unix sleep. */
unsigned int
{
return SleepEx (1000 * seconds, TRUE) ? 0U : 1000 * seconds;
}
+#endif
+#ifndef HAVE_USLEEP
/* Emulation of Unix usleep(). This has a granularity of
milliseconds, but that's ok because:
SleepEx (usec / 1000, TRUE);
return 0;
}
+#endif /* HAVE_USLEEP */
static char *
read_registry (HKEY hkey, char *subkey, char *valuename, char *buf, int *len)
HKEY result;
DWORD size = *len;
DWORD type = REG_SZ;
- if (RegOpenKeyEx (hkey, subkey, NULL, KEY_READ, &result) != ERROR_SUCCESS)
+ if (RegOpenKeyEx (hkey, subkey, 0, KEY_READ, &result) != ERROR_SUCCESS)
return NULL;
- if (RegQueryValueEx (result, valuename, NULL, &type, buf, &size) != ERROR_SUCCESS)
+ if (RegQueryValueEx (result, valuename, NULL, &type, (LPBYTE)buf, &size) != ERROR_SUCCESS)
buf = NULL;
*len = size;
RegCloseKey (result);
#define ESTALE WSAESTALE
#define EREMOTE WSAEREMOTE
+#ifdef __DMC__
+# define HAVE_SLEEP 1
+# define HAVE_USLEEP 1
+#endif
+
/* Public functions. */
+#ifndef HAVE_SLEEP
unsigned int sleep (unsigned);
+#endif
+#ifndef HAVE_USLEEP
+int usleep (unsigned long);
+#endif
+
void ws_startup (void);
void ws_changetitle (char*, int);
char *ws_mypath (void);
void ws_help (const char *);
void windows_main_junk (int *, char **, char **);
-int usleep (unsigned long);
#endif /* MSWINDOWS_H */
/* Define if you have the <alloca.h> header file. */
#undef HAVE_ALLOCA_H
+#if !defined(__GNUC__) && !defined(__DMC__) && !defined(__WATCOMC__)
/* Microsoft and Watcom libraries have an alloca function. */
char *alloca ();
+#endif
/* Define to empty if the keyword does not work. */
/* #undef const */
#define HAVE_STRERROR 1
/* Define if you have the snprintf function. */
-#undef HAVE_SNPRINTF
+#define HAVE_SNPRINTF
/* Define if you have the vsnprintf function. */
-#undef HAVE_VSNPRINTF
+#define HAVE_VSNPRINTF
/* Define if you have the strstr function. */
#define HAVE_STRSTR 1
#define HAVE_STRING_H 1
/* Define if you have the <unistd.h> header file. */
-/* #define HAVE_UNISTD_H 1 */
+#if !defined(_MSC_VER)
#undef HAVE_UNISTD_H
+#endif
+
+/* None except Digital Mars have usleep function */
+#if defined(__DMC__)
+#define HAVE_USLEEP
+#endif
/* Define if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
#undef HAVE_PWD_H
/* Define if you have the <signal.h> header file. */
-#undef HAVE_SIGNAL_H
+#define HAVE_SIGNAL_H
/* Define to be the name of the operating system. */
#define OS_TYPE "Windows"
/* Define if you have the isatty function. */
#define HAVE_ISATTY 1
+/* Define if you have the memmove function */
+#define HAVE_MEMMOVE 1
+
#endif /* CONFIG_H */