This commit is contained in:
ceriel 1991-12-02 15:55:49 +00:00
parent 68bee1244d
commit 70ff99e4d0
2 changed files with 45 additions and 11 deletions

View file

@ -13,7 +13,7 @@ struct sgttyb {
char sg_ospeed; /* output speed (not used) */
char sg_erase; /* erase character */
char sg_kill; /* kill character */
#ifdef __USG
#if defined(__USG) && !defined(_XENIX)
int sg_flags; /* mode flags */
#else
short sg_flags; /* mode flags */
@ -46,7 +46,11 @@ struct tchars {
# define CR2 0020000
# define CR3 0030000
#if defined(__USG) && !defined(_XENIX)
#define XTABS 0000002 /* do tab expansion */
#else
#define XTABS 0006000 /* do tab expansion */
#endif
#define TBDELAY 0006000
# define TAB0 0000000
@ -68,8 +72,12 @@ struct tchars {
#define ECHO 0000010 /* echo input */
#define LCASE 0000004
#define CBREAK 0000002 /* enable cbreak mode */
#if defined(__BSD4_2) || defined(_XENIX)
#define TANDEM 0000001
/*#define COOKED 0000000 /* neither CBREAK nor RAW */
#else
#define HUPCL 0000001 /* unused ??? */
#endif
/*#define COOKED 0000000 /* neither CBREAK nor RAW */
#ifdef __BDS4_2
#define TIOCGETP (('t'<<8) | 8 | (6 << 16) | 0x40000000)

View file

@ -1,11 +1,11 @@
/* $Header$ */
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
/* $Header$ */
#ifndef _STAT_H
#define _STAT_H
#if !defined(_SYS_STAT_H)
#define _SYS_STAT_H
struct stat {
dev_t st_dev;
@ -17,15 +17,15 @@ struct stat {
dev_t st_rdev;
off_t st_size;
time_t st_atime;
#ifdef __BSD4_2
#if defined(__BSD4_2)
long st_spare1;
#endif
time_t st_mtime;
#ifdef __BSD4_2
#if defined(__BSD4_2)
long st_spare2;
#endif
time_t st_ctime;
#ifdef __BSD4_2
#if defined(__BSD4_2)
long st_spare3;
long st_blksize;
long st_blocks;
@ -38,8 +38,8 @@ struct stat {
#define S_IFCHR 0020000
#define S_IFBLK 0060000
#define S_IFREG 0100000
#ifndef __BSD4_2
#ifndef __USG
#if !defined(__BSD4_2)
#if !defined(__USG) && !defined(_POSIX_SOURCE)
#define S_IFMPC 0030000
#define S_IFMPB 0070000
#else
@ -56,4 +56,30 @@ struct stat {
#define S_IWRITE 0000200
#define S_IEXEC 0000100
#endif /* _STAT_H */
#if defined(__BSD4_2) || defined(_POSIX_SOURCE)
#define S_IRWXU 00700 /* owner: rwx------ */
#define S_IRUSR 00400 /* owner: r-------- */
#define S_IWUSR 00200 /* owner: -w------- */
#define S_IXUSR 00100 /* owner: --x------ */
#define S_IRWXG 00070 /* group: ---rwx--- */
#define S_IRGRP 00040 /* group: ---r----- */
#define S_IWGRP 00020 /* group: ----w---- */
#define S_IXGRP 00010 /* group: -----x--- */
#define S_IRWXO 00007 /* others: ------rwx */
#define S_IROTH 00004 /* others: ------r-- */
#define S_IWOTH 00002 /* others: -------w- */
#define S_IXOTH 00001 /* others: --------x */
#if defined(_POSIX_SOURCE)
/* The following macros test st_mode (from POSIX Sec. 5.6.1.1.) */
#define S_ISREG(m) ((m & S_IFMT) == S_IFREG) /* is a reg file */
#define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) /* is a directory */
#define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR) /* is a char spec */
#define S_ISBLK(m) ((m & S_IFMT) == S_IFBLK) /* is a block spec */
#define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO) /* is a pipe/FIFO */
#endif /* _POSIX_SOURCE */
#endif /* BSD4_2 || _POSIX_SOURCE */
#endif /* _SYS_STAT_H */