home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / alt / lucidem / help / 397 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  4.5 KB

  1. Path: sparky!uunet!mcsun!sunic!corax.udac.uu.se!woody.csd.uu.se!hb
  2. From: hb@woody.csd.uu.se (Henrik B}kman  CSD)
  3. Newsgroups: alt.lucid-emacs.help
  4. Subject: more lemacs 19.3 on HPUX
  5. Date: 10 Sep 1992 17:30:35 GMT
  6. Organization: Uppsala University
  7. Lines: 138
  8. Distribution: world
  9. Message-ID: <18o0nrINNf43@corax.udac.uu.se>
  10. NNTP-Posting-Host: woody.csd.uu.se
  11.  
  12. I have just made Lucid-emacs 19.3 on HPUX 8.07 for a couple of 730's.
  13. I had slite different problems than Danny! Well, such is life :-(
  14. Here is my story.
  15.  
  16. 1. I do the following changes in 'src/config.h'
  17.  
  18.     35c35
  19.     < /* #define USE_GCC */
  20.     ---
  21.     > #define USE_GCC
  22.     43c43
  23.     < #include "s/s-hpux8.h"
  24.     ---
  25.     > #include "s/s-sunos4.h"
  26.     50c50
  27.     < #include "m/m-hp9000s800.h"
  28.     ---
  29.     > #include "m/m-sparc.h"
  30.     112,113c112
  31.     < /* HB: 920910: hpux missing a lot of floating point functions. */
  32.     < /* #define LISP_FLOAT_TYPE */
  33.     ---
  34.     > #define LISP_FLOAT_TYPE
  35.     187c186
  36.     < #define LD_SWITCH_SITE -L/local/X11R5/lib -a archive
  37.     ---
  38.     > /* #define LD_SWITCH_SITE -L/x11r4/usr.`arch`/lib */
  39.     194c193
  40.     < #define C_SWITCH_SITE -I/local/X11R5/include -Aa -D_HPUX_SOURCE
  41.     ---
  42.     > /* #define C_SWITCH_SITE -I/cadillacgnu/gcc-include -I/x11r4/usr/include */
  43.  
  44. I am using the ordinary (?) 'cc' in ANSI-mode. To get ANSI make some
  45. changes to C_SWITCH_SITE. I am also using X11R5 (#16) from MIT. I don't
  46. know if the "super-switch" '_HPUX_SOURCE' is nesesary everywhere but I
  47. don't have the time to check it out. Also change 'LD_SWITCH_SITE' to
  48. use "static" loading.
  49.  
  50. As Danny I had problems with missing floating-point functions and the
  51. easiest, I thing, way to get rid of the problems is to comment out
  52. 'LISP_FLOAT_TYPE'
  53.  
  54. There is two files for hpux in src/s/ (s-hpux.h and s-hpux8.h).
  55. s-hpux8.h seems to be the new one to use, or...?
  56.  
  57. 2. I do the following changes to 'src/s/s-hpux8.h'
  58.  
  59.     211,213c211,212
  60.     < /* HB: 920910: This will create inconsistens in <stdlib.h>! */
  61.     < /* #define rand lrand48 */
  62.     < /* #define srand srand48 */
  63.     ---
  64.     > #define rand lrand48
  65.     > #define srand srand48
  66.  
  67. If I redefines 'rand' and 'srand' I get inconsistensy errors in <stdlib.h>.
  68. Thats because <stdlib.h> declares BOTH 'rand' 'srand' AND 'lrand48' and 'srand48'
  69. but in an incompatible way! You see the problem?! Well I commented it out and
  70. did the following changes to 'src/sysdep.c'
  71.  
  72.     2215,2227d2214
  73.     < /* HB: 920910: We use lrand48() and srand48() on hpux. */
  74.     < #if defined(__hpux)
  75.     < long random ()
  76.     < {
  77.     <   return (lrand48 ());
  78.     < }
  79.     <
  80.     < void srandom (arg)
  81.     <      int arg;
  82.     < {
  83.     <   srand48 ((long) arg);
  84.     < }
  85.     < #else /* __hpux */
  86.     2252c2239
  87.     < #endif /* __hpux */
  88.  
  89. I just make my "own" versions of 'random' and 'srandom' for hpux. This
  90. maybe isn't the way to do it but I think it's safer than the "patch" in
  91. 'src/s/s-hpux8.h'.
  92.  
  93. You don't have to make this fix in 'src/sysdep.c' if you don't want
  94. because hpux also has 'rand' and 'lrand' but I think it's better to
  95. have the newer *rand48 functions.
  96.  
  97. 3. I do the following changes in 'src/events.h'
  98.  
  99.     219,220d218
  100.     < /* HB: 920910: Cause trouble "redeclaration" in hpux. */
  101.     < #if ! defined(__hpux)
  102.     222d219
  103.     < #endif
  104.  
  105. This takes away 'struct Lisp_Process;' which causes complains from the
  106. compiler. Why??? Well, it seems to work without it.
  107.  
  108. 4. I do the following changes in 'src/environ.c'
  109.  
  110.     129d128
  111.     < /* HB: 920910: 'str' should be 'const' and not 'unsigned' in hpux. */
  112.     132,134d130
  113.     < #if defined(__hpux)
  114.     <      register const char *str;
  115.     < #else
  116.     136d131
  117.     < #endif
  118.  
  119. 'cc' complains about incompatible arguments in the definition of 'getenv'.
  120. The header-file in hpux want's 'str' to be of type 'const char *' instead
  121. of 'unsigned char *'. Maybe there is an slightly better fix for this than
  122. my way.
  123.  
  124. 5. I do the following changes in 'src/lwlib/lwlib.c'
  125.  
  126.     27,28d26
  127.     < /* HB: 920910: hpux doesn't have <alloca.h>. */
  128.     < #if ! defined(__hpux)
  129.     30d27
  130.     < #endif
  131.  
  132. This "comments out" '#include <alloca.h>'. I can't find it anywhere
  133. on my systems and it seems to work fine without it.
  134.  
  135. This did it! Now lemacs builds nicely and it starts up ok. I haven't
  136. used it so much so there maybe is other errors but which program haven't
  137. got errors :-)
  138.  
  139. Although I got the same problem as Danny with 'INVISIBLE_TERMINAL_KLUDGE'
  140. in 19.2 it doesn't shoved up in 19.3 for me!?!?
  141.  
  142. Have a good time with lemacs out there. I will.
  143.  
  144. -- 
  145. ----------------------------------------------------------------------
  146. Henrik Bakman           Adress: Box 520          Tel: +46 18 181044
  147. System Manager                  751 20 UPPSALA   Fax: +46 18 521270
  148. Computing Science Dep.          SWEDEN           Email: hb@csd.uu.se
  149. Uppsala University
  150.