aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/gen/crypt.c
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2016-10-03 18:20:58 +0000
committerEd Schouten <ed@FreeBSD.org>2016-10-03 18:20:58 +0000
commit1a466ddc7986e4243a819ecb735187b80e3b57f4 (patch)
tree2d4f0438e49af91688ebdcc4262113b289ea3cab /lib/libc/gen/crypt.c
parent905339874b0d0834f0887eb674b20fb505618abc (diff)
Remove setkey(), encrypt(), des_setkey() and des_cipher().
The setkey() and encrypt() functions are part of XSI, not the POSIX base definitions. There is no strict requirement for us to provide these, especially if we're only going to keep these around as undocumented stubs. The same holds for des_setkey() and des_cipher(). Instead of providing functions that only generate warnings when linking, simply disallow linking against them. The impact of this is relatively low. It only causes two leaf ports to break. I'll see what I can do to help out to get those fixed. PR: 211626
Notes
Notes: svn path=/head/; revision=306651
Diffstat (limited to 'lib/libc/gen/crypt.c')
-rw-r--r--lib/libc/gen/crypt.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/lib/libc/gen/crypt.c b/lib/libc/gen/crypt.c
index ab1a79901225..d8e45cd21fa7 100644
--- a/lib/libc/gen/crypt.c
+++ b/lib/libc/gen/crypt.c
@@ -48,47 +48,41 @@ __FBSDID("$FreeBSD$");
* encryption, make sure you've got libcrypt.a around.
*/
-__warn_references(des_setkey,
- "WARNING! des_setkey(3) not present in the system!");
-
/* ARGSUSED */
int
-des_setkey(const char *key __unused)
+__freebsd11_des_setkey(const char *key __unused)
{
fprintf(stderr, "WARNING! des_setkey(3) not present in the system!\n");
return (0);
}
-__warn_references(des_cipher,
- "WARNING! des_cipher(3) not present in the system!");
-
/* ARGSUSED */
int
-des_cipher(const char *in, char *out, long salt __unused, int num_iter __unused)
+__freebsd11_des_cipher(const char *in, char *out, long salt __unused,
+ int num_iter __unused)
{
fprintf(stderr, "WARNING! des_cipher(3) not present in the system!\n");
bcopy(in, out, 8);
return (0);
}
-__warn_references(setkey,
- "WARNING! setkey(3) not present in the system!");
-
/* ARGSUSED */
int
-setkey(const char *key __unused)
+__freebsd11_setkey(const char *key __unused)
{
fprintf(stderr, "WARNING! setkey(3) not present in the system!\n");
return (0);
}
-__warn_references(encrypt,
- "WARNING! encrypt(3) not present in the system!");
-
/* ARGSUSED */
int
-encrypt(char *block __unused, int flag __unused)
+__freebsd11_encrypt(char *block __unused, int flag __unused)
{
fprintf(stderr, "WARNING! encrypt(3) not present in the system!\n");
return (0);
}
+
+__sym_compat(des_setkey, __freebsd11_des_setkey, FBSD_1.0);
+__sym_compat(des_cipher, __freebsd11_des_cipher, FBSD_1.0);
+__sym_compat(setkey, __freebsd11_setkey, FBSD_1.0);
+__sym_compat(encrypt, __freebsd11_encrypt, FBSD_1.0);