This is p-fcntl.h in view mode; [Download] [Up]
/*+++*
* RCS $Id: p-fcntl.h,v 1.3 1993/02/02 21:00:42 gerben Exp $
* title: p-fcntl.h
* abstract: portable Posix-compliant <fcntl.h>.
* author: T.R.Hageman, Groningen, The Netherlands
* created: September 1992
* modified: (see RCS Log at end)
* copyleft:
*
* Copyright (C) 1992 Tom R. Hageman.
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* description:
*
* This is a Posix-compatible version of <fcntl.h> for both Posix
* and non-Posix systems.
*
* Notes:
* o In order for this to work correctly, you should define
* _I_FCNTL appropriately in "portdefs.h"
* or, alternatively, define HAVE_FCNTL_H (Autoconfig compatibility).
*
* o The presence of a prototype here does not guarantee the existence
* of the corresponding function in the library.
*---*/
#ifndef _P_FCNTL_H_
#define _P_FCNTL_H_ 0x102
#ifndef _PORTDEFS_H_
# include "portdefs.h"
#endif
#if __STRICT_ANSI__
#error "You shouldn't use this header in strict ANSI C code"
#endif
#if _I_FCNTL
# ifndef _FCNTL_H_ /* interlock with "unistd.h" */
# include <fcntl.h>
# define _FCNTL_H_
# endif
#endif
#ifndef _P_TYPES_H_
# include "p-types.h"
#endif
#if !__POSIX__
#ifndef O_RDONLY
# if (__TOS__ && __TURBOC__ && (__TURBOC__ >> 8) <= 2)
# include <stdio.h> /* Atari ST Turbo C defines them here.
(ATTACK of the Deranged Mutant
Killer Monster SNOW GOONS }-) */
# endif
# define O_RDONLY 0
#endif
#ifndef O_WRONLY
# define O_WRONLY 1
#endif
#ifndef O_RDWR
# define O_RDWR 2
#endif
#ifndef O_ACCMODE
# define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
#endif
#ifndef O_NONBLOCK
# ifdef O_NDELAY
# define O_NONBLOCK O_NDELAY
# endif
#endif
#ifndef O_BINARY /* for the benefit of MS-DOS */
# define O_BINARY 0
#endif
#endif /* !__POSIX__ */
#if !_I_FCNTL
#if !__NO_PROTO__
#if (__TOS__ && __TURBOC__ && (__TURBOC__ >> 8) <= 2)
/* ...how braindead can you get! */
extern int creat __(( const char *_(path), ...));
#else
extern int creat __(( const char *_(path), mode_t _(mode) ));
#endif
#if 0
extern int fcntl __(( int _(fildes), int _(cmd) ___ ));
#endif /* this is too system-dependent. */
extern int open __(( const char *_(path), int _(oflag) ___ ));
#endif /* !__NO_PROTO__ */
#endif /* !_I_FCNTL */
#endif /* _P_FCNTL_H_ */
/*======================================================================*
* $Log: p-fcntl.h,v $
* Revision 1.3 1993/02/02 21:00:42 gerben
* *** empty log message ***
*
* Revision 1.2 1992/10/23 04:11:14 tom
* add __STRICT_ANSI__ check.
*
* Revision 1.1 1992/10/14 13:38:19 tom
* rename to "p-<header>".
*
* Revision 1.0 1992/10/07 15:48:56 tom
* Initial revision
*
*======================================================================*/
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.