summaryrefslogtreecommitdiff
path: root/PACE/pace/fcntl.h
blob: 9e7060ba74f025318ef1c55f776c95e635260e63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* $Id$

 * ============================================================================
 *
 * = LIBRARY
 *    pace
 *
 * = FILENAME
 *    pace/fnctl.h
 *
 * = AUTHOR
 *    Luther Baker
 *
 * ============================================================================ */

#ifndef PACE_FCNTL_H
#define PACE_FCNTL_H

#include "pace/config/defines.h"

#if (PACE_HAS_POSIX)
# include "pace/posix/fcntl.h"
#elif (PACE_VXWORKS)
# include "pace/vxworks/fcntl.h"
#elif (PACE_WIN32)
# include "pace/win32/fcntl.h"
#endif

#if defined (PACE_HAS_CPLUSPLUS)
extern "C" {
#endif /* PACE_HAS_CPLUSPLUS */

  /**
     PACE's implementation of the POSIX function creat.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 5.3.2.
   */
  PACE_INLINE int pace_creat (const char * path, pace_mode_t mode);

  /**
     PACE's implementation of the POSIX function fcntl.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 6.5.2.
   */
  # define pace_fcntl(X) fcntl X
  /* int fcntl (int fildes, int cmd, *//* arg *//* ... );
   *
   * PLEASE PAY SPECIAL ATTENTION HERE!
   * This is a macro and requires an additional set of parenthesis
   * surrounding the arguments.
   */

  /**
     PACE's implementation of the POSIX function open.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 5.3.1.
   */
  # define pace_open(X) open X
  /* int open (const char *path, int oflag, *//* pace_mode_t mode *//* ... );
   *
   * PLEASE PAY SPECIAL ATTENTION HERE!
   * This is a macro and requires an additional set of parenthesis
   * surrounding the arguments.
   */

#if defined (PACE_HAS_INLINE)
#  if (PACE_HAS_POSIX)
#    include "pace/posix/fcntl.inl"
#  elif (PACE_VXWORKS)
#    include "pace/vxworks/fcntl.inl"
#  elif (PACE_WIN32)
#    include "pace/win32/fcntl.inl"
#  endif
#endif /* PACE_HAS_INLINE */

#endif /* PACE_FCNTL_H_INDIRECT */