lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [2/6] git commit: refs/heads/charmonizer-decoupling - Add probe for CHY_SIZEOF_SIZE_T
Date Mon, 22 Jul 2013 20:13:31 GMT
Add probe for CHY_SIZEOF_SIZE_T


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/fdb420a9
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/fdb420a9
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/fdb420a9

Branch: refs/heads/charmonizer-decoupling
Commit: fdb420a953f827df15e1c97bb14bd88403c1162d
Parents: b039a39
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Mon Jul 22 21:41:27 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Mon Jul 22 21:41:27 2013 +0200

----------------------------------------------------------------------
 charmonizer/src/Charmonizer/Probe/Integers.c | 24 ++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/fdb420a9/charmonizer/src/Charmonizer/Probe/Integers.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Probe/Integers.c b/charmonizer/src/Charmonizer/Probe/Integers.c
index 3f44097..aec09b5 100644
--- a/charmonizer/src/Charmonizer/Probe/Integers.c
+++ b/charmonizer/src/Charmonizer/Probe/Integers.c
@@ -36,6 +36,7 @@ static const char chaz_Integers_sizes_code[] =
     CHAZ_QUOTE(      printf("%d ", (int)sizeof(int));      )
     CHAZ_QUOTE(      printf("%d ", (int)sizeof(long));     )
     CHAZ_QUOTE(      printf("%d ", (int)sizeof(void*));    )
+    CHAZ_QUOTE(      printf("%d ", (int)sizeof(size_t));   )
     CHAZ_QUOTE(      return 0;                             )
     CHAZ_QUOTE(  }                                         );
 
@@ -79,6 +80,7 @@ chaz_Integers_run(void) {
     int sizeof_long       = -1;
     int sizeof_long_long  = -1;
     int sizeof___int64    = -1;
+    int sizeof_size_t     = -1;
     int has_8             = false;
     int has_16            = false;
     int has_32            = false;
@@ -113,15 +115,17 @@ chaz_Integers_run(void) {
         char *ptr     = output;
         char *end_ptr = output;
 
-        sizeof_char  = strtol(ptr, &end_ptr, 10);
-        ptr          = end_ptr;
-        sizeof_short = strtol(ptr, &end_ptr, 10);
-        ptr          = end_ptr;
-        sizeof_int   = strtol(ptr, &end_ptr, 10);
-        ptr          = end_ptr;
-        sizeof_long  = strtol(ptr, &end_ptr, 10);
-        ptr          = end_ptr;
-        sizeof_ptr   = strtol(ptr, &end_ptr, 10);
+        sizeof_char   = strtol(ptr, &end_ptr, 10);
+        ptr           = end_ptr;
+        sizeof_short  = strtol(ptr, &end_ptr, 10);
+        ptr           = end_ptr;
+        sizeof_int    = strtol(ptr, &end_ptr, 10);
+        ptr           = end_ptr;
+        sizeof_long   = strtol(ptr, &end_ptr, 10);
+        ptr           = end_ptr;
+        sizeof_ptr    = strtol(ptr, &end_ptr, 10);
+        ptr           = end_ptr;
+        sizeof_size_t = strtol(ptr, &end_ptr, 10);
 
         free(output);
     }
@@ -243,6 +247,8 @@ chaz_Integers_run(void) {
     chaz_ConfWriter_add_def("SIZEOF_LONG", scratch);
     sprintf(scratch, "%d", sizeof_ptr);
     chaz_ConfWriter_add_def("SIZEOF_PTR", scratch);
+    sprintf(scratch, "%d", sizeof_size_t);
+    chaz_ConfWriter_add_def("SIZEOF_SIZE_T", scratch);
     if (has_long_long) {
         sprintf(scratch, "%d", sizeof_long_long);
         chaz_ConfWriter_add_def("SIZEOF_LONG_LONG", scratch);


Mime
View raw message