summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/ctermid.c
diff options
context:
space:
mode:
authorwes <wes@FreeBSD.org>1999-11-28 23:28:49 +0000
committerwes <wes@FreeBSD.org>1999-11-28 23:28:49 +0000
commit6c73ef33e3ddc45ff955bdce14f81f2496609a4a (patch)
tree804c6f0a31679b8b101181b83c605d779db316dc /lib/libc/gen/ctermid.c
parentb47b66375e0f252552a738cc1ea63dd564a92887 (diff)
downloadFreeBSD-src-6c73ef33e3ddc45ff955bdce14f81f2496609a4a.zip
FreeBSD-src-6c73ef33e3ddc45ff955bdce14f81f2496609a4a.tar.gz
Provide and document ctermid_r function.
Diffstat (limited to 'lib/libc/gen/ctermid.c')
-rw-r--r--lib/libc/gen/ctermid.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/libc/gen/ctermid.c b/lib/libc/gen/ctermid.c
index 262d6df..e43d6ab 100644
--- a/lib/libc/gen/ctermid.c
+++ b/lib/libc/gen/ctermid.c
@@ -29,6 +29,8 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
#if defined(LIBC_SCCS) && !defined(lint)
@@ -40,8 +42,7 @@ static char sccsid[] = "@(#)ctermid.c 8.1 (Berkeley) 6/4/93";
#include <string.h>
char *
-ctermid(s)
- char *s;
+ctermid(char *s)
{
static char def[] = _PATH_TTY;
@@ -51,3 +52,10 @@ ctermid(s)
}
return(def);
}
+
+
+char *
+ctermid_r(char *s)
+{
+ return (s) ? ctermid(s) : NULL;
+}
OpenPOWER on IntegriCloud