home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Online / Samba / source / amiga_rcs / fcntl.h < prev    next >
C/C++ Source or Header  |  2000-08-17  |  3KB  |  126 lines

  1. head    1.2;
  2. access;
  3. symbols
  4.     V1_15:1.2
  5.     V1_12:1.1
  6.     V1_11:1.1
  7.     V1_10:1.1
  8.     V1_9:1.1
  9.     V1_8:1.1
  10.     V1_7:1.1
  11.     V1_6:1.1
  12.     V1_5:1.1
  13.     V1_4:1.1
  14.     V1_3:1.1
  15.     V1_2:1.1
  16.     V1_1:1.1;
  17. locks
  18.     olsen:1.2; strict;
  19. comment    @ * @;
  20.  
  21.  
  22. 1.2
  23. date    2000.05.22.19.09.11;    author olsen;    state Exp;
  24. branches;
  25. next    1.1;
  26.  
  27. 1.1
  28. date    99.02.12.10.58.55;    author olsen;    state Exp;
  29. branches;
  30. next    ;
  31.  
  32.  
  33. desc
  34. @.
  35. @
  36.  
  37.  
  38. 1.2
  39. log
  40. @.
  41. @
  42. text
  43. @#ifndef _WRAPPER_FCNTL_H
  44. #define _WRAPPER_FCNTL_H 1
  45.  
  46. /*
  47.  * $Id: fcntl.h 1.1 1999/02/12 10:58:55 olsen Exp olsen $
  48.  *
  49.  * :ts=4
  50.  *
  51.  * AmigaOS wrapper routines for Samba 2.0.0, using the AmiTCP V4 API
  52.  * and the SAS/C V6.58 compiler.
  53.  *
  54.  * Copyright (C) 1999-2000 by Olaf `Olsen' Barthel <olsen@@sourcery.han.de>
  55.  *
  56.  * This program is free software; you can redistribute it and/or modify
  57.  * it under the terms of the GNU General Public License as published by
  58.  * the Free Software Foundation; either version 2 of the License, or
  59.  * (at your option) any later version.
  60.  * 
  61.  * This program is distributed in the hope that it will be useful,
  62.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  63.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  64.  * GNU General Public License for more details.
  65.  * 
  66.  * You should have received a copy of the GNU General Public License
  67.  * along with this program; if not, write to the Free Software
  68.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  69.  */
  70.  
  71. /****************************************************************************/
  72.  
  73. #include "include:fcntl.h"
  74.  
  75. /* We are going to replace these few. */
  76. #undef creat
  77. #undef lseek
  78. #undef open
  79. #undef read
  80. #undef write
  81. #undef close
  82.  
  83. /****************************************************************************/
  84.  
  85. #include <sys/types.h>
  86.  
  87. /* Advisory file segment locking data type -
  88.  * information passed to system by user
  89.  */
  90. struct flock
  91. {
  92.     short    l_type;        /* lock type: read/write, etc. */
  93.     short    l_whence;    /* type of l_start */
  94.     off_t    l_start;    /* starting offset */
  95.     off_t    l_len;        /* len = 0 means until end of file */
  96.     pid_t    l_pid;        /* lock owner */
  97. };
  98.  
  99. #define F_GETLK        100    /* get record locking information */
  100. #define F_SETLK        101    /* set record locking information */
  101. #define F_SETLKW    102    /* F_SETLK; wait if blocked */
  102.  
  103. #define F_RDLCK        1    /* shared or read lock */
  104. #define F_UNLCK        2    /* unlock */
  105. #define F_WRLCK        3    /* exclusive or write lock */
  106.  
  107. /****************************************************************************/
  108.  
  109. #define O_NONBLOCK    4    /* no delay */
  110.  
  111. /****************************************************************************/
  112.  
  113. #endif /* _WRAPPER_FCNTL_H */
  114. @
  115.  
  116.  
  117. 1.1
  118. log
  119. @.
  120. @
  121. text
  122. @d12 1
  123. a12 1
  124.  * Copyright (C) 1999 by Olaf `Olsen' Barthel <olsen@@sourcery.han.de>
  125. @
  126.