Bug 17723 - crypt.h and unistd.h have conflicting function declarations
crypt.h and unistd.h have conflicting function declarations
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
7.0
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-09-19 16:14 EDT by roystgnr
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-09-23 00:28:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description roystgnr 2000-09-19 16:14:50 EDT
Using:
glibc-devel-2.1.92-5
gcc-c++-2.96-46

I am unable to compile the administrative tools from the KDE 1.94 beta
release, as certain source files in that release (e.g. kuser/pwddlg.cpp)
include both unistd.h and crypt.h.  Compiling these files with g++ gives
the following errors:

g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/usr/lib/qt2/include
-I/usr/X11R6/include  -I.. -I../kuser  -DNDEBUG  -D_KU_SHADOW -D_KU_QUOTA
-DQUOTACTL_IN_LIBC -D_KU_DEBUG -D_SVID_SOURCE -D_GNU_SOURCE -frtti
-DNO_DEBUG  -c pwddlg.cpp

In file included from pwddlg.cpp:9:
/usr/include/crypt.h:33: declaration of `char *crypt (const char *, 
const char *)' throws different exceptions
/usr/include/unistd.h:953: than previous declaration `char *crypt 
(const char *, const char *) throw ()'
/usr/include/crypt.h:36: declaration of `void setkey (const char *)' 
throws different exceptions
/usr/include/unistd.h:956: than previous declaration `void setkey 
(const char *) throw ()'
/usr/include/crypt.h:40: declaration of `void encrypt(char *, int)' 
throws different exceptions
/usr/include/unistd.h:960: than previous declaration `void encrypt 
(char *, int) throw ()'


The bug is reproducable; the minimum reproduction seems to be:

g++ -I/usr/include -D_GNU_SOURCE hello.cpp

Where hello.cpp is:

#include <crypt.h>
#include <unistd.h>
int main(void) { return 0; }
Comment 1 Jakub Jelinek 2000-09-23 00:28:27 EDT
Thanks for bug report, fixed in sources CVS, will come out in the
upcoming glibc errata.

Note You need to log in before you can comment on or make changes to this bug.