Re: cvs: php-src /ext/standard config.m4 crypt_freesec.c crypt_freesec.h
| From: | Pierre Joye | Date: | Sat, 23 Aug 2008 16:50:37 +0000 |
| Subject: | Re: cvs: php-src /ext/standard config.m4 crypt_freesec.c crypt_freesec.h | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-52606@lists.php.net to get a copy of this message | ||
hi Arnaud,
this commit breaks the windows build. Parts of it makes little sense, see below:
On Sat, Aug 23, 2008 at 3:57 PM, Arnaud Le Blanc <lbarnaud@php.net> wrote:
> lbarnaud Sat Aug 23 13:57:02 2008 UTC
>
> Modified files:
> /php-src/ext/standard config.m4 crypt_freesec.c crypt_freesec.h
> Log:
> Fix build on solaris
>
>
>
> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/config.m4?r1=1.89&r2=1.90&diff_format=u
> Index: php-src/ext/standard/config.m4
> diff -u php-src/ext/standard/config.m4:1.89 php-src/ext/standard/config.m4:1.90
> --- php-src/ext/standard/config.m4:1.89 Mon Jul 28 11:34:53 2008
> +++ php-src/ext/standard/config.m4 Sat Aug 23 13:57:01 2008
> @@ -1,4 +1,4 @@
> -dnl $Id: config.m4,v 1.89 2008/07/28 11:34:53 pajoye Exp $ -*- autoconf -*-
> +dnl $Id: config.m4,v 1.90 2008/08/23 13:57:01 lbarnaud Exp $ -*- autoconf -*-
>
> divert(3)dnl
>
> @@ -464,6 +464,27 @@
> fi
>
> dnl
> +dnl Check for u_int32_t
> +dnl
> +AC_CACHE_CHECK([for u_int32_t], [ac_cv_type_u_int32_t],[
> +AC_TRY_COMPILE([
> +#ifdef HAVE_SYS_TYPES_H
> +# include <sys/types.h>
> +#endif
> +],[
> +int __tmp__() { u_int32_t a; }
> +],[
> + ac_cv_type_u_int32_t=yes
> +],[
> + ac_cv_type_u_int32_t=no
> +])])
> +if test "$ac_cv_type_u_int32_t" = "yes"; then
> + AC_DEFINE([HAVE_U_INT32_T], 1, [Define if your system has u_int32_t in sys/types.h])
> +fi
> +
> +AC_C_INLINE
> +
> +dnl
> dnl Setup extension sources
> dnl
> PHP_NEW_EXTENSION(standard, array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \
>
> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt_freesec.c?r1=1.2&r2=1.3&diff_format=u
> Index: php-src/ext/standard/crypt_freesec.c
> diff -u php-src/ext/standard/crypt_freesec.c:1.2 php-src/ext/standard/crypt_freesec.c:1.3
> --- php-src/ext/standard/crypt_freesec.c:1.2 Mon Jul 28 16:32:48 2008
> +++ php-src/ext/standard/crypt_freesec.c Sat Aug 23 13:57:01 2008
> @@ -1,5 +1,5 @@
> /*
> - $Id: crypt_freesec.c,v 1.2 2008/07/28 16:32:48 pajoye Exp $
> + $Id: crypt_freesec.c,v 1.3 2008/08/23 13:57:01 lbarnaud Exp $
> */
> /*
> * This version is derived from the original implementation of FreeSec
> @@ -40,7 +40,7 @@
> * SUCH DAMAGE.
> *
> * $Owl: Owl/packages/glibc/crypt_freesec.c,v 1.4 2005/11/16 13:08:32 solar Exp $
> - * $Id: crypt_freesec.c,v 1.2 2008/07/28 16:32:48 pajoye Exp $
> + * $Id: crypt_freesec.c,v 1.3 2008/08/23 13:57:01 lbarnaud Exp $
> *
> * This is an original implementation of the DES and the crypt(3) interfaces
> * by David Burren <davidb at werj.com.au>.
> @@ -184,7 +184,7 @@
> static u_int32_t key_perm_maskl[8][128], key_perm_maskr[8][128];
> static u_int32_t comp_maskl[8][128], comp_maskr[8][128];
>
> -__inline int
> +static inline int
__inline is known on gcc and windows, adding a define for solaris
sounds more appropriate.
> +#include "php_config.h"
that breaks on win.
> #if PHP_WIN32
> # include "win32/php_stdint.h"
> #elif HAVE_STDINT_H
> # include <stdint.h>
> #endif
> +#if !PHP_WIN32
little #else instead? :)
> +# ifndef HAVE_U_INT32_T
> + typedef uint32_t u_int32_t;
> +# endif
> +#endif
I don't understand this part. If HAVE_U_INT32_T is not defined, you
still use u_int32_t?
I will commit the fixes for windows soonish but the last problem seems
to be wrong (sorry but I don't have any solaris to test).
Cheers,
--
Pierre
http://blog.thepimp.net | http://www.libgd.org