Deleted Added
full compact
compat.c (2312) compat.c (8857)
1/* Copyright 1988,1990,1993,1994 by Paul Vixie
2 * All rights reserved
3 *
4 * Distribute freely, except: don't remove my name from the source or
5 * documentation (don't take credit for my work), mark your changes (don't
6 * get me blamed for your possible bugs), don't alter or remove this
7 * notice. May be sold if buildable source is provided to buyer. No
8 * warrantee of any kind, express or implied, is included with this
9 * software; use at your own risk, responsibility for damages (if any) to
10 * anyone resulting from the use of this software rests entirely with the
11 * user.
12 *
13 * Send bug reports, bug fixes, enhancements, requests, flames, etc., and
14 * I'll try to keep a version up to date. I can be reached as follows:
15 * Paul Vixie <paul@vix.com> uunet!decwrl!vixie!paul
16 */
17
18#if !defined(lint) && !defined(LINT)
1/* Copyright 1988,1990,1993,1994 by Paul Vixie
2 * All rights reserved
3 *
4 * Distribute freely, except: don't remove my name from the source or
5 * documentation (don't take credit for my work), mark your changes (don't
6 * get me blamed for your possible bugs), don't alter or remove this
7 * notice. May be sold if buildable source is provided to buyer. No
8 * warrantee of any kind, express or implied, is included with this
9 * software; use at your own risk, responsibility for damages (if any) to
10 * anyone resulting from the use of this software rests entirely with the
11 * user.
12 *
13 * Send bug reports, bug fixes, enhancements, requests, flames, etc., and
14 * I'll try to keep a version up to date. I can be reached as follows:
15 * Paul Vixie <paul@vix.com> uunet!decwrl!vixie!paul
16 */
17
18#if !defined(lint) && !defined(LINT)
19static char rcsid[] = "$Id: compat.c,v 1.6 1994/01/15 20:43:43 vixie Exp $";
19static char rcsid[] = "$Id: compat.c,v 1.1.1.1 1994/08/27 13:43:02 jkh Exp $";
20#endif
21
22/* vix 30dec93 [broke this out of misc.c - see RCS log for history]
23 * vix 15jan87 [added TIOCNOTTY, thanks csg@pyramid]
24 */
25
26
27#include "cron.h"

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

138#ifdef NEED_FLOCK
139/* The following flock() emulation snarfed intact *) from the HP-UX
140 * "BSD to HP-UX porting tricks" maintained by
141 * system@alchemy.chem.utoronto.ca (System Admin (Mike Peterson))
142 * from the version "last updated: 11-Jan-1993"
143 * Snarfage done by Jarkko Hietaniemi <Jarkko.Hietaniemi@hut.fi>
144 * *) well, almost, had to K&R the function entry, HPUX "cc"
145 * does not grok ANSI function prototypes */
20#endif
21
22/* vix 30dec93 [broke this out of misc.c - see RCS log for history]
23 * vix 15jan87 [added TIOCNOTTY, thanks csg@pyramid]
24 */
25
26
27#include "cron.h"

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

138#ifdef NEED_FLOCK
139/* The following flock() emulation snarfed intact *) from the HP-UX
140 * "BSD to HP-UX porting tricks" maintained by
141 * system@alchemy.chem.utoronto.ca (System Admin (Mike Peterson))
142 * from the version "last updated: 11-Jan-1993"
143 * Snarfage done by Jarkko Hietaniemi <Jarkko.Hietaniemi@hut.fi>
144 * *) well, almost, had to K&R the function entry, HPUX "cc"
145 * does not grok ANSI function prototypes */
146
146
147/*
148 * flock (fd, operation)
149 *
150 * This routine performs some file locking like the BSD 'flock'
151 * on the object described by the int file descriptor 'fd',
152 * which must already be open.
153 *
154 * The operations that are available are:

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

194 if (i == -1)
195 if ((errno == EAGAIN) || (errno == EACCES))
196 errno = EWOULDBLOCK;
197 break;
198
199 case LOCK_UN: /* unlock */
200 i = lockf (fd, F_ULOCK, 0);
201 break;
147/*
148 * flock (fd, operation)
149 *
150 * This routine performs some file locking like the BSD 'flock'
151 * on the object described by the int file descriptor 'fd',
152 * which must already be open.
153 *
154 * The operations that are available are:

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

194 if (i == -1)
195 if ((errno == EAGAIN) || (errno == EACCES))
196 errno = EWOULDBLOCK;
197 break;
198
199 case LOCK_UN: /* unlock */
200 i = lockf (fd, F_ULOCK, 0);
201 break;
202
202
203 default: /* can't decipher operation */
204 i = -1;
205 errno = EINVAL;
206 break;
207 }
203 default: /* can't decipher operation */
204 i = -1;
205 errno = EINVAL;
206 break;
207 }
208
208
209 return (i);
210}
211#endif /*NEED_FLOCK*/
212
213
214#ifdef NEED_SETENV
215int
216setenv(name, value, overwrite)

--- 17 unchanged lines hidden ---
209 return (i);
210}
211#endif /*NEED_FLOCK*/
212
213
214#ifdef NEED_SETENV
215int
216setenv(name, value, overwrite)

--- 17 unchanged lines hidden ---