This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Compiling under cygwin and fixing x-permission handling


Hi,

I am not really experienced in programming C,
but somtimes when I have to compile something
under cygwin I try to fix some compilation errors.
Mostly this ends up in simply commenting out the 
special lines.

But a special compilation problem under cygwin 
seems to be the querying of x-file-permissions.

Compiling the midnight commander e.g. I had to change 
the following lines.

$ cat mc-4.5.54/.cygwin.diff.src#chmod.c
--- .cygwin.org.src#chmod.c     Tue May  1 11:52:36 2001
+++ src/chmod.c Sun Apr 29 21:11:32 2001
@@ -92,13 +92,17 @@
     WCheck *check;
 } check_perm[PERMISSIONS] =
 {
-    { S_IXOTH, N_("execute/search by others"), 0, 0, },
+    // some patches for cygwin
+    //{ S_IXOTH, N_("execute/search by others"), 0, 0, },
+    { S_IWOTH, N_("execute/search by others"), 0, 0, },
     { S_IWOTH, N_("write by others"), 0, 0, },
     { S_IROTH, N_("read by others"), 0, 0, },
-    { S_IXGRP, N_("execute/search by group"), 0, 0, },
+    //{ S_IXGRP, N_("execute/search by group"), 0, 0, },
+    { S_IWGRP, N_("execute/search by group"), 0, 0, },
     { S_IWGRP, N_("write by group"), 0, 0, },
     { S_IRGRP, N_("read by group"), 0, 0, },
-    { S_IXUSR, N_("execute/search by owner"), 0, 0, },
+    //{ S_IXUSR, N_("execute/search by owner"), 0, 0, },
+    { S_IWUSR, N_("execute/search by owner"), 0, 0, },
     { S_IWUSR, N_("write by owner"), 0, 0, },
     { S_IRUSR, N_("read by owner"), 0, 0, },
     { S_ISVTX, N_("sticky bit"), 0, 0, },

Compiling lyx I had to fix:

$ cat lyx-1.1.6fix1/.cygwin.diff.src#support#FileInfo.h
--- lyx-1.1.6fix1/.cygwin.org.src#support#FileInfo.h    Tue May  1
11:15:10 2001
+++ lyx-1.1.6fix1/src/support/FileInfo.h        Tue May  1 11:15:10 2001
@@ -96,7 +96,7 @@
                /// test for write permission
                wperm = W_OK,
                /// test for execute (search) permission
-               xperm = X_OK,
+               //xperm = X_OK,
                /// test for existence of file
                eperm = F_OK
        };
@@ -107,7 +107,7 @@
        /// Is the file readable for the current user?
        bool readable() const { return access(FileInfo::rperm); }
        /// Is the file executable for the current user?
-       bool executable() const { return access(FileInfo::xperm); }
+       bool executable() const { return access(FileInfo::wperm); }
        /// Does the file exist?
        bool exist() const { return access(FileInfo::eperm); }
        ///

These are really terrible fixes, so my question is, 
can I hinder the compiler to give errors at thise lines 
by customizing my environment? Or is there a better fix than 
commenting out the lines or replacing x with w permissions?


Frank-Michael.
begin:vcard 
n:Moser;Frank-Michael
tel;work:+49-(0)3834-515230
x-mozilla-html:FALSE
url:www.decodon.com
org:DECODON GmbH
version:2.1
email;internet:moser@decodon.com
adr;quoted-printable:;;W.-Rathenau-Str. 49a=0D=0A;Greifswald;;17489;Germany
fn:Frank-Michael Moser
end:vcard

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]