home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / linux / backup / star-1.3.1.tar.gz / star-1.3.1.tar / star-1.3.1 / include / unixstd.h < prev    next >
C/C++ Source or Header  |  2001-02-20  |  2KB  |  86 lines

  1. /* @(#)unixstd.h    1.6 01/02/20 Copyright 1996 J. Schilling */
  2. /*
  3.  *    Definitions for unix system interface
  4.  *
  5.  *    Copyright (c) 1996 J. Schilling
  6.  */
  7. /*
  8.  * This program is free software; you can redistribute it and/or modify
  9.  * it under the terms of the GNU General Public License as published by
  10.  * the Free Software Foundation; either version 2, or (at your option)
  11.  * any later version.
  12.  *
  13.  * This program is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  * GNU General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU General Public License
  19.  * along with this program; see the file COPYING.  If not, write to
  20.  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23. #ifndef _UNIXSTD_H
  24. #define    _UNIXSTD_H
  25.  
  26. #ifndef    _MCONFIG_H
  27. #include <mconfig.h>
  28. #endif
  29.  
  30. #ifdef    HAVE_UNISTD_H
  31.  
  32. #ifndef    _INCL_SYS_TYPES_H
  33. #include <sys/types.h>
  34. #define    _INCL_SYS_TYPES_H
  35. #endif
  36. #include <unistd.h>
  37.  
  38. #ifndef    _SC_PAGESIZE
  39. #ifdef    _SC_PAGE_SIZE    /* HP/UX & OSF */
  40. #define    _SC_PAGESIZE    _SC_PAGE_SIZE
  41. #endif
  42. #endif
  43.  
  44. #else    /* HAVE_UNISTD_H */
  45.  
  46. /*
  47.  * unistd.h grants things like off_t to be typedef'd.
  48.  */
  49. #ifndef    _INCL_SYS_TYPES_H
  50. #include <sys/types.h>
  51. #define    _INCL_SYS_TYPES_H
  52. #endif
  53.  
  54. #endif    /* HAVE_UNISTD_H */
  55.  
  56. #ifndef    STDIN_FILENO
  57. #    ifdef    JOS
  58. #        include <jos_io.h>
  59. #    else
  60. #        define    STDIN_FILENO    0
  61. #        define    STDOUT_FILENO    1
  62. #        define    STDERR_FILENO    2
  63. #    endif
  64. #endif
  65.  
  66. #ifndef    R_OK
  67. /* Symbolic constants for the "access" routine: */
  68. #define    R_OK    4    /* Test for Read permission */
  69. #define    W_OK    2    /* Test for Write permission */
  70. #define    X_OK    1    /* Test for eXecute permission */
  71. #define    F_OK    0    /* Test for existence of File */
  72. #endif
  73.  
  74. /* Symbolic constants for the "lseek" routine: */
  75. #ifndef    SEEK_SET
  76. #define    SEEK_SET    0    /* Set file pointer to "offset" */
  77. #endif
  78. #ifndef    SEEK_CUR
  79. #define    SEEK_CUR    1    /* Set file pointer to current plus "offset" */
  80. #endif
  81. #ifndef    SEEK_END
  82. #define    SEEK_END    2    /* Set file pointer to EOF plus "offset" */
  83. #endif
  84.  
  85. #endif    /* _UNIXSTD_H */
  86.