home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / armlinux / alpha / PARTITIONS / USR_GZ / usr / include / bsd / bsd.h next >
Encoding:
C/C++ Source or Header  |  1995-05-14  |  980 b   |  48 lines

  1. /* bsd.h - simplify porting BSD programs to Linux - rick sladkey */
  2.  
  3. /* make sure BSD features are enabled, i.e. __USE_BSD and _FAVOR_BSD */
  4.  
  5. /* cpp in gcc 2.3.3 is broken.
  6. #ifndef _BSD_BSD_H
  7. #define _BSD_BSD_H
  8. */
  9.  
  10. #define _BSD_SOURCE
  11. #include <features.h>
  12. #include <endian.h>
  13.  
  14. /* some BSD progs expect MIN and MAX to be defined */
  15.  
  16. #define MIN(a, b)    ((a) < (b) ? (a) : (b))
  17. #define MAX(a, b)    ((a) > (b) ? (a) : (b))
  18.  
  19. /* make sure we get L_SET and L_INCR, which is in a different place */
  20.  
  21. #include <sys/file.h>
  22.  
  23. /* BSD has slight non-POSIX names (and meanings :-) for some things */
  24.  
  25. #define FAPPEND        O_APPEND 
  26.  
  27. /* ftp uses this, I don't remember exactly what is is for :-) */
  28.  
  29. #define NCARGS        1024
  30.  
  31. /* ftpd uses this as bits per byte, I don't know why it's called NBBY */
  32.  
  33. #define NBBY        8
  34.  
  35. /* gloss over slight differences between BSD direct and POSIX dirent */
  36.   
  37. #define d_namlen    d_reclen
  38.  
  39. #if 0
  40.  
  41. /* See <bsd/signal.h> */
  42.  
  43. typedef void    sig_t;
  44.  
  45. #endif
  46.  
  47. /* #endif _BSD_BSD_H */
  48.