|
From: Blas R. S. <br...@us...> - 2003-07-03 00:22:52
|
Build Version : T1.5.0.3615 Firebird 1.5 Release Candidate 4
(writeBuildNum.sh,v 1.3612 2003/07/03 00:22:49 brodsom Exp )
Update of /cvsroot/firebird/firebird2/src/jrd
In directory sc8-pr-cvs1:/tmp/cvs-serv5722
Modified Files:
codes.epp
Log Message:
Solve a bug. mv can't be used in win32.
Replace cmp with a native compare on win32
Index: codes.epp
===================================================================
RCS file: /cvsroot/firebird/firebird2/src/jrd/codes.epp,v
retrieving revision 1.16
retrieving revision 1.17
diff -b -U3 -r1.16 -r1.17
--- codes.epp 13 Apr 2003 17:02:54 -0000 1.16
+++ codes.epp 3 Jul 2003 00:22:48 -0000 1.17
@@ -751,15 +751,29 @@
char origName[1000];
+ char buffer[1000];
+#ifdef WIN_NT
+ if ( genDirectory != NULL) {
+ sprintf(origName,"%s\\%s", genDirectory, original);
+ }
+ else {
+ sprintf(origName,".\\%s", original);
+ }
+ /*
+ * This is a trick to make on systems previous to W2K were apparently
+ * fc does not return a errorlevel, but find return it (1 found 0 not found)
+ * FC: appear only where there are no differences (and the switch /B is not used)
+ */
+ sprintf(buffer, "fc %s %s | find \"FC:\" > nul", new_file, origName);
+#else
if ( genDirectory != NULL) {
sprintf(origName,"%s/%s", genDirectory, original);
}
else {
sprintf(origName,"./%s", original);
}
-
- char buffer[1000];
sprintf(buffer, "cmp -s %s %s", new_file, origName);
+#endif
/* If the new file is identical to the original, then don't update
the original */
@@ -769,7 +783,11 @@
}
else {
/* Original file is missing or different */
+#ifdef WIN_NT
+ sprintf(buffer, "move %s %s > nul", new_file, origName);
+#else
sprintf(buffer, "mv -f %s %s", new_file, origName);
+#endif
if (system(buffer) != 0) {
ib_fprintf(ib_stderr, "Error moving %s to %s!\n",
new_file, origName);
|