Blame gcl-2.6.8-rename.patch
|
|
e6a2505 |
diff -dur gcl-2.6.8.ORIG/o/unixfsys.c gcl-2.6.8/o/unixfsys.c
|
|
|
e6a2505 |
--- gcl-2.6.8.ORIG/o/unixfsys.c 2007-04-06 08:41:09.000000000 -0600
|
|
|
e6a2505 |
+++ gcl-2.6.8/o/unixfsys.c 2008-12-29 17:34:10.000000000 -0700
|
|
|
e6a2505 |
@@ -448,11 +448,17 @@
|
|
|
e6a2505 |
backup_fopen(char *filename, char *option)
|
|
|
e6a2505 |
{
|
|
|
e6a2505 |
char backupfilename[MAXPATHLEN];
|
|
|
e6a2505 |
+#ifndef HAVE_RENAME
|
|
|
e6a2505 |
char command[MAXPATHLEN * 2];
|
|
|
e6a2505 |
+#endif
|
|
|
e6a2505 |
|
|
|
e6a2505 |
strcat(strcpy(backupfilename, filename), ".BAK");
|
|
|
e6a2505 |
+#ifdef HAVE_RENAME
|
|
|
e6a2505 |
+ rename(filename, backupfilename);
|
|
|
e6a2505 |
+#else
|
|
|
e6a2505 |
sprintf(command, "mv %s %s", filename, backupfilename);
|
|
|
e6a2505 |
system(command);
|
|
|
e6a2505 |
+#endif
|
|
|
e6a2505 |
return(fopen(filename, option));
|
|
|
e6a2505 |
}
|
|
|
e6a2505 |
|
|
|
e6a2505 |
@@ -477,6 +483,9 @@
|
|
|
e6a2505 |
{
|
|
|
e6a2505 |
char filename[MAXPATHLEN];
|
|
|
e6a2505 |
char newfilename[MAXPATHLEN];
|
|
|
e6a2505 |
+#ifndef HAVE_RENAME
|
|
|
e6a2505 |
+ char command[MAXPATHLEN * 2];
|
|
|
e6a2505 |
+#endif
|
|
|
e6a2505 |
|
|
|
e6a2505 |
check_arg(2);
|
|
|
e6a2505 |
check_type_or_pathname_string_symbol_stream(&vs_base[0]);
|