Changeset 182c101e in rtems


Ignore:
Timestamp:
08/31/05 04:29:39 (19 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
54791b8
Parents:
4266e821
Message:

2005-08-31 Ralf Corsepius <ralf.corsepius@…>

PR 819/filesystem

  • libcsupport/src/ttyname_r.c: Remove.
  • libcsupport/src/ttyname.c: Partial update from FreeBSD.
  • libcsupport/Makefile.am: Reflect changes above.
Location:
cpukit
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r4266e821 r182c101e  
     12005-08-31  Ralf Corsepius  <ralf.corsepius@rtems.org>
     2
     3        PR 819/filesystem
     4        * libcsupport/src/ttyname_r.c: Remove.
     5        * libcsupport/src/ttyname.c: Partial update from FreeBSD.
     6        * libcsupport/Makefile.am: Reflect changes above.
     7
    182005-08-18      Andrew Sinclair <Andrew.Sinclair@elprotech.com>
    29
  • cpukit/libcsupport/Makefile.am

    r4266e821 r182c101e  
    7373PASSWORD_GROUP_C_FILES = src/getpwent.c
    7474
    75 TERMINAL_IDENTIFICATION_C_FILES = src/ctermid.c src/isatty.c src/ttyname.c \
    76     src/ttyname_r.c
     75TERMINAL_IDENTIFICATION_C_FILES = src/ctermid.c src/isatty.c src/ttyname.c
    7776
    7877LIBC_GLUE_C_FILES = src/__getpid.c src/__gettod.c src/__times.c \
  • cpukit/libcsupport/src/ttyname.c

    r4266e821 r182c101e  
    11/*
    2  *  ttyname_r() - POSIX 1003.1b 4.7.2 - Demetermine Terminal Device Name
     2 * Copyright (c) 1988, 1993
     3 *      The Regents of the University of California.  All rights reserved.
    34 *
     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
     9 *    notice, this list of conditions and the following disclaimer.
     10 * 2. Redistributions in binary form must reproduce the above copyright
     11 *    notice, this list of conditions and the following disclaimer in the
     12 *    documentation and/or other materials provided with the distribution.
     13 * 3. All advertising materials mentioning features or use of this software
     14 *    must display the following acknowledgement:
     15 *      This product includes software developed by the University of
     16 *      California, Berkeley and its contributors.
     17 * 4. Neither the name of the University nor the names of its contributors
     18 *    may be used to endorse or promote products derived from this software
     19 *    without specific prior written permission.
     20 *
     21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     31 * SUCH DAMAGE.
     32 */
     33
     34/*
    435 *  $Id$
    536 */
     
    2354#include <rtems/seterr.h>
    2455
     56static char ttyname_buf[sizeof (_PATH_DEV) + MAXNAMLEN] = _PATH_DEV;
     57
     58/*
     59 *  ttyname_r() - POSIX 1003.1b 4.7.2 - Demetermine Terminal Device Name
     60 */
    2561int ttyname_r(
    2662  int   fd,
     
    6298}
    6399
    64 static char buf[sizeof (_PATH_DEV) + MAXNAMLEN] = _PATH_DEV;
    65 
    66100/*
    67101 *  ttyname() - POSIX 1003.1b 4.7.2 - Demetermine Terminal Device Name
     
    72106)
    73107{
    74   if ( !ttyname_r( fd, buf, sizeof(buf) ) )
    75     return buf;
     108  if ( !ttyname_r( fd, ttyname_buf, sizeof(ttyname_buf) ) )
     109    return ttyname_buf;
    76110  return NULL;
    77111}
Note: See TracChangeset for help on using the changeset viewer.