Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Linux/AXP signum.h
@ 1998-09-21 17:35 Dan Morrill
  1998-09-21 19:17 ` Michal Jaegermann
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Morrill @ 1998-09-21 17:35 UTC (permalink / raw)
  To: axp-list

The other day, I attempted to build the OpenLDAP package
on my Red Hat 5.1 box.  OpenLDAP has threading support, and
the threading library it uses snarfs SIGUSR1 and SIGUSR2.
OpenLDAP itself, however, also requires the availability of two
signals.

OpenLDAP has an #ifdef LINUX around the points where it uses
these signals;  however, it uses SIGSTKFLT and SIGUNUSED,
which are present on Linux/Intel but not on Linux/Alpha.

In other words, the authors of OpenLDAP have assumed that
all Linuxes have the same signum.h, whatever platform they're
running on.  The Alpha signum.h says:

/*
 * Linux/AXP has different signal numbers that Linux/i386: I'm trying
 * to make it OSF/1 binary compatible, at least for normal binaries.
 */

While this is a laudable goal, I suppose, it bothers me that this
was done in this particular way:  why does Linux/Alpha try to be
compatible with OSF/1 at the expense of compatibility with Linux?  

At any rate, what is the feasibility of extending the number of
signals to include all the Linux/Intel signals?  (Or at least
all the signals that make sense on the Alpha architecture.)

Granted, this is obscure and pretty arcane, but I think it would
be a good idea to make sure, as much as possible, that when
Joe Programmer says "#ifdef LINUX" it's compatible with ALL
Linuxes.

Dan Morrill
Computer Scientist
GE Corporate R&D, K1 5C36
(518) 387 - 6761


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re:  Linux/AXP signum.h
@ 1998-09-21 17:41 A van Kessel
  1998-09-21 17:58 ` Dan Morrill
  0 siblings, 1 reply; 5+ messages in thread
From: A van Kessel @ 1998-09-21 17:41 UTC (permalink / raw)
  To: axp-list

The #defines exist to hide the magic constants behind symbolic names.
Once compiled the symbolic names disappear. That is no big deal:
once compiled (for a specific platform) the exact values are correct
*for that platform* . In most cases the binary can only be run on that
platform. The binary compatibility OSF<-->linux on the alpha is more
important than the binaray compatibility (x86 <--> alpha) which is non-
existant.
So what's the probleb ?
AvK


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Linux/AXP signum.h
  1998-09-21 17:41 A van Kessel
@ 1998-09-21 17:58 ` Dan Morrill
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Morrill @ 1998-09-21 17:58 UTC (permalink / raw)
  To: axp-list

A van Kessel wrote:
> The #defines exist to hide the magic constants behind symbolic names.
> Once compiled the symbolic names disappear. That is no big deal:
> once compiled (for a specific platform) the exact values are correct
> *for that platform* .

Right, and in this case the idea is that the resulting binaries are
compatible with both Linux and OSF/1 without having to munge OSF/1
binaries to the Linux format.  I agree that this is a good idea.

I'm not concerned that Linux/Alpha attempts to be OSF/1 compatible,
I'm concerned that Linux/Intel has signals that Linux/Alpha does not.
As things currently stand, Joe Programmer not only has to do an
#ifdef LINUX but also an #ifdef ALPHA;  that is this particular anomaly
is requiring developers to not only specifically handle Linux, but to
specifically handle Linux/Alpha, and Linux/Intel, and maybe Linux/SPARC,
etc.  Yeah, the #defines give you the right numbers *for the platform*,
but if the signal isn't even present in signum.h, you can't get a
platform-specific number for it.

Perhaps I misrepresented myself a bit;  I'm by no means saying that
OSF/1 compatibility is bad.  I'm just saying that IMHO it's worth
considering working toward signal compatibility with Linux/Intel,
since that's where the biggest things are happening.  Especially since
this particular issue can probably be solved very easily by increasing
_NSIG and adding in the missing Linux/Intel signals.  (And, of course,
perhaps recompiling anything that relies on _NSIG, but this could be
a change migrated into a future release.)

Again, this is a fairly arcane issue, but any time we add to the work
that developers must do to port to our platform, we're hurting ourselves.

Dan Morrill
Computer Scientist
GE Corporate R&D, K1 5C36
(518) 387 - 6761


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Linux/AXP signum.h
@ 1998-09-21 18:08 A van Kessel
  0 siblings, 0 replies; 5+ messages in thread
From: A van Kessel @ 1998-09-21 18:08 UTC (permalink / raw)
  To: axp-list

Agree with that one. Most of the portable code allready has to deal
with the old bsd/sysv differnces, and the various "compatibility"
#defines ( I recently found out that SIGIOT and SIGABRT wer equal)
Yes, it wil split up the #ifdef linux bits, but most of the code
already has to test for _alpha_ et al.
The binary compatibility has some historical background in the fact
that linus crosdeveloped on OSF/1.

Let's not waste people's time on this one. If you're really interested repost
into a newsgroup.
AvK


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Linux/AXP signum.h
  1998-09-21 17:35 Linux/AXP signum.h Dan Morrill
@ 1998-09-21 19:17 ` Michal Jaegermann
  0 siblings, 0 replies; 5+ messages in thread
From: Michal Jaegermann @ 1998-09-21 19:17 UTC (permalink / raw)
  To: axp-list

Dan Morrill wrote:
> 
> OpenLDAP has an #ifdef LINUX around the points where it uses
> these signals;  however, it uses SIGSTKFLT and SIGUNUSED,
> which are present on Linux/Intel but not on Linux/Alpha.

Hm, running 'kill -l' on my Linux/Intel prints exactly this:

 1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL
 5) SIGTRAP      6) SIGIOT       7) SIGBUS       8) SIGFPE
 9) SIGKILL     10) SIGUSR1     11) SIGSEGV     12) SIGUSR2
13) SIGPIPE     14) SIGALRM     15) SIGTERM     17) SIGCHLD
18) SIGCONT     19) SIGSTOP     20) SIGTSTP     21) SIGTTIN
22) SIGTTOU     23) SIGURG      24) SIGXCPU     25) SIGXFSZ
26) SIGVTALRM   27) SIGPROF     28) SIGWINCH    29) SIGIO
30) SIGPWR

> In other words, the authors of OpenLDAP have assumed that
> all Linuxes have the same signum.h, whatever platform they're
> running on.

I am afraid assumption of a type "all platforms are exactly like
mine at this moment" lead straight to a buggy code.

It seems that you can easily solve your immediate problem on hand
by picking up two otherwise unused signals and two defines.

  Michal


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-09-21 19:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-09-21 17:35 Linux/AXP signum.h Dan Morrill
1998-09-21 19:17 ` Michal Jaegermann
  -- strict thread matches above, loose matches on Subject: below --
1998-09-21 17:41 A van Kessel
1998-09-21 17:58 ` Dan Morrill
1998-09-21 18:08 A van Kessel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox