- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- crypt () function
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2003 05:44 AM
05-15-2003 05:44 AM
crypt () function
I am compiling a program that, uses crypt( ) funtion. I check the man page, and this funtion should be in :
#include
#include
But I can 't find any reference to crypt ( ) funtion in any of the above headers, but there is plenty reference to obsolescent one "crypt_r ( )".
Does anyone know any patch that I should use, I couldn't find any.
Thanks
__Mehdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2003 05:55 AM
05-15-2003 05:55 AM
Re: crypt () function
/usr/include/sys/unistd.h: extern char *crypt __((const char *, const char *));
Best regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2003 05:56 AM
05-15-2003 05:56 AM
Re: crypt () function
extern char *crypt(const char *key, const char *salt);
without the header but there's no need. Simply #include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2003 06:06 AM
05-15-2003 06:06 AM
Re: crypt () function
11.0
/usr/include/crypt.h
/usr/conf/h/unistd.h
/usr/include/sys/unistd.h
/usr/include/unistd.h
Hope it helps,
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2003 07:15 AM
05-15-2003 07:15 AM
Re: crypt () function
Thanks for the replies.
I 've got 11.00 box, and I can't see any sign of "crypt()" prototype any any of the :
#include
#include
headers. I 've added the prototype from the man pages:
char *crypt(const char *key, const char *salt);
and the program compiles fine, but in the link time it fails:
/usr/ccs/bin/ld: Unsatisfied symbols:
crypt(char const*, char const*)(code)
Aparently, the function is in "libc.2 not in libcrypt.* !!!. In theory gcc ( or g++ ) should load "-lc" library. But to be in a safe side I even added the -lc to tthe link line, but it still the not linking.
Any help please.
Thanks
__Mehdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2003 07:15 AM
05-15-2003 07:15 AM
Re: crypt () function
refer to man 3 crypt.
HTH
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2003 07:21 AM
05-15-2003 07:21 AM
Re: crypt () function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2003 12:13 AM
05-16-2003 12:13 AM
Re: crypt () function
I thought that you were using the standard HP-UX C compiler which does work.
If you are using the gcc compiler, you need to compile your source code as follows:
gcc -lcrypt crypt.c
This will link your code to the cryt libray file.
Cheers,
Joseph.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2003 02:11 AM
05-16-2003 02:11 AM
Re: crypt () function
Thanks for the good replies.
Yes, I should have mentioned that before, I am using gcc not HP cc. In fact I am using g++. It seems it works ok with gcc, But it doesn't work with g++. Any idea on that please.
Thanks