Deleted Added
full compact
ttyname.c (19635) ttyname.c (22315)
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

--- 103 unchanged lines hidden (view full) ---

112
113char *
114__ttyname_basic(int fd)
115{
116 char *buf;
117
118 pthread_mutex_lock(&ttyname_lock);
119 if (ttyname_init == 0) {
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

--- 103 unchanged lines hidden (view full) ---

112
113char *
114__ttyname_basic(int fd)
115{
116 char *buf;
117
118 pthread_mutex_lock(&ttyname_lock);
119 if (ttyname_init == 0) {
120 if (pthread_keycreate(&ttyname_key, free)) {
120 if (pthread_key_create(&ttyname_key, free)) {
121 pthread_mutex_unlock(&ttyname_lock);
122 return (NULL);
123 }
124 ttyname_init = 1;
125 }
126 pthread_mutex_unlock(&ttyname_lock);
127
128 /* Must have thread specific data field to put data */

--- 96 unchanged lines hidden ---
121 pthread_mutex_unlock(&ttyname_lock);
122 return (NULL);
123 }
124 ttyname_init = 1;
125 }
126 pthread_mutex_unlock(&ttyname_lock);
127
128 /* Must have thread specific data field to put data */

--- 96 unchanged lines hidden ---