home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sunic!corax.udac.uu.se!woody.csd.uu.se!hb
- From: hb@woody.csd.uu.se (Henrik B}kman CSD)
- Newsgroups: alt.lucid-emacs.help
- Subject: more lemacs 19.3 on HPUX
- Date: 10 Sep 1992 17:30:35 GMT
- Organization: Uppsala University
- Lines: 138
- Distribution: world
- Message-ID: <18o0nrINNf43@corax.udac.uu.se>
- NNTP-Posting-Host: woody.csd.uu.se
-
- I have just made Lucid-emacs 19.3 on HPUX 8.07 for a couple of 730's.
- I had slite different problems than Danny! Well, such is life :-(
- Here is my story.
-
- 1. I do the following changes in 'src/config.h'
-
- 35c35
- < /* #define USE_GCC */
- ---
- > #define USE_GCC
- 43c43
- < #include "s/s-hpux8.h"
- ---
- > #include "s/s-sunos4.h"
- 50c50
- < #include "m/m-hp9000s800.h"
- ---
- > #include "m/m-sparc.h"
- 112,113c112
- < /* HB: 920910: hpux missing a lot of floating point functions. */
- < /* #define LISP_FLOAT_TYPE */
- ---
- > #define LISP_FLOAT_TYPE
- 187c186
- < #define LD_SWITCH_SITE -L/local/X11R5/lib -a archive
- ---
- > /* #define LD_SWITCH_SITE -L/x11r4/usr.`arch`/lib */
- 194c193
- < #define C_SWITCH_SITE -I/local/X11R5/include -Aa -D_HPUX_SOURCE
- ---
- > /* #define C_SWITCH_SITE -I/cadillacgnu/gcc-include -I/x11r4/usr/include */
-
- I am using the ordinary (?) 'cc' in ANSI-mode. To get ANSI make some
- changes to C_SWITCH_SITE. I am also using X11R5 (#16) from MIT. I don't
- know if the "super-switch" '_HPUX_SOURCE' is nesesary everywhere but I
- don't have the time to check it out. Also change 'LD_SWITCH_SITE' to
- use "static" loading.
-
- As Danny I had problems with missing floating-point functions and the
- easiest, I thing, way to get rid of the problems is to comment out
- 'LISP_FLOAT_TYPE'
-
- There is two files for hpux in src/s/ (s-hpux.h and s-hpux8.h).
- s-hpux8.h seems to be the new one to use, or...?
-
- 2. I do the following changes to 'src/s/s-hpux8.h'
-
- 211,213c211,212
- < /* HB: 920910: This will create inconsistens in <stdlib.h>! */
- < /* #define rand lrand48 */
- < /* #define srand srand48 */
- ---
- > #define rand lrand48
- > #define srand srand48
-
- If I redefines 'rand' and 'srand' I get inconsistensy errors in <stdlib.h>.
- Thats because <stdlib.h> declares BOTH 'rand' 'srand' AND 'lrand48' and 'srand48'
- but in an incompatible way! You see the problem?! Well I commented it out and
- did the following changes to 'src/sysdep.c'
-
- 2215,2227d2214
- < /* HB: 920910: We use lrand48() and srand48() on hpux. */
- < #if defined(__hpux)
- < long random ()
- < {
- < return (lrand48 ());
- < }
- <
- < void srandom (arg)
- < int arg;
- < {
- < srand48 ((long) arg);
- < }
- < #else /* __hpux */
- 2252c2239
- < #endif /* __hpux */
-
- I just make my "own" versions of 'random' and 'srandom' for hpux. This
- maybe isn't the way to do it but I think it's safer than the "patch" in
- 'src/s/s-hpux8.h'.
-
- You don't have to make this fix in 'src/sysdep.c' if you don't want
- because hpux also has 'rand' and 'lrand' but I think it's better to
- have the newer *rand48 functions.
-
- 3. I do the following changes in 'src/events.h'
-
- 219,220d218
- < /* HB: 920910: Cause trouble "redeclaration" in hpux. */
- < #if ! defined(__hpux)
- 222d219
- < #endif
-
- This takes away 'struct Lisp_Process;' which causes complains from the
- compiler. Why??? Well, it seems to work without it.
-
- 4. I do the following changes in 'src/environ.c'
-
- 129d128
- < /* HB: 920910: 'str' should be 'const' and not 'unsigned' in hpux. */
- 132,134d130
- < #if defined(__hpux)
- < register const char *str;
- < #else
- 136d131
- < #endif
-
- 'cc' complains about incompatible arguments in the definition of 'getenv'.
- The header-file in hpux want's 'str' to be of type 'const char *' instead
- of 'unsigned char *'. Maybe there is an slightly better fix for this than
- my way.
-
- 5. I do the following changes in 'src/lwlib/lwlib.c'
-
- 27,28d26
- < /* HB: 920910: hpux doesn't have <alloca.h>. */
- < #if ! defined(__hpux)
- 30d27
- < #endif
-
- This "comments out" '#include <alloca.h>'. I can't find it anywhere
- on my systems and it seems to work fine without it.
-
- This did it! Now lemacs builds nicely and it starts up ok. I haven't
- used it so much so there maybe is other errors but which program haven't
- got errors :-)
-
- Although I got the same problem as Danny with 'INVISIBLE_TERMINAL_KLUDGE'
- in 19.2 it doesn't shoved up in 19.3 for me!?!?
-
- Have a good time with lemacs out there. I will.
-
- --
- ----------------------------------------------------------------------
- Henrik Bakman Adress: Box 520 Tel: +46 18 181044
- System Manager 751 20 UPPSALA Fax: +46 18 521270
- Computing Science Dep. SWEDEN Email: hb@csd.uu.se
- Uppsala University
-