lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r467475 - in /lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules: LargeFiles.charm LargeFiles.harm
Date Tue, 24 Oct 2006 20:47:10 GMT
Author: marvin
Date: Tue Oct 24 13:47:09 2006
New Revision: 467475

URL: http://svn.apache.org/viewvc?view=rev&rev=467475
Log:
Change the aliases for ftell/fseek to Lftell/Lfseek.  Add LOFFSET_TYPE and
HAS_LARGE_FILE_SUPPORT constants.  Document exported symbols in
LargeFiles.harm.

Modified:
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules/LargeFiles.charm
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules/LargeFiles.harm

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules/LargeFiles.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules/LargeFiles.charm?view=diff&rev=467475&r1=467474&r2=467475
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules/LargeFiles.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules/LargeFiles.charm Tue Oct 24 13:47:09
2006
@@ -47,6 +47,7 @@
     char *output;
     char fseek_command[10];
     char ftell_command[10];
+    char loff_type[10];
     size_t output_len;
     chaz_bool_t has_off64_t = false;
     int sizeof_off_t = -1;
@@ -63,6 +64,7 @@
             success = true;
             strcpy(fseek_command, "fseeko");
             strcpy(ftell_command, "ftello");
+            strcpy(loff_type, "off_t");
         }
     }
 
@@ -75,6 +77,7 @@
             has_off64_t = true;
             strcpy(fseek_command, "fseeko64");
             strcpy(ftell_command, "ftello64");
+            strcpy(loff_type, "off64_t");
         }
     }
 
@@ -89,14 +92,19 @@
                 success = true;
                 strcpy(fseek_command, "fseek");
                 strcpy(ftell_command, "ftell");
+                strcpy(loff_type, "long");
             }
         }
     }
 
     if (success) {
         append_conf(conf_fh, 
-            "#define %sFTell %s\n" 
-            "#define %sFSeek %s\n",
+            "#define %sHAS_LARGE_FILE_SUPPORT\n"
+            "#define %sLOFFSET_TYPE %s\n"
+            "#define %sLftell %s\n" 
+            "#define %sLfseek %s\n",
+            constant_prefix, 
+            constant_prefix, loff_type,
             function_prefix, ftell_command,
             function_prefix, fseek_command
         );
@@ -104,8 +112,10 @@
 
     if (want_short_names && success) {
         Start_Short_Names(conf_fh);
-        shorten_function(conf_fh, "FTell");
-        shorten_function(conf_fh, "FSeek");
+        shorten_constant(conf_fh, "HAS_LARGE_FILE_SUPPORT");
+        shorten_constant(conf_fh, "LOFFSET_TYPE");
+        shorten_function(conf_fh, "Lftell");
+        shorten_function(conf_fh, "Lfseek");
         End_Short_Names(conf_fh);
     }
     

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules/LargeFiles.harm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules/LargeFiles.harm?view=diff&rev=467475&r1=467474&r2=467475
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules/LargeFiles.harm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Modules/LargeFiles.harm Tue Oct 24 13:47:09
2006
@@ -7,6 +7,14 @@
 #include <stdio.h>
 
 /* Run the LargeFiles module.
+ *
+ * If support for large files is detected, these symbols will be defined.
+ *
+ * HAS_LARGE_FILE_SUPPORT
+ * LOFFSET_TYPE 
+ * Lftell
+ * Lfseek
+ *
  */
 void chaz_LargeFiles_run(FILE *conf_fh);
 



Mime
View raw message