diff options
Diffstat (limited to 'winsup/cygwin/include/sys')
-rw-r--r-- | winsup/cygwin/include/sys/cygwin.h | 33 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/ioctl.h | 4 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/ipc.h | 52 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/mount.h | 8 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/resource.h | 20 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/shm.h | 89 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/socket.h | 13 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/soundcard.h | 82 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/statfs.h | 11 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/strace.h | 10 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/sysmacros.h | 8 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/termios.h | 28 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/uio.h | 9 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/un.h | 2 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/vfs.h | 2 |
15 files changed, 156 insertions, 215 deletions
diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h index 1d53f636b..f8feda4c7 100644 --- a/winsup/cygwin/include/sys/cygwin.h +++ b/winsup/cygwin/include/sys/cygwin.h @@ -1,6 +1,6 @@ /* sys/cygwin.h - Copyright 1997, 1998, 2000, 2001 Red Hat, Inc. + Copyright 1997, 1998, 2000, 2001, 2002 Red Hat, Inc. This file is part of Cygwin. @@ -64,7 +64,13 @@ typedef enum CW_GET_CYGDRIVE_PREFIXES, CW_GETPINFO_FULL, CW_INIT_EXCEPTIONS, - CW_GET_CYGDRIVE_INFO + CW_GET_CYGDRIVE_INFO, + CW_SET_CYGWIN_REGISTRY_NAME, + CW_GET_CYGWIN_REGISTRY_NAME, + CW_STRACE_TOGGLE, + CW_STRACE_ACTIVE, + CW_CYGWIN_PID_TO_WINPID, + CW_EXTRACT_DOMAIN_AND_USER } cygwin_getinfo_types; #define CW_NEXTPID 0x80000000 // or with pid to get next one @@ -89,7 +95,7 @@ enum PID_USETTY = 0x1000, // Setting this enables or disables cygwin's // tty support. This is inherited by // all execed or forked processes. - PID_UNUSED2 = 0x2000, // child has execed + PID_ALLPIDS = 0x2000, // child has execed PID_EXECED = 0x4000, // redirect to original pid info block PID_NOREDIR = 0x8000, // don't redirect if execed PID_EXITED = 0x80000000 // Free entry. @@ -203,14 +209,25 @@ extern int cygwin_attach_handle_to_fd (char *, int, HANDLE, mode_t, DWORD); #define TTY_CONSOLE 0x40000000 +#define EXTERNAL_PINFO_VERSION_16_BIT 0 +#define EXTERNAL_PINFO_VERSION_32_BIT 1 +#define EXTERNAL_PINFO_VERSION EXTERNAL_PINFO_VERSION_32_BIT + +#ifndef _SYS_TYPES_H +typedef unsigned short __uid16_t; +typedef unsigned short __gid16_t; +typedef unsigned long __uid32_t; +typedef unsigned long __gid32_t; +#endif + struct external_pinfo { pid_t pid; pid_t ppid; HANDLE hProcess; DWORD dwProcessId, dwSpawnedProcessId; - uid_t uid; - gid_t gid; + __uid16_t uid; + __gid16_t gid; pid_t pgid; pid_t sid; int ctty; @@ -223,9 +240,13 @@ struct external_pinfo char progname[MAX_PATH]; DWORD strace_mask; - HANDLE strace_file; + DWORD version; DWORD process_state; + + /* Only available if version >= EXTERNAL_PINFO_VERSION_32_BIT */ + __uid32_t uid32; + __gid32_t gid32; }; DWORD cygwin_internal (cygwin_getinfo_types, ...); diff --git a/winsup/cygwin/include/sys/ioctl.h b/winsup/cygwin/include/sys/ioctl.h index 93f73a69c..fd9515fb1 100644 --- a/winsup/cygwin/include/sys/ioctl.h +++ b/winsup/cygwin/include/sys/ioctl.h @@ -1,6 +1,6 @@ /* sys/ioctl.h - Copyright 1998, 2001 Red Hat, Inc. + Copyright 1998, 2001, 2002 Red Hat, Inc. This file is part of Cygwin. @@ -23,7 +23,7 @@ details. */ __BEGIN_DECLS -int ioctl (int __fd, int __cmd, void *); +int ioctl (int __fd, int __cmd, ...); __END_DECLS diff --git a/winsup/cygwin/include/sys/ipc.h b/winsup/cygwin/include/sys/ipc.h deleted file mode 100644 index 8ddec6d50..000000000 --- a/winsup/cygwin/include/sys/ipc.h +++ /dev/null @@ -1,52 +0,0 @@ -/* sys/ipc.h - - Copyright 2001 Red Hat Inc. - Written by Robert Collins <rbtcollins@hotmail.com> - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#ifndef _SYS_IPC_H -#define _SYS_IPC_H - -/* sys/types must be included before sys/ipc.h. We aren't meant to automatically - * include it however - */ - -struct ipc_perm { - uid_t uid; - gid_t gid; - uid_t cuid; - gid_t cgid; - mode_t mode; -}; - -/* the mode flags used with the _get functions use the low order 9 bits for a mode - * request - */ -#define IPC_CREAT 0x0200 -#define IPC_EXCL 0x0400 -#define IPC_NOWAIT 0x0800 - -/* this is a value that will _never_ be a valid key from ftok */ -#define IPC_PRIVATE -2 - -#define IPC_RMID 0x0003 -#define IPC_SET 0x0002 -#define IPC_STAT 0x0001 - -key_t ftok(const char *, int); - -#endif /* _SYS_IPC_H */ - -#ifdef __cplusplus -} -#endif diff --git a/winsup/cygwin/include/sys/mount.h b/winsup/cygwin/include/sys/mount.h index 00b7a0137..26e02cba2 100644 --- a/winsup/cygwin/include/sys/mount.h +++ b/winsup/cygwin/include/sys/mount.h @@ -21,10 +21,14 @@ enum MOUNT_BINARY = 0x002, /* "binary" format read/writes */ MOUNT_SYSTEM = 0x008, /* mount point came from system table */ MOUNT_EXEC = 0x010, /* Any file in the mounted directory gets 'x' bit */ - MOUNT_AUTO = 0x020, /* mount point refers to auto device mount */ + MOUNT_CYGDRIVE = 0x020, /* mount point refers to cygdriv device mount */ MOUNT_CYGWIN_EXEC = 0x040, /* file or directory is or contains a cygwin executable */ - MOUNT_MIXED = 0x080, /* reads are text, writes are binary */ + MOUNT_MIXED = 0x080, /* reads are text, writes are binary + not yet implemented */ + MOUNT_NOTEXEC = 0x100, /* don't check files for executable magic */ + MOUNT_DEVFS = 0x200, /* /device "filesystem" */ + MOUNT_PROC = 0x400 /* /proc "filesystem" */ }; int mount (const char *, const char *, unsigned __flags); diff --git a/winsup/cygwin/include/sys/resource.h b/winsup/cygwin/include/sys/resource.h index c68a206e1..c1fe544a9 100644 --- a/winsup/cygwin/include/sys/resource.h +++ b/winsup/cygwin/include/sys/resource.h @@ -50,16 +50,16 @@ struct rusage { long ru_ixrss; /* XXX: 0 */ long ru_idrss; /* XXX: sum of rm_asrss */ long ru_isrss; /* XXX: 0 */ - long ru_minflt; /* any page faults not requiring I/O */ - long ru_majflt; /* any page faults requiring I/O */ - long ru_nswap; /* swaps */ - long ru_inblock; /* block input operations */ - long ru_oublock; /* block output operations */ - long ru_msgsnd; /* messages sent */ - long ru_msgrcv; /* messages received */ - long ru_nsignals; /* signals received */ - long ru_nvcsw; /* voluntary context switches */ - long ru_nivcsw; /* involuntary " */ + long ru_minflt; /* any page faults not requiring I/O */ + long ru_majflt; /* any page faults requiring I/O */ + long ru_nswap; /* swaps */ + long ru_inblock; /* block input operations */ + long ru_oublock; /* block output operations */ + long ru_msgsnd; /* messages sent */ + long ru_msgrcv; /* messages received */ + long ru_nsignals; /* signals received */ + long ru_nvcsw; /* voluntary context switches */ + long ru_nivcsw; /* involuntary " */ #define ru_last ru_nivcsw }; diff --git a/winsup/cygwin/include/sys/shm.h b/winsup/cygwin/include/sys/shm.h deleted file mode 100644 index 208c5f29f..000000000 --- a/winsup/cygwin/include/sys/shm.h +++ /dev/null @@ -1,89 +0,0 @@ -/* sys/shm.h - - Copyright 2001 Red Hat Inc. - Written by Robert Collins <rbtcollins@hotmail.com> - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#ifndef _SYS_SHM_H -#define _SYS_SHM_H - -#include <sys/ipc.h> - -#define SHM_RDONLY 1 -/* 64 Kb was hardcoded for x86. MS states this may change, but we need it in the header - * file. - */ -#define SHMLBA 65536 -#define SHM_RND 1 - -typedef long int shmatt_t; - -#if defined(__INSIDE_CYGWIN__) && defined(__cplusplus) - -class _shmattach { -public: - void *data; - int shmflg; - class _shmattach *next; -}; - -class shmid_ds { -public: - struct ipc_perm shm_perm; - size_t shm_segsz; - pid_t shm_lpid; - pid_t shm_cpid; - shmatt_t shm_nattch; - time_t shm_atime; - time_t shm_dtime; - time_t shm_ctime; - void *mapptr; -}; - -class shmnode { -public: - class shmid_ds * shmds; - int shm_id; - class shmnode *next; - key_t key; - HANDLE filemap; - HANDLE attachmap; - class _shmattach *attachhead; -}; - -#else -/* this is what we return when queried. It has no bitwise correspondence - * the internal structures - */ -struct shmid_ds { - struct ipc_perm shm_perm; - size_t shm_segsz; - pid_t shm_lpid; - pid_t shm_cpid; - shmatt_t shm_nattch; - time_t shm_atime; - time_t shm_dtime; - time_t shm_ctime; -}; -#endif /* __INSIDE_CYGWIN__ */ - -void *shmat(int, const void *, int); -int shmctl(int, int, struct shmid_ds *); -int shmdt(const void *); -int shmget(key_t, size_t, int); - -#endif /* _SYS_SHM_H */ - -#ifdef __cplusplus -} -#endif diff --git a/winsup/cygwin/include/sys/socket.h b/winsup/cygwin/include/sys/socket.h index ca76419eb..3bda9f9bf 100644 --- a/winsup/cygwin/include/sys/socket.h +++ b/winsup/cygwin/include/sys/socket.h @@ -32,11 +32,14 @@ extern "C" int getpeername (int, struct sockaddr *__peer, int *); int getsockname (int, struct sockaddr *__addr, int *); int listen (int, int __n); - int recv (int, void *__buff, int __len, unsigned int __flags); - int recvfrom (int, char *__buff, int __len, int __flags, - struct sockaddr *__from, int *__fromlen); - int send (int, const void *__buff, int __len, unsigned int __flags); - int sendto (int, const void *, int, unsigned int, const struct sockaddr *, int); + int recv (int, void *__buff, int __len, int __flags); + int recvfrom (int, void *__buff, int __len, int __flags, + struct sockaddr *__from, int *__fromlen); + int recvmsg(int s, struct msghdr *msg, int flags); + int send (int, const void *__buff, int __len, int __flags); + int sendmsg(int s, const struct msghdr *msg, int flags); + int sendto (int, const void *, int __len, int __flags, + const struct sockaddr *__to, int __tolen); int setsockopt (int __s, int __level, int __optname, const void *optval, int __optlen); int getsockopt (int __s, int __level, int __optname, void *__optval, int *__optlen); int shutdown (int, int); diff --git a/winsup/cygwin/include/sys/soundcard.h b/winsup/cygwin/include/sys/soundcard.h index 1a40bff61..79341c547 100644 --- a/winsup/cygwin/include/sys/soundcard.h +++ b/winsup/cygwin/include/sys/soundcard.h @@ -53,10 +53,10 @@ #define SNDCARD_UART6850 8 #define SNDCARD_GUS16 9 #define SNDCARD_MSS 10 -#define SNDCARD_PSS 11 +#define SNDCARD_PSS 11 #define SNDCARD_SSCAPE 12 -#define SNDCARD_PSS_MPU 13 -#define SNDCARD_PSS_MSS 14 +#define SNDCARD_PSS_MPU 13 +#define SNDCARD_PSS_MSS 14 #define SNDCARD_SSCAPE_MSS 15 #define SNDCARD_TRXPRO 16 #define SNDCARD_TRXPRO_SB 17 @@ -112,7 +112,7 @@ #define _SIOW(x,y,t) ((int)(SIOC_IN|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y)) /* this should be _SIORW, but stdio got there first */ #define _SIOWR(x,y,t) ((int)(SIOC_INOUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y)) -#define _SIOC_SIZE(x) ((x>>16)&SIOCPARM_MASK) +#define _SIOC_SIZE(x) ((x>>16)&SIOCPARM_MASK) #define _SIOC_DIR(x) (x & 0xf0000000) #define _SIOC_NONE SIOC_VOID #define _SIOC_READ SIOC_OUT @@ -194,7 +194,7 @@ typedef struct seq_event_rec { * Gravis UltraSound. It tries to be universal format for uploading * sample based patches but is probably too limited. * - * (PBD) As Hannu guessed, the GUS structure is too limited for + * (PBD) As Hannu guessed, the GUS structure is too limited for * the WaveFront, but this is the right place for a constant definition. */ @@ -220,7 +220,7 @@ struct patch_info { #define WAVE_SUSTAIN_ON 0x20 /* bit 5 = Turn sustaining on. (Env. pts. 3)*/ #define WAVE_ENVELOPES 0x40 /* bit 6 = Enable envelopes - 1 */ #define WAVE_FAST_RELEASE 0x80 /* bit 7 = Shut off immediately after note off */ - /* (use the env_rate/env_offs fields). */ + /* (use the env_rate/env_offs fields). */ /* Linux specific bits */ #define WAVE_VIBRATO 0x00010000 /* The vibrato info is valid */ #define WAVE_TREMOLO 0x00020000 /* The tremolo info is valid */ @@ -234,7 +234,7 @@ struct patch_info { int len; /* Size of the wave data in bytes */ int loop_start, loop_end; /* Byte offsets from the beginning */ -/* +/* * The base_freq and base_note fields are used when computing the * playback speed for a note. The base_note defines the tone frequency * which is heard if the sample is played using the base_freq as the @@ -263,7 +263,7 @@ struct patch_info { unsigned char env_rate[ 6 ]; /* GUS HW ramping rate */ unsigned char env_offset[ 6 ]; /* 255 == 100% */ - /* + /* * The tremolo, vibrato and scale info are not supported yet. * Enable by setting the mode bits WAVE_TREMOLO, WAVE_VIBRATO or * WAVE_SCALE @@ -272,18 +272,18 @@ struct patch_info { unsigned char tremolo_sweep; unsigned char tremolo_rate; unsigned char tremolo_depth; - + unsigned char vibrato_sweep; unsigned char vibrato_rate; unsigned char vibrato_depth; int scale_frequency; unsigned int scale_factor; /* from 0 to 2048 or 0 to 2 */ - - int volume; + + int volume; int fractions; int reserved1; - int spare[2]; + int spare[2]; char data[1]; /* The waveform data starts here */ }; @@ -300,7 +300,7 @@ struct sysex_info { * /dev/sequencer input events. * * The data written to the /dev/sequencer is a stream of events. Events - * are records of 4 or 8 bytes. The first byte defines the size. + * are records of 4 or 8 bytes. The first byte defines the size. * Any number of events can be written with a write call. There * is a set of macros for sending these events. Use these macros if you * want to maximize portability of your program. @@ -408,7 +408,7 @@ struct sysex_info { #define CTRL_EXPRESSION 253 /* Obsolete */ #define CTRL_MAIN_VOLUME 252 /* Obsolete */ #define SEQ_BALANCE 11 -#define SEQ_VOLMODE 12 +#define SEQ_VOLMODE 12 /* * Volume mode decides how volumes are used @@ -433,13 +433,13 @@ struct sysex_info { * of the associated synthesizer device. There is no limit to the size * of the extended events. These events are not queued but executed * immediately when the write() is called (execution can take several - * seconds of time). + * seconds of time). * * When a SEQ_FULLSIZE message is written to the device, it must * be written using exactly one write() call. Other events cannot * be mixed to the same write. - * - * For FM synths (YM3812/OPL3) use struct sbi_instrument and write it to the + * + * For FM synths (YM3812/OPL3) use struct sbi_instrument and write it to the * /dev/sequencer. Don't write other data together with the instrument structure * Set the key field of the structure to FM_PATCH. The device field is used to * route the patch to the corresponding device. @@ -461,7 +461,7 @@ struct sbi_instrument { #define FM_PATCH _PATCHKEY(0x01) #define OPL3_PATCH _PATCHKEY(0x03) short device; /* Synth# (0-4) */ - int channel; /* Program# to be initialized */ + int channel; /* Program# to be initialized */ sbi_instr_data operators; /* Register settings for operator cells (.SBI format) */ }; @@ -480,13 +480,13 @@ struct synth_info { /* Read only */ #define SAMPLE_TYPE_BASIC 0x10 #define SAMPLE_TYPE_GUS SAMPLE_TYPE_BASIC -#define SAMPLE_TYPE_WAVEFRONT 0x11 +#define SAMPLE_TYPE_WAVEFRONT 0x11 int perc_mode; /* No longer supported */ int nr_voices; int nr_drums; /* Obsolete field */ int instr_bank_size; - unsigned int capabilities; + unsigned int capabilities; #define SYNTH_CAP_PERCMODE 0x00000001 /* No longer used */ #define SYNTH_CAP_OPL3 0x00000002 /* Set if OPL3 supported */ #define SYNTH_CAP_INPUT 0x00000004 /* Input (MIDI) device */ @@ -625,7 +625,7 @@ typedef struct buffmem_desc { /* * Application's profile defines the way how playback underrun situations should be handled. - * + * * APF_NORMAL (the default) and APF_NETWORK make the driver to cleanup the * playback buffer whenever an underrun occurs. This consumes some time * prevents looping the existing buffer. @@ -687,7 +687,7 @@ typedef struct copr_debug_buf { int command; /* Used internally. Set to 0 */ int parm1; int parm2; - int flags; + int flags; int len; /* Length of data in bytes */ } copr_debug_buf; @@ -696,7 +696,7 @@ typedef struct copr_msg { unsigned char data[4000]; } copr_msg; -#define SNDCTL_COPR_RESET _SIO ('C', 0) +#define SNDCTL_COPR_RESET _SIO ('C', 0) #define SNDCTL_COPR_LOAD _SIOWR('C', 1, copr_buffer) #define SNDCTL_COPR_RDATA _SIOWR('C', 2, copr_debug_buf) #define SNDCTL_COPR_RCODE _SIOWR('C', 3, copr_debug_buf) @@ -710,12 +710,12 @@ typedef struct copr_msg { /********************************************* * IOCTL commands for /dev/mixer */ - -/* + +/* * Mixer devices * * There can be up to 20 different analog mixer channels. The - * SOUND_MIXER_NRDEVICES gives the currently supported maximum. + * SOUND_MIXER_NRDEVICES gives the currently supported maximum. * The SOUND_MIXER_READ_DEVMASK returns a bitmask which tells * the devices supported by the particular mixer. */ @@ -735,7 +735,7 @@ typedef struct copr_msg { #define SOUND_MIXER_RECLEV 11 /* Recording level */ #define SOUND_MIXER_IGAIN 12 /* Input gain */ #define SOUND_MIXER_OGAIN 13 /* Output gain */ -/* +/* * The AD1848 codec and compatibles have three line level inputs * (line, aux1 and aux2). Since each card manufacturer have assigned * different meanings to these inputs, it's inpractical to assign @@ -940,7 +940,7 @@ typedef struct mixer_vol_table { #define SOUND_MIXER_GETLEVELS _SIOWR('M', 116, mixer_vol_table) #define SOUND_MIXER_SETLEVELS _SIOWR('M', 117, mixer_vol_table) -/* +/* * An ioctl for identifying the driver version. It will return value * of the SOUND_VERSION macro used when compiling the driver. * This call was introduced in OSS version 3.6 and it will not work @@ -954,7 +954,7 @@ typedef struct mixer_vol_table { /* * The 4 most significant bits of byte 0 specify the class of - * the event: + * the event: * * 0x8X = system level events, * 0x9X = device/port specific events, event[1] = device/port, @@ -1014,7 +1014,7 @@ typedef struct mixer_vol_table { */ #define LOCL_STARTAUDIO 1 -#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS) +#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS) /* * Some convenience macros to simplify programming of the * /dev/sequencer interface @@ -1087,16 +1087,16 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); /* * This variation of the sequencer macros is used just to format one event * using fixed buffer. - * + * * The program using the macro library must define the following macros before * using this library. * - * #define _seqbuf name of the buffer (unsigned char[]) + * #define _seqbuf name of the buffer (unsigned char[]) * #define _SEQ_ADVBUF(len) If the applic needs to know the exact * size of the event, this macro can be used. * Otherwise this must be defined as empty. * #define _seqbufptr Define the name of index variable or 0 if - * not required. + * not required. */ #define _SEQ_NEEDBUF(len) /* empty */ #endif @@ -1157,7 +1157,7 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); * sending any MIDI bytes but it's absolutely not possible. Trying to do * so _will_ cause problems with MPU401 intelligent mode). * - * Sysex messages are sent in blocks of 1 to 6 bytes. Longer messages must be + * Sysex messages are sent in blocks of 1 to 6 bytes. Longer messages must be * sent by calling SEQ_SYSEX() several times (there must be no other events * between them). First sysex fragment must have 0xf0 in the first byte * and the last byte (buf[len-1] of the last fragment must be 0xf7. No byte @@ -1225,11 +1225,11 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); */ #define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\ - _seqbuf[_seqbufptr+0] = EV_TIMING; \ - _seqbuf[_seqbufptr+1] = (ev); \ + _seqbuf[_seqbufptr+0] = EV_TIMING; \ + _seqbuf[_seqbufptr+1] = (ev); \ _seqbuf[_seqbufptr+2] = 0;\ _seqbuf[_seqbufptr+3] = 0;\ - *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \ + *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \ _SEQ_ADVBUF(8);} #define SEQ_START_TIMER() _TIMER_EVENT(TMR_START, 0) @@ -1247,16 +1247,16 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); */ #define _LOCAL_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\ - _seqbuf[_seqbufptr+0] = EV_SEQ_LOCAL; \ - _seqbuf[_seqbufptr+1] = (ev); \ + _seqbuf[_seqbufptr+0] = EV_SEQ_LOCAL; \ + _seqbuf[_seqbufptr+1] = (ev); \ _seqbuf[_seqbufptr+2] = 0;\ _seqbuf[_seqbufptr+3] = 0;\ - *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \ + *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \ _SEQ_ADVBUF(8);} #define SEQ_PLAYAUDIO(devmask) _LOCAL_EVENT(LOCL_STARTAUDIO, devmask) /* - * Events for the level 1 interface only + * Events for the level 1 interface only */ #define SEQ_MIDIOUT(device, byte) {_SEQ_NEEDBUF(4);\ diff --git a/winsup/cygwin/include/sys/statfs.h b/winsup/cygwin/include/sys/statfs.h new file mode 100644 index 000000000..51ad3c6b1 --- /dev/null +++ b/winsup/cygwin/include/sys/statfs.h @@ -0,0 +1,11 @@ +/* sys/statfs.h + + Copyright 2002 Red Hat, Inc. + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file "CYGWIN_LICENSE" for +details. */ + +#include <sys/vfs.h> diff --git a/winsup/cygwin/include/sys/strace.h b/winsup/cygwin/include/sys/strace.h index 87cc1d785..b43ab886f 100644 --- a/winsup/cygwin/include/sys/strace.h +++ b/winsup/cygwin/include/sys/strace.h @@ -43,7 +43,8 @@ public: int active; int lmicrosec; int execing; - strace() : version(1) {} + int inited; + void hello (); void prntf (unsigned, const char *func, const char *, ...) /*__attribute__ ((regparm(3)))*/; void vprntf (unsigned, const char *func, const char *, va_list ap) /*__attribute__ ((regparm(3)))*/; void wm (int message, int word, int lon) __attribute__ ((regparm(3))); @@ -77,6 +78,13 @@ extern strace strace; #define _STRACE_MALLOC 0x20000 // trace malloc calls #define _STRACE_THREAD 0x40000 // thread-locking calls #define _STRACE_NOTALL 0x80000 // don't include if _STRACE_ALL +#if defined (DEBUGGING) +# define _STRACE_ON strace.active = 1; +# define _STRACE_OFF strace.active = 0; +#else +# define _STRACE_ON +# define _STRACE_OFF +#endif #ifdef __cplusplus extern "C" { diff --git a/winsup/cygwin/include/sys/sysmacros.h b/winsup/cygwin/include/sys/sysmacros.h index cc3a69160..2c9c69923 100644 --- a/winsup/cygwin/include/sys/sysmacros.h +++ b/winsup/cygwin/include/sys/sysmacros.h @@ -11,8 +11,14 @@ details. */ #ifndef _SYS_SYSMACROS_H #define _SYS_SYSMACROS_H +#ifdef __CYGWIN_USE_BIG_TYPES__ +#define major(dev) ((int)(((dev) >> 16) & 0xffff)) +#define minor(dev) ((int)((dev) & 0xffff)) +#define makedev(major, minor) (((major) << 16) | ((minor) & 0xffff)) +#else #define major(dev) ((int)(((dev) >> 8) & 0xff)) #define minor(dev) ((int)((dev) & 0xff)) -#define makedev(major, minor) (((major) << 8) | (minor)) +#define makedev(major, minor) (((major) << 8) | ((minor) & 0xff)) +#endif #endif /* _SYS_SYSMACROS_H */ diff --git a/winsup/cygwin/include/sys/termios.h b/winsup/cygwin/include/sys/termios.h index a87f10627..20a84aa78 100644 --- a/winsup/cygwin/include/sys/termios.h +++ b/winsup/cygwin/include/sys/termios.h @@ -13,6 +13,26 @@ details. */ #ifndef _SYS_TERMIOS_H #define _SYS_TERMIOS_H +#define TIOCMGET 0x5415 +#define TIOCMSET 0x5418 +#define TIOCINQ 0x541B + +/* TIOCINQ is utilized instead of FIONREAD which has been +accupied for other purposes under CYGWIN. +Other UNIX ioctl requests has been omited because +effects of their work one can achive by standard +POSIX commands */ + + +#define TIOCM_DTR 0x002 +#define TIOCM_RTS 0x004 +#define TIOCM_CTS 0x020 +#define TIOCM_CAR 0x040 +#define TIOCM_RNG 0x080 +#define TIOCM_DSR 0x100 +#define TIOCM_CD TIOCM_CAR +#define TIOCM_RI TIOCM_RNG + #define TCOOFF 0 #define TCOON 1 #define TCIOFF 2 @@ -195,6 +215,14 @@ details. */ #define NCCS 18 +/* `c_cc' member of 'struct termios' structure can be disabled by + using the value _POSIX_VDISABLE. */ +#define _POSIX_VDISABLE '\0' + +/* Compare a character C to a value VAL from the `c_cc' array in a + `struct termios'. If VAL is _POSIX_VDISABLE, no character can match it. */ +#define CCEQ(val, c) ((c) == (val) && (val) != _POSIX_VDISABLE) + typedef unsigned char cc_t; typedef unsigned int tcflag_t; typedef unsigned int speed_t; diff --git a/winsup/cygwin/include/sys/uio.h b/winsup/cygwin/include/sys/uio.h index d355ac5b6..e28f14e7e 100644 --- a/winsup/cygwin/include/sys/uio.h +++ b/winsup/cygwin/include/sys/uio.h @@ -1,6 +1,6 @@ /* sys/uio.h - Copyright 1996, 2000, 2001 Red Hat, Inc. + Copyright 1996, 2000, 2001, 2002 Red Hat, Inc. This file is part of Cygwin. @@ -24,9 +24,10 @@ __BEGIN_DECLS * Define the uio buffers used for writev, readv. */ -struct iovec { - caddr_t iov_base; - int iov_len; +struct iovec +{ + void *iov_base; + size_t iov_len; }; extern ssize_t readv __P ((int filedes, const struct iovec *vector, int count)); diff --git a/winsup/cygwin/include/sys/un.h b/winsup/cygwin/include/sys/un.h index 25588e2b2..4e3eee82b 100644 --- a/winsup/cygwin/include/sys/un.h +++ b/winsup/cygwin/include/sys/un.h @@ -21,6 +21,6 @@ struct sockaddr_un { /* Evaluates the actual length of `sockaddr_un' structure. */ #define SUN_LEN(p) ((size_t)(((struct sockaddr_un *) NULL)->sun_path) \ - + strlen ((p)->sun_path)) + + strlen ((p)->sun_path)) #endif diff --git a/winsup/cygwin/include/sys/vfs.h b/winsup/cygwin/include/sys/vfs.h index f0f3eb96c..57b6f9232 100644 --- a/winsup/cygwin/include/sys/vfs.h +++ b/winsup/cygwin/include/sys/vfs.h @@ -12,7 +12,7 @@ details. */ #define _SYS_VFS_H_ struct statfs { - long f_type; /* type of filesystem (see below) */ + long f_type; /* type of filesystem */ long f_bsize; /* optimal transfer block size */ long f_blocks; /* total data blocks in file system */ long f_bfree; /* free blocks in fs */ |