Deleted Added
full compact
os-solaris2.h (17683) os-solaris2.h (26175)
1/*
2 * Copyright (c) 1993, 1994, 1995, 1996
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and

--- 4 unchanged lines hidden (view full) ---

13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 * the University nor the names of its contributors may be used to endorse
15 * or promote products derived from this software without specific prior
16 * written permission.
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 *
1/*
2 * Copyright (c) 1993, 1994, 1995, 1996
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and

--- 4 unchanged lines hidden (view full) ---

13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 * the University nor the names of its contributors may be used to endorse
15 * or promote products derived from this software without specific prior
16 * written permission.
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 * @(#) $Header: os-solaris2.h,v 1.16 96/07/05 22:11:23 leres Exp $ (LBL)
21 * @(#) $Header: os-solaris2.h,v 1.17 96/11/29 15:17:49 leres Exp $ (LBL)
22 */
23
22 */
23
24/* Signal routines are this type */
25#define SIGRET void
26/* Signal routines use "return SIGRETVAL;" */
27#define SIGRETVAL
28/* The wait() status variable is this type */
29#define WAITSTATUS int
30
31#define major(x) ((int)(((unsigned)(x)>>8)&0377))
32#define minor(x) ((int)((x)&0377))
33
34/* Prototypes missing in SunOS 5 */
35int daemon(int, int);
36int dn_expand(u_char *, u_char *, u_char *, u_char *, int);
37int dn_skipname(u_char *, u_char *);
24/* Prototypes missing in SunOS 5 */
25int daemon(int, int);
26int dn_expand(u_char *, u_char *, u_char *, u_char *, int);
27int dn_skipname(u_char *, u_char *);
28int flock(int, int);
38int getdtablesize(void);
39int gethostname(char *, int);
29int getdtablesize(void);
30int gethostname(char *, int);
31int getpagesize(void);
40char *getusershell(void);
41char *getwd(char *);
42int iruserok(u_int, int, char *, char *);
43#ifdef __STDC__
44struct utmp;
45void login(struct utmp *);
46#endif
47int logout(const char *);

--- 7 unchanged lines hidden (view full) ---

55char *strerror(int);
56int snprintf(char *, size_t, const char *, ...);
57int strcasecmp(const char *, const char *);
58void unsetenv(const char *);
59#ifdef __STDC__
60struct timeval;
61#endif
62int utimes(const char *, struct timeval *);
32char *getusershell(void);
33char *getwd(char *);
34int iruserok(u_int, int, char *, char *);
35#ifdef __STDC__
36struct utmp;
37void login(struct utmp *);
38#endif
39int logout(const char *);

--- 7 unchanged lines hidden (view full) ---

47char *strerror(int);
48int snprintf(char *, size_t, const char *, ...);
49int strcasecmp(const char *, const char *);
50void unsetenv(const char *);
51#ifdef __STDC__
52struct timeval;
53#endif
54int utimes(const char *, struct timeval *);
63
64/* Solaris signal compat */
65#ifndef sigmask
66#define sigmask(m) (1 << ((m)-1))
67#endif
68#ifndef signal
69#define signal(s, f) sigset(s, f)
70#endif
71
72/* Solaris random compat */
73#ifndef srandom
74#define srandom(seed) srand48((long)seed)
75#endif
76#ifndef random
77#define random() lrand48()
78#endif
79
80#ifndef CBREAK
81#define CBREAK O_CBREAK
82#define CRMOD O_CRMOD
83#define RAW O_RAW
84#define TBDELAY O_TBDELAY
85#endif
86
87#ifndef TIOCPKT_DATA
88#define TIOCPKT_DATA 0x00 /* data packet */
89#define TIOCPKT_FLUSHREAD 0x01 /* flush packet */
90#define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */
91#define TIOCPKT_STOP 0x04 /* stop output */
92#define TIOCPKT_START 0x08 /* start output */
93#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */
94#define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */
95#define TIOCPKT_IOCTL 0x40 /* state change of pty driver */
96#endif
97
98#ifndef STDERR_FILENO
99#define STDERR_FILENO 2
100#define STDOUT_FILENO 1
101#define STDIN_FILENO 0
102#endif
103
104#ifndef FD_SET
105#define FD_SET(n, p) ((p)->fds_bits[0] |= (1<<(n)))
106#define FD_CLR(n, p) ((p)->fds_bits[0] &= ~(1<<(n)))
107#define FD_ISSET(n, p) ((p)->fds_bits[0] & (1<<(n)))
108#define FD_ZERO(p) ((p)->fds_bits[0] = 0)
109#endif
110
111#ifndef S_ISTXT
112#define S_ISTXT S_ISVTX
113#endif