home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / forut062.zip / ForUtil-0.62 / lib / sysdeps.h < prev   
C/C++ Source or Header  |  1996-08-28  |  3KB  |  119 lines

  1. /*****
  2. * sysdeps.h : public header file for system specific stuff
  3. *
  4. * This file Version    $Revision: 1.4 $
  5. *
  6. * Creation date:    Fri Aug  2 13:28:06 GMT+0100 1996
  7. * Last modification:     $Date: 1996/08/28 17:42:46 $
  8. * By:            $Author: koen $
  9. * Current State:    $State: Exp $
  10. *
  11. * Author:        koen
  12. * (C)Copyright 1995 Ripley Software Development
  13. * All Rights Reserved
  14. *****/
  15. /*****
  16. * $Source: /usr/local/rcs/ForUtil/lib/RCS/sysdeps.h,v $
  17. *****/
  18. /*****
  19. * ChangeLog 
  20. * $Log: sysdeps.h,v $
  21. * Revision 1.4  1996/08/28 17:42:46  koen
  22. * Added #ifndef HAVE_ATEXIT for systems that do not have the atexit() function
  23. *
  24. * Revision 1.3  1996/08/27 19:20:58  koen
  25. * msdos related changes
  26. *
  27. * Revision 1.2  1996/08/07 21:20:07  koen
  28. * MSDOS related changes: added _heaplen, _stklen and all far*alloc defines
  29. *
  30. * Revision 1.1  1996/08/02 14:52:15  koen
  31. * Initial Revision. Partly copied from forlibP.h
  32. *
  33. *****/ 
  34.  
  35. #ifndef _sysdeps_h_
  36. #define _sysdeps_h_
  37.  
  38. #ifndef __MSDOS__    /* non-msdos default values */
  39. # include <stdlib.h>
  40. # ifdef HAVE_UNISTD_H
  41. #  include <unistd.h>
  42. # endif /* HAVE_UNISTD_H */
  43. # include <sys/param.h>
  44. # define SLASH    '/'
  45. # define CHAR_SLASH    "/"
  46. # ifndef NAME_MAX
  47. #  define NAME_MAX    256
  48. # endif
  49. # ifndef PATH_MAX
  50. #  define PATH_MAX    1024
  51. # endif
  52. # ifndef MAXPATHLEN
  53. #  define MAXPATHLEN    1024
  54. # endif
  55. # define YYOUT_DEVICE "/dev/null"
  56. # define MALLOC  malloc
  57. # define CALLOC  calloc
  58. # define REALLOC realloc
  59.  
  60. #else         /* msdos/ms-windows default values */
  61.  
  62. # include <limits.h>
  63. # include <dir.h>
  64. # include <malloc.h>
  65. # include <dos.h>
  66. /* 
  67. * to prevent a stack overflow set heap and stack to 32kb each. 
  68. * IMPORTANT: this may only be defined ONCE.
  69. */
  70. # ifndef LIBRARY_OBJECT
  71. #ifndef _Windows
  72. extern unsigned int _heaplen = (unsigned)32768L;
  73. extern unsigned int _stklen = (unsigned)32768L;
  74. #endif
  75. # endif /* LIBRARY_OBJECT */
  76. # define SLASH '\\'
  77. # define CHAR_SLASH "\\"
  78. # ifndef NAME_MAX
  79. #  define NAME_MAX    13    /* +1 for terminating '\0' */
  80. # endif
  81. # ifndef PATH_MAX
  82. #  define PATH_MAX    128
  83. # endif
  84. # ifndef MAXPATHLEN
  85. #  define MAXPATHLEN 128
  86. # endif
  87. # define YYOUT_DEVICE "NUL"    /* NUL device of current directory */
  88. # define strcasecmp strcmpi
  89. # define SIGUSR1 SIGFPE
  90. # ifndef _Windows
  91. # define MALLOC  farmalloc
  92. # define CALLOC  farcalloc
  93. # define REALLOC farrealloc
  94. # define free farfree
  95. # else    /* Use regular functions for MS Windows */
  96. # define MALLOC malloc
  97. # define CALLOC calloc
  98. # define REALLOC realloc
  99. # endif /* _Windows */
  100. #endif  /* __MSDOS__ */
  101.  
  102. /* define inline to be empty if it isn't defined in autoconf.h */
  103. #ifndef inline
  104. #define inline
  105. #endif /* inline */
  106.  
  107. /* default return type from signal handlers if not defined in autoconf.h */
  108. #ifndef RETSIGTYPE
  109. #define RETSIGTYPE void
  110. #endif
  111.  
  112. /* Bad luck. Get a decent system. */
  113. #ifndef HAVE_ATEXIT
  114. #define atexit(arg)
  115. #endif
  116.  
  117. /* Don't add anything after this endif! */
  118. #endif /* _sysdeps_h_ */
  119.