This commit is contained in:
manojampalam 2016-03-05 12:09:26 -08:00
parent 6085753a30
commit 94da1cd22c
4 changed files with 41 additions and 2 deletions

View File

@ -43,7 +43,9 @@
/* #define O_RDWR 0x2 */
/* open file creation and file status flags can be bitwise-or'd*/
/* #define O_APPEND 0x8 /*file is opened in append mode*/
#define O_NONBLOCK 0x10 /*io operations wont block*/
#ifndef O_NONBLOCK
#define O_NONBLOCK 0x0004 /*io operations wont block*/
#endif
/* #define O_CREAT 0x100 /*If the file does not exist it will be created*/
/*
* If the file exists and is a regular file, and the file is successfully
@ -55,7 +57,15 @@
/* #define O_EXCL 0x400 */
/* #define O_BINARY 0x8000 //Gives raw data (while O_TEXT normalises line endings */
// open modes
#ifndef S_IRUSR
#define S_IRUSR 00400 //user has read permission
#endif // ! S_IRUSR
#ifndef S_IWUSR
#define S_IWUSR 00200 //user has write permission
#endif
#ifndef S_IRGRP
#define S_IRGRP 00040 //group has read permission
#define S_IROTH 00004 //others have read permission
#endif
#ifndef S_IROTH
#define S_IROTH 00004 //others have read permission
#endif

View File

@ -6,4 +6,29 @@
#include "w32posix.h"
// Signal types
#define SIGINT 2 // interrupt
#define SIGILL 4 // illegal instruction - invalid function image
#define SIGFPE 8 // floating point exception
#define SIGSEGV 11 // segment violation
#define SIGTERM 15 // Software termination signal from kill
#define SIGBREAK 21 // Ctrl-Break sequence
#define SIGABRT 22 // abnormal termination triggered by abort call
#define SIGABRT_COMPAT 6 // SIGABRT compatible with other platforms, same as SIGABRT
#define SIGALRM 14
#define SIGCHLD 26
#define SIGHUP 1
#define SIGPIPE 27
#define SIGQUIT 3
// Signal action codes
#define SIG_DFL (0) // default signal action
#define SIG_IGN (1) // ignore signal
#define SIG_GET (2) // return current value
#define SIG_SGE (3) // signal gets error
#define SIG_ACK (4) // acknowledge
#define signal w32_signal

View File

@ -153,6 +153,7 @@
<ItemGroup>
<ClInclude Include="debug.h" />
<ClInclude Include="inc\defs.h" />
<ClInclude Include="inc\signal.h" />
<ClInclude Include="inc\sys\select.h" />
<ClInclude Include="inc\sys\socket.h" />
<ClInclude Include="inc\unistd.h" />

View File

@ -59,5 +59,8 @@
<ClInclude Include="inc\sys\select.h">
<Filter>inc\sys</Filter>
</ClInclude>
<ClInclude Include="inc\signal.h">
<Filter>inc</Filter>
</ClInclude>
</ItemGroup>
</Project>