unistd.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:2k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* unistd.h - unix standard library header file */
  2. /* Copyright 1984-1994 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 02h,20jul00,jgn  add POSIX version information + removed old style prototypes
  7. 02g,24sep01,jkf  added const to rmdir()
  8. 02f,19aug94,ism  added getcwd() prototypes (SPR #3536)
  9. 02e,12nov93,dvs  added prototype for ftruncate.
  10. 02d,08feb93,smb  changed int to size_t in protype for read() and write()
  11. 02c,22sep92,rrr  added support for c++
  12. 02b,18sep92,smb  added the rmdir prototype.
  13. 02a,04jul92,jcf  cleaned up.
  14. 01c,26may92,rrr  the tree shuffle
  15. 01b,05dec91,rrr  added SEEK_ macros (was in ioLib.h)
  16. 01a,19nov91,rrr  written.
  17. */
  18. #ifndef __INCunistdh
  19. #define __INCunistdh
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. #include "vxWorks.h"
  24. #ifndef SEEK_SET
  25. #define SEEK_SET           0       /* absolute offset, was L_SET */
  26. #define SEEK_CUR           1       /* relative to current offset, was L_INCR */
  27. #define SEEK_END           2       /* relative to end of file, was L_XTND */
  28. #endif
  29. /* POSIX defines */
  30. #ifndef _POSIX_VERSION
  31. #define _POSIX_VERSION 199506L
  32. #endif
  33. #ifndef _POSIX_C_SOURCE
  34. #define _POSIX_C_SOURCE 199506L
  35. #endif
  36. /* function declarations */
  37. #if defined(__STDC__) || defined(__cplusplus)
  38. extern STATUS  unlink (char *name);
  39. extern STATUS  close (int fd);
  40. extern int  read (int fd, char *buffer, size_t maxbytes);
  41. extern int  write (int fd, char *buffer, size_t nbytes);
  42. extern int  lseek (int fd, long offset, int whence);
  43. extern STATUS  chdir (char *pathname);
  44. extern STATUS  pause (void);
  45. extern BOOL  isatty (int fd);
  46. extern STATUS  rmdir (const char *dirName);
  47. extern char * getcwd (char *buffer, int size);
  48. extern int     ftruncate (int fildes, off_t length);
  49. extern unsigned int sleep (unsigned int);
  50. extern unsigned int alarm (unsigned int);
  51. #else /* __STDC__ */
  52. extern STATUS  unlink ();
  53. extern STATUS  close ();
  54. extern int  read ();
  55. extern int  write ();
  56. extern int  lseek ();
  57. extern STATUS  chdir ();
  58. extern STATUS  pause ();
  59. extern BOOL  isatty ();
  60. extern STATUS  rmdir ();
  61. extern char *getcwd();
  62. extern int     ftruncate ();
  63. #endif /* __STDC__ */
  64. #ifdef __cplusplus
  65. }
  66. #endif
  67. #endif /* __INCunistdh */