ttyname.c (17141) | ttyname.c (17706) |
---|---|
1/* 2 * Copyright (c) 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 35 unchanged lines hidden (view full) --- 44#include <unistd.h> 45#include <db.h> 46#include <string.h> 47#include <paths.h> 48 49#ifdef _THREAD_SAFE 50#include <pthread.h> 51#include "pthread_private.h" | 1/* 2 * Copyright (c) 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 35 unchanged lines hidden (view full) --- 44#include <unistd.h> 45#include <db.h> 46#include <string.h> 47#include <paths.h> 48 49#ifdef _THREAD_SAFE 50#include <pthread.h> 51#include "pthread_private.h" |
52static pthread_mutex_t ttyname_lock = PTHREAD_MUTEX_INITIALIZER; | 52static struct pthread_mutex _ttyname_lockd = PTHREAD_MUTEX_INITIALIZER; 53static pthread_mutex_t ttyname_lock = &_ttyname_lockd; |
53static pthread_key_t ttyname_key; 54static int ttyname_init = 0; 55 56char * 57ttyname(int fd) 58{ 59 char *ret; 60 --- 163 unchanged lines hidden --- | 54static pthread_key_t ttyname_key; 55static int ttyname_init = 0; 56 57char * 58ttyname(int fd) 59{ 60 char *ret; 61 --- 163 unchanged lines hidden --- |