summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-06-05 13:46:47 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-06-05 13:46:47 +0000
commit07beb34d51523f7f30e354ef08a802ed79cf09da (patch)
tree544c7c04669d4793e5e228aaa29123f4c9922521 /include
parent64ba3e5e0836bde4e85d6d2fdd133e2d37211e86 (diff)
- make libcrypt optional. Untested.
Diffstat (limited to 'include')
-rw-r--r--include/crypt.h7
-rw-r--r--include/stdlib.h2
-rw-r--r--include/unistd.h2
3 files changed, 8 insertions, 3 deletions
diff --git a/include/crypt.h b/include/crypt.h
index f3fed7ca7..f62a03056 100644
--- a/include/crypt.h
+++ b/include/crypt.h
@@ -27,14 +27,15 @@ __BEGIN_DECLS
/* Encrypt characters from KEY using salt to perturb the encryption method.
* If salt begins with "$1$", MD5 hashing is used instead of DES. */
-extern char *crypt (const char *__key, const char *__salt);
+extern char *crypt (const char *__key, const char *__salt)
+ __THROW __nonnull ((1, 2));
/* Setup DES tables according KEY. */
-extern void setkey (const char *__key);
+extern void setkey (const char *__key) __THROW __nonnull ((1));
/* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt
block in place. */
-extern void encrypt (char *__block, int __edflag);
+extern void encrypt (char *__block, int __edflag) __THROW __nonnull ((1));
__END_DECLS
diff --git a/include/stdlib.h b/include/stdlib.h
index 354134906..0b4447480 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -802,8 +802,10 @@ extern int getsubopt (char **__restrict __optionp,
#ifdef __USE_XOPEN
+# if defined __UCLIBC_HAS_CRYPT__
/* Setup DES tables according KEY. */
extern void setkey (__const char *__key) __THROW __nonnull ((1));
+# endif /* __UCLIBC_HAS_CRYPT__ */
#endif
diff --git a/include/unistd.h b/include/unistd.h
index e0219e770..58021a5e2 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -1077,6 +1077,7 @@ extern int fdatasync (int __fildes) __THROW;
/* XPG4.2 specifies that prototypes for the encryption functions must
be defined here. */
#ifdef __USE_XOPEN
+# if defined __UCLIBC_HAS_CRYPT__
/* Encrypt at most 8 characters from KEY using salt to perturb DES. */
extern char *crypt (__const char *__key, __const char *__salt)
__THROW __nonnull ((1, 2));
@@ -1084,6 +1085,7 @@ extern char *crypt (__const char *__key, __const char *__salt)
/* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt
block in place. */
extern void encrypt (char *__block, int __edflag) __THROW __nonnull ((1));
+# endif /* __UCLIBC_HAS_CRYPT__ */
/* Swab pairs bytes in the first N bytes of the area pointed to by