> Pavel,
 >     I am not exactly sure what impact the attache patch will have on 
the CW build.  I would suggest that you #ifdef the calls to memset() 
with a compiler specific environment variable and then resubmit the 
patches.  That way you can include the call when you need it and exclude 
it otherwise.  I will go ahead and check in the changes for _getch in 
os.h and http_main.c.
 >
 > thanks,
 > Brad

Brad,
I've corrected "BSS zeroing" related patches suggested way (attached). 
Unfortunately I can't test it with Watcom immediately, so these changes 
are currently designed for the GNU stuff only.

Thanks,
Pavel

--- src/os/netware/libpre.c     Fri Jun  2 01:42:31 2000
+++ src_gcc/os/netware/libpre.c Fri Aug 10 13:48:16 2001
@@ -9,8 +9,16 @@
   provide.
 ------------------------------------------------------------------*/
 
+#ifdef __GNUC__
+#include <string.h>        /* memset */
+extern char _edata, _end ; /* end of DATA (start of BSS), end of BSS */
+#endif
+
 int _lib_start()
 {
+#ifdef __GNUC__
+    memset (&_edata, 0, &_end - &_edata);
+#endif
     return 0;
 }
 
--- src/os/netware/libprews.c   Fri Jun  2 01:42:31 2000
+++ src_gcc/os/netware/libprews.c       Fri Aug 10 13:49:18 2001
@@ -11,10 +11,18 @@
 #include "stddef.h"
 #include "ws2nlm.h"
 
+#ifdef __GNUC__
+#include <string.h>        /* memset */
+extern char _edata, _end ; /* end of DATA (start of BSS), end of BSS */
+#endif
+
 int _lib_start_ws()
 {
     WSADATA wsaData;
     
+#ifdef __GNUC__
+    memset (&_edata, 0, &_end - &_edata);
+#endif
     return WSAStartup((WORD) MAKEWORD(2, 0), &wsaData);
 }
 

Reply via email to