[Pcre-svn] [494] code/trunk: If stdint.h is not available, …

Página Inicial
Delete this message
Autor: Subversion repository
Data:  
Para: pcre-svn
Assunto: [Pcre-svn] [494] code/trunk: If stdint.h is not available, include inttypes. h if available.
Revision: 494
          http://vcs.pcre.org/viewvc?view=rev&revision=494
Author:   ph10
Date:     2010-03-02 11:53:12 +0000 (Tue, 02 Mar 2010)


Log Message:
-----------
If stdint.h is not available, include inttypes.h if available.

Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/pcre_internal.h


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2010-03-02 11:37:21 UTC (rev 493)
+++ code/trunk/ChangeLog    2010-03-02 11:53:12 UTC (rev 494)
@@ -11,6 +11,9 @@


 3.  Updated the licensing terms in the pcregexp.pas file, as agreed with the
     original author of that file, following a query about its status. 
+    
+4.  On systems that do not have stdint.h (e.g. Solaris), check for and include 
+    inttypes.h instead. This fixes a bug that was introduced by change 8.01/8.



Version 8.01 19-Jan-2010

Modified: code/trunk/pcre_internal.h
===================================================================
--- code/trunk/pcre_internal.h    2010-03-02 11:37:21 UTC (rev 493)
+++ code/trunk/pcre_internal.h    2010-03-02 11:53:12 UTC (rev 494)
@@ -188,11 +188,14 @@
 large integers. If a 64-bit integer type is available, we can use that.
 Otherwise we have to cast to double, which of course requires floating point
 arithmetic. Handle this by defining a macro for the appropriate type. If
-stdint.h is available, include it; it may define INT64_MAX. The macro int64_t
-may be set by "configure". */
+stdint.h is available, include it; it may define INT64_MAX. Systems that do not
+have stdint.h (e.g. Solaris) may have inttypes.h. The macro int64_t may be set
+by "configure". */


#if HAVE_STDINT_H
#include <stdint.h>
+#elif HAVE_INTTYPES_H
+#include <inttypes.h>
#endif

#if defined INT64_MAX || defined int64_t