]> sjero.net Git - wget/blobdiff - src/sysdep.h
[svn] Csaba's Watcom changes.
[wget] / src / sysdep.h
index 5cf8f8a682f635819ceb3e6f97462e65a08e12b4..ffe21c1e78fa31bf649971fda889b76b536e2e7a 100644 (file)
@@ -45,15 +45,29 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include <mswindows.h>
 #endif /* WINDOWS */
 
-/* Allegedly needed for compilation under OS/2: */
-#ifdef EMXOS2
+/* Watcom-specific stuff.  In practice this is probably specific to
+   Windows, although Watcom exists under other OS's too.  For that
+   reason, we keep this here.  */
+
+#ifdef __WATCOMC__
+/* Watcom has its own alloca() defined in malloc.h malloc.h needs to
+   be included in the sources to prevent 'undefined external' errors
+   at the link phase. */
+# include <malloc.h>
+/* io.h defines unlink() and chmod().  We put this here because it's
+   way too obscure to require all the .c files to observe.  */
+# include <io.h>
+#endif /* __WATCOMC__ */
+
+/* Needed for compilation under OS/2: */
+#ifdef __EMX__
 #ifndef S_ISLNK
 # define S_ISLNK(m) 0
 #endif
 #ifndef lstat
 # define lstat stat
 #endif
-#endif /* EMXOS2 */
+#endif /* __EMX__ */
 
 /* Reportedly, stat() macros are broken on some old systems.  Those
    systems will have to fend for themselves, as I will not introduce
@@ -147,6 +161,9 @@ char *strstr ();
 #ifndef HAVE_STRPTIME
 char *strptime ();
 #endif
+#ifndef HAVE_VSNPRINTF
+int vsnprintf ();
+#endif
 
 /* SunOS brain damage -- for some reason, SunOS header files fail to
    declare the functions below, which causes all kinds of problems