Hi all,

please review and consider applying the patch attached to
this e-mail instead of the one attached to the e-mail I'm
replying to. The new one also fixes a misleading comment
and adds a comment for finding int64_t without stdint.h
being available. On LP64 platforms, this (and the older)
patch has probably no effect on the type used (untested).

Best regards, mabri



----- Original Message -----
From: Matthew Brincke <mabr...@ymail.com>
To: "podofo-users@lists.sourceforge.net" <podofo-users@lists.sourceforge.net>
CC: 
Sent: 20:35 Friday, 9 October 2015
Subject: [Podofo-users] Integer-type querying fixes for CMakeLists.txt

Hi all,

I've attached a patch which should fix 64-bit integer type
querying for compilers which neither have stdint.h (C99 types)
nor BaseTsd.h (types introduced for 64-bit Windows).
Sorry for not having tested it because I didn't want to submit
personal and employer info to get a download link for Borland C++ 5.x
from the manufacturer (now Embarcadero). I hope that it was just a simple
oversight which caused that which this patch was made to fix.


Please review it and if accepted, please apply it (separately) to the
public repository, if not, please tell me why.

Best regards, mabri

------------------------------------------------------------------------------

_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 1684)
+++ CMakeLists.txt	(working copy)
@@ -159,7 +159,8 @@
            SET(pdfuint64 "unsigned long int")
 	   CHECK_TYPE_SIZE("long int" SZ_INT64)
          ELSE(SZ_LONG == 8 AND SZ_ULONG == 8)
-           # See if the compiler implements "long long int", _int64, int64, __int64 or int64_t
+           # See if the compiler implements "long long int", int64_t, int64,
+           # or _int64 (in this order, __int64 check already done)
            IF(PODOFO_HAVE_SYS_TYPES_H)
              SET(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h")
            ENDIF(PODOFO_HAVE_SYS_TYPES_H)
@@ -166,12 +167,14 @@
            CHECK_TYPE_SIZE("long long int"          SZ_LONG_LONG)
            CHECK_TYPE_SIZE("unsigned long long int" SZ_UNSIGNED_LONG_LONG)
            IF(SZ_LONG_LONG == 8 AND SZ_UNSIGNED_LONG_LONG == 8)
-             SET(pdfint64 "long int")
-             SET(pdfuint64 "unsigned long int")
-	     CHECK_TYPE_SIZE("long int" SZ_INT64)
+             SET(pdfint64 "long long int")
+             SET(pdfuint64 "unsigned long long int")
+             CHECK_TYPE_SIZE("long long int" SZ_INT64)
            ELSE(SZ_LONG_LONG == 8 AND SZ_UNSIGNED_LONG_LONG == 8)
-             CHECK_TYPE_SIZE("int64_t"                SZ_INT64_T)
-             CHECK_TYPE_SIZE("uint64_t"               SZ_UINT64_T)
+             # The standard type int64_t is normally found in stdint.h,
+             # but use a type of this name anyway if present
+             CHECK_TYPE_SIZE("int64_t"       SZ_INT64_T)
+             CHECK_TYPE_SIZE("uint64_t"      SZ_UINT64_T)
              IF(SZ_INT64_T AND SZ_UINT64_T)
                SET(pdfint64 "int64_t")
                SET(pdfuint64 "uint64_t")
------------------------------------------------------------------------------
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to