blob: eb755891859700086fcdc35404076b1e522ed836 [file] [log] [blame] [raw]
#ifndef _SHARED_H
#define _SHARED_H
#include <sys/types.h>
#include <windows.h>
//#include "sys/fifo.h"
#define MAX_ENVIRONBLK (2048)
#define SYSNAMELEN (24)
/* This struct is copied to shared seg before creating a new process */
/* The child will read it */
typedef struct _pginfo_s {
int pgid;
int showwindow;
char cwd[126];
char environ[MAX_ENVIRONBLK];
int stdinfd;
int stdoutfd;
int stderrfd;
} _pginfo_t, *_PGINFO;
typedef struct _shmblk_s {
void* mutex;
_pginfo_t pginfo;
} _shmblk_t, *_SHMBLK;
// To avoid stack corruptions
typedef struct {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD dwVolumeSerialNumber;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD nNumberOfLinks;
DWORD nFileIndexHigh;
DWORD nFileIndexLow;
//#ifdef _WIN32_WCE
DWORD dwOID; // Newer version of Windows CE have this member
//#endif
} BY_HANDLE_FILE_INFORMATION_NEW;
time_t __filetime_to_time_t(FILETIME);
FILETIME __time_t_to_filetime(time_t);
void __filetime_to_timeval(const FILETIME *, struct timeval *);
void __timeval_to_filetime(const struct timeval *, FILETIME *);
#endif