apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r587781 - in /apr/apr/branches/0.9.x: CHANGES build/apr_common.m4 configure.in include/apr.h.in include/apr.hnw include/apr.hw include/apr_file_info.h
Date Wed, 24 Oct 2007 04:43:49 GMT
Author: wrowe
Date: Tue Oct 23 21:43:43 2007
New Revision: 587781

URL: http://svn.apache.org/viewvc?rev=587781&view=rev
Log:
Define apr_ino_t in such a way that it doesn't change definition
based on the library consumer's -D'efines to the filesystem.

Submitted by: Lucian Adrian Grijincu <lucian.grijincu gmail.com>

Backport: r587779


Modified:
    apr/apr/branches/0.9.x/CHANGES
    apr/apr/branches/0.9.x/build/apr_common.m4
    apr/apr/branches/0.9.x/configure.in
    apr/apr/branches/0.9.x/include/apr.h.in
    apr/apr/branches/0.9.x/include/apr.hnw
    apr/apr/branches/0.9.x/include/apr.hw
    apr/apr/branches/0.9.x/include/apr_file_info.h

Modified: apr/apr/branches/0.9.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/CHANGES?rev=587781&r1=587780&r2=587781&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/0.9.x/CHANGES [utf-8] Tue Oct 23 21:43:43 2007
@@ -1,5 +1,9 @@
-                                                     -*- coding: utf-8 -*-
+                                                     -*- coding: utf-8 -*-
 Changes with APR 0.9.17
+
+  *) Define apr_ino_t in such a way that it doesn't change definition
+     based on the library consumer's -D'efines to the filesystem.
+     [Lucian Adrian Grijincu <lucian.grijincu gmail.com>]
 
   *) Cause apr_file_dup2() on Win32 to update the MSVCRT psuedo-stdio
      handles for fd-based and FILE * based I/O.  [William Rowe]

Modified: apr/apr/branches/0.9.x/build/apr_common.m4
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/build/apr_common.m4?rev=587781&r1=587780&r2=587781&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/build/apr_common.m4 (original)
+++ apr/apr/branches/0.9.x/build/apr_common.m4 Tue Oct 23 21:43:43 2007
@@ -971,3 +971,17 @@
 
 AC_SUBST(MKDEP)
 ])
+
+dnl
+dnl APR_CHECK_TYPES_COMPATIBLE(TYPE-1, TYPE-2, [ACTION-IF-TRUE])
+dnl
+dnl Try to determine whether two types are the same. Only works
+dnl for gcc and icc.
+dnl
+AC_DEFUN([APR_CHECK_TYPES_COMPATIBLE], [
+define([apr_cvname], apr_cv_typematch_[]translit([$1], [ ], [_])_[]translit([$2], [ ], [_]))
+AC_CACHE_CHECK([whether $1 and $2 are the same], apr_cvname, [
+AC_TRY_COMPILE(AC_INCLUDES_DEFAULT, [
+    int foo[0 - !__builtin_types_compatible_p($1, $2)];
+], [apr_cvname=yes $3], [apr_cvname=no])])
+])

Modified: apr/apr/branches/0.9.x/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/configure.in?rev=587781&r1=587780&r2=587781&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/configure.in (original)
+++ apr/apr/branches/0.9.x/configure.in Tue Oct 23 21:43:43 2007
@@ -1221,6 +1221,14 @@
         fi
     fi
     AC_MSG_RESULT([$off_t_value])
+    
+    dnl define apr_ino_t in a manner independent of _FILE_OFFSET_BITS setting
+    dnl default fallback
+    ino_t_value=ino_t
+    APR_CHECK_TYPES_COMPATIBLE(ino_t, unsigned long long, ino_t_value="unsigned long long")
+    APR_CHECK_TYPES_COMPATIBLE(ino_t, unsigned long, ino_t_value="unsigned long")
+    APR_CHECK_TYPES_COMPATIBLE(ino_t, unsigned int, ino_t_value="unsigned int")
+
 else
     off_t_value='apr_int32_t'
     off_t_fmt='#define APR_OFF_T_FMT "d"'
@@ -1300,6 +1308,7 @@
 AC_SUBST(pid_t_fmt)
 AC_SUBST(int64_literal) 
 AC_SUBST(stdint) 
+AC_SUBST(ino_t_value)
 
 dnl ----------------------------- Checking for string functions
 AC_CHECK_FUNCS(strnicmp, have_strnicmp="1", have_strnicmp="0")

Modified: apr/apr/branches/0.9.x/include/apr.h.in
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/include/apr.h.in?rev=587781&r1=587780&r2=587781&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/include/apr.h.in (original)
+++ apr/apr/branches/0.9.x/include/apr.h.in Tue Oct 23 21:43:43 2007
@@ -278,6 +278,8 @@
 typedef  @off_t_value@           apr_off_t;
 typedef  @socklen_t_value@       apr_socklen_t;
 
+typedef @ino_t_value@            apr_ino_t;
+
 #define APR_SIZEOF_VOIDP @voidp_size@
 
 /* Mechanisms to properly type numeric literals */

Modified: apr/apr/branches/0.9.x/include/apr.hnw
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/include/apr.hnw?rev=587781&r1=587780&r2=587781&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/include/apr.hnw (original)
+++ apr/apr/branches/0.9.x/include/apr.hnw Tue Oct 23 21:43:43 2007
@@ -234,6 +234,8 @@
 typedef  off_t             apr_off_t;
 typedef  int               apr_socklen_t;
 
+typedef apr_uint64_t       apr_ino_t;
+
 #ifdef UNKNOWN_NETWARE_64BIT_FLAG_NEEDED
 #define APR_SIZEOF_VOIDP   8
 #else

Modified: apr/apr/branches/0.9.x/include/apr.hw
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/include/apr.hw?rev=587781&r1=587780&r2=587781&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/include/apr.hw (original)
+++ apr/apr/branches/0.9.x/include/apr.hw Tue Oct 23 21:43:43 2007
@@ -349,6 +349,8 @@
 #endif
 typedef  int         apr_socklen_t;
 
+typedef apr_uint64_t       apr_ino_t;
+
 #ifdef WIN64
 #define APR_SIZEOF_VOIDP   8
 #else

Modified: apr/apr/branches/0.9.x/include/apr_file_info.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/include/apr_file_info.h?rev=587781&r1=587780&r2=587781&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/include/apr_file_info.h (original)
+++ apr/apr/branches/0.9.x/include/apr_file_info.h Tue Oct 23 21:43:43 2007
@@ -109,16 +109,10 @@
 typedef apr_int32_t               apr_fileperms_t;
 #if (defined WIN32) || (defined NETWARE)
 /**
- * Structure for determining the inode of the file.
- */
-typedef apr_uint64_t              apr_ino_t;
-/**
  * Structure for determining the device the file is on.
  */
 typedef apr_uint32_t              apr_dev_t;
 #else
-/** The inode of the file. */
-typedef ino_t                     apr_ino_t;
 /**
  * Structure for determining the device the file is on.
  */



Mime
View raw message