]> granicus.if.org Git - php/commitdiff
- Change uint32 to php_uint32 (PostgreSQL defines uint32, and perhaps other packages...
authorZeev Suraski <zeev@php.net>
Sun, 26 Dec 1999 00:18:44 +0000 (00:18 +0000)
committerZeev Suraski <zeev@php.net>
Sun, 26 Dec 1999 00:18:44 +0000 (00:18 +0000)
- PostgreSQL finally compiles&links

ext/pgsql/pgsql.c
ext/standard/basic_functions.h
ext/standard/rand.c

index 396f99f68ae86ee3a9e86d10fcbdd679a1dbf9a0..d293226fc7e3ac797164c97c24eaa6ba593e00a8 100644 (file)
@@ -694,7 +694,7 @@ PHP_FUNCTION(pg_cmdtuples)
 /* }}} */
 
 
-char *get_fieldname(PGconn *pgsql, Oid oid, HashTable *list)
+char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list)
 {
        PGresult *result;
        char hashed_oid_key[32];
@@ -794,7 +794,7 @@ void php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
 
 /* {{{ proto string pg_fieldname(int result, int field_number)
    Returns the name of the field */
-PHP_FUNCTION(pg_field_name)
+PHP_FUNCTION(pg_fieldname)
 {
        php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_NAME);
 }
index 174c64c6ea7ebc87bcdba80c3e557f21fd2e2172..17597c34c6c7cc9e04f7d8abc55a80754eb08115 100644 (file)
@@ -115,10 +115,10 @@ typedef int php_stat_len;
 
 #if SIZEOF_INT == 4
 /* Most 32-bit and 64-bit systems have 32-bit ints */
-typedef unsigned int uint32;
+typedef unsigned int php_uint32;
 #elif SIZEOF_LONG == 4
 /* 16-bit systems? */
-typedef unsigned long uint32;
+typedef unsigned long php_uint32;
 #else
 #error Need type which holds 32 bits
 #endif
@@ -148,8 +148,8 @@ typedef struct {
        struct stat lsb;
 
        /* rand.c */
-       uint32   state[MT_N+1];  /* state vector + 1 extra to not violate ANSI C */
-       uint32   *next;       /* next random value is computed from here */
+       php_uint32   state[MT_N+1];  /* state vector + 1 extra to not violate ANSI C */
+       php_uint32   *next;       /* next random value is computed from here */
        int      left;        /* can *next++ this many times before reloading */
 } php_basic_globals;
 
index fae8f7e01ea721db2cd7d82c1987012e78427ff3..48d28ab36ec9974824b8d17157b323812408320e 100644 (file)
@@ -76,7 +76,7 @@
   
 
   
-   uint32 must be an unsigned integer type capable of holding at least 32
+   php_uint32 must be an unsigned integer type capable of holding at least 32
    bits; exactly 32 should be fastest, but 64 is better on an Alpha with
    GCC at -O3 optimization so try your options and see what's best for you
 
@@ -92,7 +92,7 @@
 #define loBits(u)     ((u) & 0x7FFFFFFFU)  /* mask     the highest   bit of u */
 #define mixBits(u, v) (hiBit(u)|loBits(v)) /* move hi bit of u to hi bit of v */
 
-static void seedMT(uint32 seed BLS_DC)
+static void seedMT(php_uint32 seed BLS_DC)
 {
     /*
        We initialize state[0..(N-1)] via the generator
@@ -140,7 +140,7 @@ static void seedMT(uint32 seed BLS_DC)
        so-- that's why the only change I made is to restrict to odd seeds.
     */
 
-    register uint32 x = (seed | 1U) & 0xFFFFFFFFU, *s = BG(state);
+    register php_uint32 x = (seed | 1U) & 0xFFFFFFFFU, *s = BG(state);
     register int    j;
 
     for(BG(left)=0, *s++=x, j=N; --j;
@@ -148,9 +148,9 @@ static void seedMT(uint32 seed BLS_DC)
 }
 
 
-static uint32 reloadMT(BLS_D)
+static php_uint32 reloadMT(BLS_D)
 {
-    register uint32 *p0=BG(state), *p2=BG(state)+2, *pM=BG(state)+M, s0, s1;
+    register php_uint32 *p0=BG(state), *p2=BG(state)+2, *pM=BG(state)+M, s0, s1;
     register int    j;
 
     if(BG(left) < -1)
@@ -172,9 +172,9 @@ static uint32 reloadMT(BLS_D)
 }
 
 
-static inline uint32 randomMT(void)
+static inline php_uint32 randomMT(void)
 {
-    uint32 y;
+    php_uint32 y;
        BLS_FETCH();
 
     if(--BG(left) < 0)