Re: cvs: php-src /ext/date/lib timelib_structs.h
| From: | Derick Rethans | Date: | Mon, 15 Jun 2009 14:55:39 +0000 |
| Subject: | Re: cvs: php-src /ext/date/lib timelib_structs.h | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-58728@lists.php.net to get a copy of this message | ||
On Mon, 15 Jun 2009, Pierre-Alain Joye wrote:
> pajoye Mon Jun 15 14:39:37 2009 UTC
>
> Modified files:
> /php-src/ext/date/lib timelib_structs.h
> Log:
> - simplify, use correct type and silent warnings
Unfortunately we can't use PHP specific types and defines in this
library code... it's synched and used in other places too.
regards,
Derick
>
> http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timelib_structs.h?r1=1.33&r2=1.34&diff_format=u
> Index: php-src/ext/date/lib/timelib_structs.h
> diff -u php-src/ext/date/lib/timelib_structs.h:1.33 php-src/ext/date/lib/timelib_structs.h:1.34
> --- php-src/ext/date/lib/timelib_structs.h:1.33 Sun May 3 18:21:52 2009
> +++ php-src/ext/date/lib/timelib_structs.h Mon Jun 15 14:39:37 2009
> @@ -16,7 +16,7 @@
> +----------------------------------------------------------------------+
> */
>
> -/* $Id: timelib_structs.h,v 1.33 2009/05/03 18:21:52 derick Exp $ */
> +/* $Id: timelib_structs.h,v 1.34 2009/06/15 14:39:37 pajoye Exp $ */
>
> #ifndef __TIMELIB_STRUCTS_H__
> #define __TIMELIB_STRUCTS_H__
> @@ -33,19 +33,23 @@
> #include <stdint.h>
> #endif
>
> -#ifndef HAVE_INT32_T
> -# if SIZEOF_INT == 4
> +#ifdef PHP_WIN32
> +# include "win32/php_stdint.h"
> +#else
> +# ifndef HAVE_INT32_T
> +# if SIZEOF_INT == 4
> typedef int int32_t;
> -# elif SIZEOF_LONG == 4
> +# elif SIZEOF_LONG == 4
> typedef long int int32_t;
> +# endif
> # endif
> -#endif
>
> -#ifndef HAVE_UINT32_T
> -# if SIZEOF_INT == 4
> +# ifndef HAVE_UINT32_T
> +# if SIZEOF_INT == 4
> typedef unsigned int uint32_t;
> -# elif SIZEOF_LONG == 4
> +# elif SIZEOF_LONG == 4
> typedef unsigned long int uint32_t;
> +# endif
> # endif
> #endif
>
> @@ -62,25 +66,15 @@
> #endif
>
> #if defined(_MSC_VER)
> -typedef unsigned __int64 timelib_ull;
> -typedef __int64 timelib_sll;
> +typedef uint64_t timelib_ull;
> +typedef int64_t timelib_sll;
> +# define TIMELIB_LL_CONST(n) n ## i64
> #else
> typedef unsigned long long timelib_ull;
> typedef signed long long timelib_sll;
> +# define TIMELIB_LL_CONST(n) n ## ll
> #endif
>
> -#if defined(_MSC_VER)
> -#define int32_t __int32
> -#define uint32_t unsigned __int32
> -#endif
> -
> -#if defined(_MSC_VER)
> -#define TIMELIB_LL_CONST(n) n ## i64
> -#else
> -#define TIMELIB_LL_CONST(n) n ## ll
> -#endif
> -
> -
> typedef struct ttinfo
> {
> int32_t offset;
>
>
>
>
--
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org
twitter: @derickr