]> OCCT Git - occt-wok.git/commitdiff
portability
authorcas <cas@opencascade.com>
Wed, 31 Oct 2001 18:01:39 +0000 (18:01 +0000)
committercas <cas@opencascade.com>
Wed, 31 Oct 2001 18:01:39 +0000 (18:01 +0000)
src/WOKNT/WOKNT_TimeStat.hxx
src/WOKNT/WOKNT_regexp.h
src/WOKNT/WOKNT_regexp_1.c

index 618780f0f1797c917cb39d968ed8a4d8b23e89f9..ed2f14c32ae842a66ba0c5835f8ffb46944f3dcf 100755 (executable)
@@ -1,6 +1,8 @@
 #ifndef __WOKNT_FILETIME_HXX
 # define __WOKNT_FILETIME_HXX
 
+#ifdef WNT
+
 # ifndef STRICT
 #  define STRICT
 # endif  // STRICT
@@ -12,3 +14,5 @@
 typedef time_t WOKNT_TimeStat;
 
 #endif  // __WOKNT_FILETIME_HXX
+
+#endif
index 690539aaf947312737aa797a0e578ab93ee60f32..8761fda363850693bcd577d257a483209398caa8 100755 (executable)
@@ -41,7 +41,7 @@
 typedef char          _TCHAR;
 typedef char          TCHAR;
 typedef unsigned char _TUCHAR;
-# endif  /* WNT */
+
 /***/
 /******************************************************************************/
 /* Definitions for data structures callers pass the regex library.            */
@@ -280,4 +280,5 @@ REGEXP_API int     re_set_syntax ( int );
 # endif  /* __cplusplus */
 /***/
 /******************************************************************************/
-#endif  /* __REGEXP_H */
+# endif  /* __REGEXP_H */
+#endif  /* WNT */
index 1b9f070942e309833c8d00c93424f6c05d17ed3c..a7591992901b01ebab284f4ce027504300dc816d 100755 (executable)
 # include <config.h>
 #endif
 
-#ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-#else
 /* alloca() non disponible sur HPUX 9.07 */
-# ifdef __cplusplus
+#ifdef __cplusplus
 extern "C" {
-# endif  
+#endif  
 void *alloca(unsigned int);
 # ifdef __cplusplus
 }
 #endif
-void *alloca(unsigned int size){return (void *)0L;}
-#endif
-
 
 #include <WOKNT_regexp.h>
 
@@ -1468,7 +1462,7 @@ int re_match_2 (
 
      if ( stacke - stackb > RE_MAX_FAILURES ) return -2;
 
-     stackx = ( _TUCHAR** ) alloca (  2 * ( stacke - stackb ) * sizeof ( _TCHAR* )  );
+     stackx = ( _TUCHAR** ) alloca(  2 * ( stacke - stackb ) * sizeof ( _TCHAR* )  );
      memcpy (  stackx, stackb, ( stacke - stackb ) * sizeof ( _TCHAR* )  );
      stackp = stackx + ( stackp - stackb );
      stacke = stackx + 2 * ( stacke - stackb );
@@ -1558,7 +1552,7 @@ nofinalize:
     if ( stackp == stacke ) {
 
      _TUCHAR** stackx =
-      ( _TUCHAR** ) alloca (  2 * ( stacke - stackb ) * sizeof ( _TUCHAR* )  );
+      ( _TUCHAR** ) alloca(  2 * ( stacke - stackb ) * sizeof ( _TUCHAR* )  );
              
      memcpy (  stackx, stackb, (stacke - stackb) * sizeof ( _TCHAR* )  );
      stackp = stackx + ( stackp - stackb );