summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-09-13 11:47:55 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-09-13 11:47:55 +0000
commitcf781e44ac4d759b29dccb5b9a3e98845d4b8773 (patch)
tree5e26668a882cac6f56b7e085d95a1b0e401ef8f5 /lib/libc
parente5470d137a99e918903fa2786a4ffaa2cb538501 (diff)
Wrap <ttyent.h> so that calls go direct and the symbols are all weak.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/getttyent.c5
-rw-r--r--lib/libc/hidden/ttyent.h28
2 files changed, 32 insertions, 1 deletions
diff --git a/lib/libc/gen/getttyent.c b/lib/libc/gen/getttyent.c
index 33d788b7775..c88e8952765 100644
--- a/lib/libc/gen/getttyent.c
+++ b/lib/libc/gen/getttyent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getttyent.c,v 1.14 2014/09/15 06:15:48 guenther Exp $ */
+/* $OpenBSD: getttyent.c,v 1.15 2015/09/13 11:47:54 guenther Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -127,6 +127,7 @@ getttyent(void)
*p = '\0';
return (&tty);
}
+DEF_WEAK(getttyent);
#define QUOTED 1
@@ -185,6 +186,7 @@ setttyent(void)
return (1);
return (0);
}
+DEF_WEAK(setttyent);
int
endttyent(void)
@@ -198,3 +200,4 @@ endttyent(void)
}
return (1);
}
+DEF_WEAK(endttyent);
diff --git a/lib/libc/hidden/ttyent.h b/lib/libc/hidden/ttyent.h
new file mode 100644
index 00000000000..885701697bf
--- /dev/null
+++ b/lib/libc/hidden/ttyent.h
@@ -0,0 +1,28 @@
+/* $OpenBSD: ttyent.h,v 1.1 2015/09/13 11:47:54 guenther Exp $ */
+/*
+ * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _LIBC_TTYENT_H_
+#define _LIBC_TTYENT_H_
+
+#include_next <ttyent.h>
+
+PROTO_NORMAL(endttyent);
+PROTO_NORMAL(getttyent);
+PROTO_DEPRECATED(getttynam);
+PROTO_NORMAL(setttyent);
+
+#endif /* !_LIBC_TTYENT_H_ */