home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / s / sunos4-0.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-04  |  3.1 KB  |  102 lines

  1. /* Synched up with: FSF 19.29. */
  2.  
  3. /* For building XEmacs under SunOS 4.1.* with static libraries. */
  4.  
  5. #ifndef _S_SUNOS4_H_
  6. #define _S_SUNOS4_H_
  7.  
  8. #include "bsd4-2.h"
  9.  
  10. #ifndef SUNOS4
  11. #define SUNOS4
  12. #endif
  13.  
  14. /* XEmacs addition: */
  15. #ifndef HAVE_SYS_TIME_H
  16. #define HAVE_SYS_TIME_H
  17. #endif
  18.  
  19. /* XEmacs addition */
  20. #undef HAVE_UNION_WAIT
  21.  
  22. #if 0  /* This may have been needed for an earlier version of Sun OS 4.
  23.       It seems to cause warnings in 4.0.3 and 4.1.  */
  24. #define O_NDELAY        FNDELAY /* Non-blocking I/O (4.2 style) */
  25. #endif
  26.  
  27. #ifdef THIS_IS_YMAKEFILE
  28.   /* The new sunOS unexec eliminates the need for a custom crt0.o, so we
  29.      can just let the compiler invoke the linker and don't have to guess
  30.      what options it might have passed it. */
  31. # define ORDINARY_LINK
  32. # define START_FILES
  33. # define LD_CMD $(CC)
  34. # ifndef LD_SWITCH_SYSTEM
  35. #  ifdef USE_GCC
  36. /* of course gcc has to take different args than the rest of the universe */
  37. #   define LD_SWITCH_SYSTEM -static
  38. #  else
  39. #   define LD_SWITCH_SYSTEM -Bstatic
  40. #  endif
  41. # endif
  42. # define UNEXEC unexsunos4.o
  43. #endif
  44.  
  45. #define RUN_TIME_REMAP
  46.  
  47. /* these don't matter, but we have to define something to keep
  48.    sysdep.c from introducing bogus symbols */
  49. #define TEXT_START 0
  50. #define DATA_START 0
  51.  
  52. /* XEmacs change -- Sun CC needs this to default to ANSI */
  53. #if __SUNPRO_C
  54. #define C_SWITCH_SYSTEM -Xa
  55. #endif
  56.  
  57. /* #### XEmacs: #define of SYSTEM_MALLOC removed.  Is this OK?  FSF says:
  58.  
  59.    In SunOS 4.1, a static function called by tzsetwall reportedly
  60.    clears the byte just past an eight byte region it mallocs, corrupting
  61.    GNU malloc's memory pool.  But Sun's malloc doesn't seem to mind. */
  62.  
  63. /* XEmacs: additions for proper prototyping. */
  64. #ifndef THIS_IS_YMAKEFILE
  65. #ifdef __STDC__
  66. /* Sun's headers are categorically losing.
  67.    Mly uses broken-sun.h to get the protos for this, but lcc provides all
  68.    of the prototypes for the ANSI routines.  So I'm just going to put the
  69.    protos of the non-ANSI routines that we use here (I guess that would
  70.    be things that are Posix but not ANSI?)  You're in a maze of twisty
  71.    little standards, all alike...
  72.  */
  73. /* Since lcc is not going to be heavily used anymore if it ever was, I'm
  74.    putting broken-sun.h back in. */
  75. #include "broken-sun.h"
  76. extern char *strdup ();
  77. extern char *ttyname (int);
  78. extern void tzsetwall (void);
  79. extern int getpagesize (void);
  80. #endif /* __STDC__ */
  81.  
  82. /* XEmacs addition */
  83. #define LOCALTIME_CACHE
  84.  
  85. # ifdef __GNUC__
  86.   /* XEmacs addition: */
  87.   /* gcc has the bug that it claims to conform the the ANSI C standard
  88.      (which is what setting __STDC__ to 1 means) but does not necessarily
  89.      provide all of the library routines which the standard requires of a
  90.      conforming compiler -- such as memmove.  The other Sun ANSI compilers
  91.      (Sun's acc and Lucid's lcc) do not have this bug. */
  92. #  define memmove(to, from, size) bcopy ((char *) (from), (char *) (to), (size))
  93. /* We must define mkdir with this arg prototype
  94.    to match GCC's fixed stat.h.  */
  95. #  define MKDIR_PROTOTYPE \
  96.   int mkdir (const char *dpath, unsigned short dmode)
  97. # endif /* __GNUC__ */
  98.  
  99. #endif /* !THIS_IS_YMAKEFILE */
  100.  
  101. #endif /* _S_SUNOS4_H_ */
  102.