home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / palmos / pippy-0.6beta-src.tar.gz / pippy-0.6beta-src.tar / pippy-0.6beta-src / src / Modules / kludge.h < prev    next >
C/C++ Source or Header  |  2000-12-27  |  1KB  |  40 lines

  1. #ifndef _KLUDGE_H_
  2. #define _KLUDGE_H_
  3.  
  4. /* Include this file before Python.h for extension modules requiring use of
  5.    the PalmOS network library.  The PalmOS headers for this purpose are poorly
  6.    designed and fixing them is a low priority of Palm's. */
  7.  
  8.  
  9. #define __string_h  /* causes unix_string.h be ignored */
  10. #include <PalmOS.h>
  11. #include <sys/types.h>
  12. #include <Core/System/MemoryMgr.h>
  13. #include <sys_time.h>
  14. #include <netdb.h>
  15. #include <netinet_in.h>
  16. #include <unix_fcntl.h>
  17.  
  18. /* trying a new methodology for including the crappy PalmOS includes */
  19. #define __UNIX_SYS_TYPES_H__
  20. typedef    NetFDSetType    fd_set;
  21. #define    FD_SETSIZE        netFDSetSize
  22.  
  23. #define    FD_SET(n,p)    netFDSet(n,p)
  24. #define    FD_CLR(n,p)    netFDClr(n,p)
  25. #define    FD_ISSET(n,p)    netFDIsSet(n,p)
  26. #define    FD_ZERO(p)      netFDZero(p)
  27. #define    bcopy(b1,b2,len)MemMove(b2,b1,len)
  28.  
  29. #define _STDLIB
  30. #define __stdarg_h  /* causes unix_stdarg.h be effectively ignored */
  31. #define __stdio_h  /* causes unix_stdio.h to be ignored */
  32. #include <sys_socket.h>
  33.  
  34. #undef isatty
  35. #undef abort
  36. #undef getenv
  37.  
  38. #include "Python.h"
  39. #endif /*_KLUDGE_H_*/
  40.