dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/ilasm ilasm_main.c,1.12,1.13


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/ilasm ilasm_main.c,1.12,1.13
Date: Tue, 15 Apr 2003 20:03:10 -0400

Update of /cvsroot/dotgnu-pnet/pnet/ilasm
In directory subversions:/tmp/cvs-serv12601/ilasm

Modified Files:
        ilasm_main.c 
Log Message:


Change the permissions to +x if writing an executable.


Index: ilasm_main.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_main.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** ilasm_main.c        9 Feb 2003 00:56:26 -0000       1.12
--- ilasm_main.c        16 Apr 2003 00:03:08 -0000      1.13
***************
*** 25,28 ****
--- 25,34 ----
  #include "ilasm_data.h"
  #include "ilasm_output.h"
+ #if HAVE_SYS_TYPES_H
+       #include <sys/types.h>
+ #endif
+ #if HAVE_SYS_STAT_H
+       #include <sys/stat.h>
+ #endif
  
  #ifdef        __cplusplus
***************
*** 554,557 ****
--- 560,573 ----
                fclose(outfile);
        }
+ 
+       /* Change the permissions on the file if it is an executable */
+ #if !(defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__))
+       if(format == IL_IMAGETYPE_EXE && outfile)
+       {
+               int mask = umask(0);
+               umask(mask);
+               chmod(outputFile, 0777 & ~mask);
+       }
+ #endif
  
        /* Done */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]