types.h 700 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef _TYPES_H
  2. #define _TYPES_H
  3. #ifdef HAVE_CONFIG_H
  4. # include "config.h"
  5. #endif
  6. /* For local console: */
  7. #define STDIN 0
  8. #define STDOUT 1
  9. #define STDERR 2
  10. /* It's used in so many places, let's put it here */
  11. typedef int (*Function) ();
  12. #if !HAVE_SOCKLEN_T
  13. typedef int socklen_t;
  14. #endif
  15. /* 32 bit type */
  16. #if (SIZEOF_INT == 4)
  17. typedef unsigned int u_32bit_t;
  18. #else
  19. # if (SIZEOF_LONG == 4)
  20. typedef unsigned long u_32bit_t;
  21. # else
  22. # include "cant/find/32bit/type"
  23. # endif
  24. #endif
  25. typedef unsigned short int u_16bit_t;
  26. typedef unsigned char u_8bit_t;
  27. /* IP type */
  28. typedef u_32bit_t IP;
  29. typedef u_32bit_t dword;
  30. #endif /* !_TYPES_H */