From: "Peter O'Gorman" <pogma@thewrittenword.com>
To: 6811@debbugs.gnu.org
Subject: bug#6811: [PATCH] emacs-23.2 on hpux
Date: Fri, 6 Aug 2010 11:16:27 -0500 [thread overview]
Message-ID: <20100806161627.GM7715@tw.local> (raw)
[-- Attachment #1: Type: text/plain, Size: 850 bytes --]
Hi,
Attached is a patch that allows us to build emacs-23.2 on our HP-UX
systems (10.20, 11.00 and 11.11 PA-RISC and 11.23, 11.31 both PA and
IA64).
Older hpux systems do not have setegid(), so I instead #defined it using
setregid. I must admit to being a little worried about this, simply
because the setegid() usage was introduced to fix a security flaw.
ORDINARY_LINK works. All of our hpux systems have termios.
We had problems both on HPUX and AIX crashing running temacs during the
build with a memory fault, turns out to be due to the fact that
DATA_SEG_BITS was not being added back in. This may not be the best fix
for the problem, but works for us.
Other notes:
Please restore the OSF/1 files etc. we still build on an OSF/1 system.
We also build on solaris 6, please don't remove it.
Peter
--
Peter O'Gorman
pogma@thewrittenword.com
[-- Attachment #2: emacs_23_2_hpux.patch --]
[-- Type: text/plain, Size: 3080 bytes --]
Index: configure.in
===================================================================
--- configure.in.orig 2010-08-02 22:49:24.298009472 +0000
+++ configure.in 2010-08-06 16:01:20.204304769 +0000
@@ -504,6 +504,10 @@
CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
;;
+ ia64*-hp-hpux1[1-9]* )
+ machine=hp800 opsys=hpux11
+ ;;
+
hppa*-*-linux-gnu* )
machine=hp800 opsys=gnu-linux
;;
@@ -2333,7 +2337,7 @@
sendto recvfrom getsockopt setsockopt getsockname getpeername \
gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
-cfmakeraw cfsetspeed)
+setregid setegid cfmakeraw cfsetspeed)
AC_CHECK_HEADERS(sys/un.h)
Index: src/s/hpux10-20.h
===================================================================
--- src/s/hpux10-20.h.orig 2010-08-02 22:49:24.309919775 +0000
+++ src/s/hpux10-20.h 2010-08-06 15:37:50.432830578 +0000
@@ -31,6 +31,8 @@
#define HPUX
+#define ORDINARY_LINK
+
/* SYSTEM_TYPE should indicate the kind of system you are using.
It sets the Lisp variable system-type. */
@@ -46,7 +48,8 @@
* for terminal control.
*/
-#define HAVE_TERMIO
+#define NO_TERMIO
+#define HAVE_TERMIOS
/*
* Define HAVE_PTYS if the system supports pty devices.
@@ -116,7 +119,9 @@
#define NO_EDITRES
/* Tested in getloadavg.c. */
+#ifndef HAVE_PSTAT_GETDYNAMIC
#define HAVE_PSTAT_GETDYNAMIC
+#endif
/* Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
has a broken `rint' in some library versions including math library
Index: src/s/hpux11.h
===================================================================
--- src/s/hpux11.h.orig 2010-08-02 22:49:24.302598951 +0000
+++ src/s/hpux11.h 2010-08-03 04:21:16.274466073 +0000
@@ -12,5 +12,9 @@
then close and reopen it in the child. */
#define USG_SUBTTY_WORKS
+#if __ia64
+#define CANNOT_DUMP 1
+#endif
+
/* arch-tag: f5a3d780-82cd-4a9a-832e-a4031aab788b
(do not change this comment) */
Index: lib-src/movemail.c
===================================================================
--- lib-src/movemail.c.orig 2010-08-06 15:44:45.000000000 +0000
+++ lib-src/movemail.c 2010-08-06 15:46:51.732281428 +0000
@@ -151,6 +151,14 @@
extern char *rindex __P((const char *, int));
#endif
+#ifndef HAVE_SETEGID
+# ifdef HAVE_SETREGID
+# define setegid(x) setregid(-1,x)
+# else
+# error This system has neither setegid nor setregid
+# endif
+#endif
+
void fatal ();
void error ();
void pfatal_with_name ();
Index: src/lisp.h
===================================================================
--- src/lisp.h.orig 2010-08-06 15:41:41.000000000 +0000
+++ src/lisp.h 2010-08-06 15:41:54.344492292 +0000
@@ -431,9 +431,12 @@
#define XSET(var, type, ptr) \
((var) = ((EMACS_INT)(type) << VALBITS) + ((EMACS_INT) (ptr) & VALMASK))
+#ifdef DATA_SEG_BITS
+#define XPNTR(a) ((EMACS_UINT) (((a) & VALMASK) | DATA_SEG_BITS))
+#else
#define XPNTR(a) ((EMACS_UINT) ((a) & VALMASK))
-
+#endif
#endif /* not USE_LSB_TAG */
#else /* USE_LISP_UNION_TYPE */
next reply other threads:[~2010-08-06 16:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-06 16:16 Peter O'Gorman [this message]
2010-08-09 9:47 ` bug#6811: [PATCH] emacs-23.2 on hpux Dan Nicolaescu
2010-08-09 11:05 ` Jan Djärv
2010-08-09 16:22 ` Dan Nicolaescu
2010-08-09 20:42 ` Dan Nicolaescu
2010-08-10 14:14 ` Jan Djärv
2010-08-09 19:37 ` Andreas Schwab
2010-08-09 20:42 ` Peter O'Gorman
2010-08-09 23:13 ` Dan Nicolaescu
2010-08-10 9:08 ` Stefan Monnier
2010-08-10 10:04 ` Andreas Schwab
2010-08-10 12:33 ` Stefan Monnier
2011-01-23 23:03 ` Chong Yidong
2011-01-24 14:00 ` bug#6811: " Andy Moreton
2011-01-28 17:05 ` Chong Yidong
2019-09-06 0:42 ` Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100806161627.GM7715@tw.local \
--to=pogma@thewrittenword.com \
--cc=6811@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.