Issue 603 - sigset prototype not included on Linux platforms
Summary: sigset prototype not included on Linux platforms
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: build (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-06-23 16:54 UTC by geksiong@sendmail.com
Modified: 2014-08-01 21:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description geksiong@sendmail.com 2000-06-23 16:54:41 UTC
Full_Name: Gek Low
Version: 1.2
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (63.211.143.38)


I am trying to build OpenLDAP on the IA64 (Linux OS) and I found out that it is
not 
including the prototype for sigset(), so the compiler is assuming it returns
int, which 
is bad on a 64-bit system, because ints are only 32 bits. The prototype must be
included
to generate correct code.

The sigset() prototype on Linux systems is contained within the __USE_UNIX98
ifdef in
signal.h, so it is not included at all. However, there is a sigset function in
libc,
so everything links. The OpenLDAP configure script correctly/incorrectly says
sigset() 
exist on Linux, but the missing prototype will not work for 64-bit Linux.
Comment 1 Kurt Zeilenga 2000-06-23 22:41:03 UTC
At 04:54 PM 6/23/00 GMT, geksiong@sendmail.com wrote:
>Full_Name: Gek Low
>Version: 1.2
>OS: Linux
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (63.211.143.38)
>
>
>I am trying to build OpenLDAP on the IA64 (Linux OS) and I found out that it is
>not 
>including the prototype for sigset(), so the compiler is assuming it returns
>int, which 
>is bad on a 64-bit system, because ints are only 32 bits. The prototype must be
>included
>to generate correct code.
>
>The sigset() prototype on Linux systems is contained within the __USE_UNIX98
>ifdef in
>signal.h, so it is not included at all. However, there is a sigset function in
>libc,
>so everything links. The OpenLDAP configure script correctly/incorrectly says
>sigset() 
>exist on Linux, but the missing prototype will not work for 64-bit Linux.

I suggest using:
	env ac_cv_func_sigset=no ./configure

to workaround this problem.  I do not suggest defining __USE_UNIX98.
This macro is internal to the implementation of the C library and,
as such, applications should not muck with it.

Kurt
Comment 2 Kurt Zeilenga 2000-06-25 12:00:50 UTC
moved from Incoming to Build
Comment 3 Villy Kruse 2000-06-28 07:32:23 UTC
On Fri, 23 Jun 2000 Kurt@OpenLDAP.org wrote:

> Date: Fri, 23 Jun 2000 22:41:16 GMT
> From: Kurt@OpenLDAP.org
> To: openldap-its@OpenLDAP.org
> Subject: Re: sigset prototype not included on Linux platforms  (ITS#603)
> 
> At 04:54 PM 6/23/00 GMT, geksiong@sendmail.com wrote:
> >Full_Name: Gek Low
> >Version: 1.2
> >OS: Linux
> >URL: ftp://ftp.openldap.org/incoming/
> >Submission from: (NULL) (63.211.143.38)
> >
> >
> >I am trying to build OpenLDAP on the IA64 (Linux OS) and I found out that it is
> >not 
> >including the prototype for sigset(), so the compiler is assuming it returns
> >int, which 
> >is bad on a 64-bit system, because ints are only 32 bits. The prototype must be
> >included
> >to generate correct code.
> >
> >The sigset() prototype on Linux systems is contained within the __USE_UNIX98
> >ifdef in
> >signal.h, so it is not included at all. However, there is a sigset function in
> >libc,
> >so everything links. The OpenLDAP configure script correctly/incorrectly says
> >sigset() 
> >exist on Linux, but the missing prototype will not work for 64-bit Linux.
> 
> I suggest using:
> 	env ac_cv_func_sigset=no ./configure
> 
> to workaround this problem.  I do not suggest defining __USE_UNIX98.
> This macro is internal to the implementation of the C library and,
> as such, applications should not muck with it.
> 
> Kurt
> 


I beleive that using the sigaction() function whenever available is
preferred to either signal() or sigset().  The semantices of signal()
is not very well standardized and sigset() is less supported.  

On linux with glibc2 signal() has BSD semantics, and sigset() is
supposed to have BSD semantics for signal() except for automaticaly
restarting system calls.  Linux with libc5 has sysV signal() and no
sigset() but does have sigaction().  

With sigaction() you can control the semantics to mach your needs.

Villy

Comment 4 Kurt Zeilenga 2000-08-18 16:43:26 UTC
changed notes
changed state Open to Suspended
Comment 5 Kurt Zeilenga 2000-09-01 11:53:57 UTC
changed state Suspended to Closed
Comment 6 OpenLDAP project 2014-08-01 21:05:08 UTC
Devel codes use sigaction.  Likely will not be backported.