[PHP-CVS] cvs: php-src /win32 php_stdint.h

2009-05-04 Thread Pierre-Alain Joye
pajoye  Mon May  4 21:03:00 2009 UTC

  Modified files:  
/php-src/win32  php_stdint.h 
  Log:
  - revert last commit and fix inline
  
http://cvs.php.net/viewvc.cgi/php-src/win32/php_stdint.h?r1=1.6&r2=1.7&diff_format=u
Index: php-src/win32/php_stdint.h
diff -u php-src/win32/php_stdint.h:1.6 php-src/win32/php_stdint.h:1.7
--- php-src/win32/php_stdint.h:1.6  Mon May  4 20:32:33 2009
+++ php-src/win32/php_stdint.h  Mon May  4 21:03:00 2009
@@ -264,7 +264,7 @@
 #define INTMAX_C   INT64_C
 #define UINTMAX_C  UINT64_C
 
-#define llabs(i) (i >= 0? i : -i)
+static __inline int64_t llabs( int64_t i ) { return i >= 0? i: -i; }
 
 #endif // __STDC_CONSTANT_MACROS ]
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /win32 php_stdint.h

2009-05-04 Thread Nuno Lopes

pajoye Mon May  4 20:32:33 2009 UTC

 Modified files:
   /php-src/win32 php_stdint.h
 Log:
 - a  macro will just do it too

http://cvs.php.net/viewvc.cgi/php-src/win32/php_stdint.h?r1=1.5&r2=1.6&diff_format=u
Index: php-src/win32/php_stdint.h
diff -u php-src/win32/php_stdint.h:1.5 php-src/win32/php_stdint.h:1.6
--- php-src/win32/php_stdint.h:1.5 Mon May  4 17:10:26 2009
+++ php-src/win32/php_stdint.h Mon May  4 20:32:33 2009
@@ -264,7 +264,7 @@
#define INTMAX_C   INT64_C
#define UINTMAX_C  UINT64_C

-static inline int64_t llabs( int64_t i ) { return i >= 0? i: -i; }
+#define llabs(i) (i >= 0? i : -i)


what about multiple evaluation problems? (e.g. llabs(some_function_call()) )

Nuno 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /win32 php_stdint.h

2009-05-04 Thread Pierre-Alain Joye
pajoye  Mon May  4 20:32:33 2009 UTC

  Modified files:  
/php-src/win32  php_stdint.h 
  Log:
  - a  macro will just do it too
  
http://cvs.php.net/viewvc.cgi/php-src/win32/php_stdint.h?r1=1.5&r2=1.6&diff_format=u
Index: php-src/win32/php_stdint.h
diff -u php-src/win32/php_stdint.h:1.5 php-src/win32/php_stdint.h:1.6
--- php-src/win32/php_stdint.h:1.5  Mon May  4 17:10:26 2009
+++ php-src/win32/php_stdint.h  Mon May  4 20:32:33 2009
@@ -264,7 +264,7 @@
 #define INTMAX_C   INT64_C
 #define UINTMAX_C  UINT64_C
 
-static inline int64_t llabs( int64_t i ) { return i >= 0? i: -i; }
+#define llabs(i) (i >= 0? i : -i)
 
 #endif // __STDC_CONSTANT_MACROS ]
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /win32 php_stdint.h

2009-05-04 Thread Pierre-Alain Joye
pajoye  Mon May  4 17:10:26 2009 UTC

  Modified files:  
/php-src/win32  php_stdint.h 
  Log:
  - add llabs
  
http://cvs.php.net/viewvc.cgi/php-src/win32/php_stdint.h?r1=1.4&r2=1.5&diff_format=u
Index: php-src/win32/php_stdint.h
diff -u php-src/win32/php_stdint.h:1.4 php-src/win32/php_stdint.h:1.5
--- php-src/win32/php_stdint.h:1.4  Wed Jan 28 10:32:45 2009
+++ php-src/win32/php_stdint.h  Mon May  4 17:10:26 2009
@@ -264,6 +264,8 @@
 #define INTMAX_C   INT64_C
 #define UINTMAX_C  UINT64_C
 
+static inline int64_t llabs( int64_t i ) { return i >= 0? i: -i; }
+
 #endif // __STDC_CONSTANT_MACROS ]
 
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /win32 php_stdint.h

2009-01-28 Thread Pierre-Alain Joye
pajoye  Wed Jan 28 10:32:46 2009 UTC

  Modified files:  
/php-src/win32  php_stdint.h 
  Log:
  - MFB: sync 5.3
  
http://cvs.php.net/viewvc.cgi/php-src/win32/php_stdint.h?r1=1.3&r2=1.4&diff_format=u
Index: php-src/win32/php_stdint.h
diff -u php-src/win32/php_stdint.h:1.3 php-src/win32/php_stdint.h:1.4
--- php-src/win32/php_stdint.h:1.3  Wed Dec 31 11:12:40 2008
+++ php-src/win32/php_stdint.h  Wed Jan 28 10:32:45 2009
@@ -68,12 +68,22 @@
 // 7.18.1.1 Exact-width integer types
 typedef __int8int8_t;
 typedef __int16   int16_t;
+#ifndef int32_t
 typedef __int32   int32_t;
+#endif
+#ifndef int64_t
 typedef __int64   int64_t;
+#endif
+#ifndef uint8_t
 typedef unsigned __int8   uint8_t;
+#endif
+#ifndef u_char
 typedef unsigned __int8   u_char;
+#endif
 typedef unsigned __int16  uint16_t;
+#ifndef uint32_t
 typedef unsigned __int32  uint32_t;
+#endif
 typedef unsigned __int64  uint64_t;
 
 // 7.18.1.2 Minimum-width integer types



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /win32 php_stdint.h

2008-11-06 Thread Pierre-Alain Joye
pajoye  Thu Nov  6 14:15:20 2008 UTC

  Modified files:  
/php-src/win32  php_stdint.h 
  Log:
  - prevent warning when some types or macros are already defines (ICU defines 
many of them already)
  
http://cvs.php.net/viewvc.cgi/php-src/win32/php_stdint.h?r1=1.1&r2=1.2&diff_format=u
Index: php-src/win32/php_stdint.h
diff -u php-src/win32/php_stdint.h:1.1 php-src/win32/php_stdint.h:1.2
--- php-src/win32/php_stdint.h:1.1  Mon Jul 28 11:34:53 2008
+++ php-src/win32/php_stdint.h  Thu Nov  6 14:15:20 2008
@@ -116,19 +116,42 @@
 #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [   See footnote 
220 at page 257 and footnote 221 at page 259
 
 // 7.18.2.1 Limits of exact-width integer types
-#define INT8_MIN ((int8_t)_I8_MIN)
-#define INT8_MAX _I8_MAX
-#define INT16_MIN((int16_t)_I16_MIN)
-#define INT16_MAX_I16_MAX
-#define INT32_MIN((int32_t)_I32_MIN)
-#define INT32_MAX_I32_MAX
-#define INT64_MIN((int64_t)_I64_MIN)
-#define INT64_MAX_I64_MAX
-#define UINT8_MAX_UI8_MAX
-#define UINT16_MAX   _UI16_MAX
-#define UINT32_MAX   _UI32_MAX
-#define UINT64_MAX   _UI64_MAX
-
+#ifndef INT8_MIN
+# define INT8_MIN ((int8_t)_I8_MIN)
+#endif
+#ifndef INT8_MAX
+# define INT8_MAX _I8_MAX
+#endif
+#ifndef INT16_MIN
+# define INT16_MIN((int16_t)_I16_MIN)
+#endif
+#ifndef INT16_MAX
+# define INT16_MAX_I16_MAX
+#endif
+#ifndef INT32_MIN
+# define INT32_MIN((int32_t)_I32_MIN)
+#endif
+#ifndef INT32_MAX
+# define INT32_MAX_I32_MAX
+#endif
+#ifndef INT64_MIN
+# define INT64_MIN((int64_t)_I64_MIN)
+#endif
+#ifndef INT64_MAX
+# define INT64_MAX_I64_MAX
+#endif
+#ifndef UINT8_MAX
+# define UINT8_MAX_UI8_MAX
+#endif
+#ifndef UINT16_MAX
+# define UINT16_MAX   _UI16_MAX
+#endif
+#ifndef UINT32_MAX
+# define UINT32_MAX   _UI32_MAX
+#endif
+#ifndef UINT64_MAX
+# define UINT64_MAX   _UI64_MAX
+#endif
 // 7.18.2.2 Limits of minimum-width integer types
 #define INT_LEAST8_MININT8_MIN
 #define INT_LEAST8_MAXINT8_MAX
@@ -217,13 +240,16 @@
 #define INT8_C(val)  val##i8
 #define INT16_C(val) val##i16
 #define INT32_C(val) val##i32
-#define INT64_C(val) val##i64
+#ifndef INT64_C
+# define INT64_C(val) val##i64
+#endif
 
 #define UINT8_C(val)  val##ui8
 #define UINT16_C(val) val##ui16
 #define UINT32_C(val) val##ui32
-#define UINT64_C(val) val##ui64
-
+#ifndef UINT64_C
+# define UINT64_C(val) val##ui64
+#endif
 // 7.18.4.2 Macros for greatest-width integer constants
 #define INTMAX_C   INT64_C
 #define UINTMAX_C  UINT64_C



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php