Bug 17723 - crypt.h and unistd.h have conflicting function declarations
Summary: crypt.h and unistd.h have conflicting function declarations
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc   
(Show other bugs)
Version: 7.0
Hardware: i386 Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-09-19 20:14 UTC by roystgnr
Modified: 2008-05-01 15:37 UTC (History)
0 users

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


Attachments (Terms of Use)

Description roystgnr 2000-09-19 20:14:50 UTC
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 04:28:27 UTC
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.