Hi!
ML> I'm able to reproduce this in qemu:
BTW, revised previous patch (for LFNFUNCS.C), because TC doesn't
support MS-like names for attributes.
diff -rup -x config.mak OLD/# NEW/#
--- OLD/# 2006-08-22 20:04:52.000000000 +0000
+++ NEW/# 2006-08-23 00:55:36.000000000 +0000
@@ -155,3 +155,6 @@ Error exec.c 72: Unknown preprocessor di
- name with drive letter ("d:") or absolute path ("\cmd", "\dir\cmd")
now NOT searched through path; name with relative path ("dir\cmd") DO
searched through PATH.
+
+11. Fixed bug in LFNFUNCS.C library, which prevents redirection (because
+ this bug prevents to create non-existed files).
diff -rup -x config.mak OLD/lib/lfnfuncs.c NEW/lib/lfnfuncs.c
--- OLD/lib/lfnfuncs.c 2006-08-07 12:04:22.000000000 +0000
+++ NEW/lib/lfnfuncs.c 2006-08-23 16:12:58.000000000 +0000
@@ -6,11 +6,13 @@
#include <dir.h> /* findfirst, findnext */
#include <fcntl.h> /* O_WRONLY, O_CREAT */
+#include <sys/stat.h> /* S_IWRITE */
#include <errno.h> /* errno */
#include <string.h> /* strchr, memcpy */
#include <stdarg.h>
#include <io.h>
+#include "dfn.h" /* _A_NORMAL, _A_RDONLY */
#include "suppl.h"
#define __LFNFUNCS_C
#include "../include/lfnfuncs.h"
@@ -145,8 +147,9 @@ int lfnopen( const char *filename, int a
if( access & O_CREAT ) {
access &= ~O_CREAT; /* Remove the O_CREAT bit */
-
- __creat_or_truncate( filename, va_arg( vargs, unsigned ) );
+ __creat_or_truncate (filename,
+ (va_arg (vargs, unsigned) & S_IWRITE)
+ ? _A_NORMAL : _A_RDONLY);
}
va_end( vargs );
diff -rup -x config.mak OLD/suppl/dfn.h NEW/suppl/dfn.h
--- OLD/suppl/dfn.h 2006-08-07 14:59:48.000000000 +0000
+++ NEW/suppl/dfn.h 2006-08-23 16:30:22.000000000 +0000
@@ -51,6 +51,20 @@
#define dfnfullpath2 dfnufullpath2
#endif
+#if defined __TURBOC__ && !defined __BORLANDC__
+
+/* MSC names for file attributes */
+
+#define _A_NORMAL 0 /* Normal file, no attributes */
+#define _A_RDONLY FA_RDONLY /* Read only attribute */
+#define _A_HIDDEN FA_HIDDEN /* Hidden file */
+#define _A_SYSTEM FA_SYSTEM /* System file */
+#define _A_VOLID FA_LABEL /* Volume label */
+#define _A_SUBDIR FA_DIREC /* Directory */
+#define _A_ARCH FA_ARCH /* Archive */
+
+#endif
+
#define DFN_FILE 0x4000
#define DFN_LFN 0x2000
#define DFN_SHARABLE 0x0080
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel