[BACK]Return to os.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / usr.bin / top

Annotation of src/usr.bin/top/os.h, Revision 1.5

1.5     ! itojun      1: /*     $NetBSD: os.h,v 1.4 1999/04/12 06:02:26 ross Exp $      */
        !             2:
        !             3: /*
        !             4:  *  Top users/processes display for Unix
        !             5:  *  Version 3
        !             6:  *
        !             7:  * Copyright (c) 1984, 1989, William LeFebvre, Rice University
        !             8:  * Copyright (c) 1989, 1990, 1992, William LeFebvre, Northwestern University
        !             9:  *
        !            10:  * Redistribution and use in source and binary forms, with or without
        !            11:  * modification, are permitted provided that the following conditions
        !            12:  * are met:
        !            13:  * 1. Redistributions of source code must retain the above copyright
        !            14:  *    notice, this list of conditions and the following disclaimer.
        !            15:  * 2. Redistributions in binary form must reproduce the above copyright
        !            16:  *    notice, this list of conditions and the following disclaimer in the
        !            17:  *    documentation and/or other materials provided with the distribution.
        !            18:  *
        !            19:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
        !            20:  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
        !            21:  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
        !            22:  * IN NO EVENT SHALL THE AUTHOR OR HIS EMPLOYER BE LIABLE FOR ANY DIRECT, INDIRECT,
        !            23:  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
        !            24:  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
        !            25:  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
        !            26:  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
        !            27:  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
        !            28:  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        !            29:  */
1.4       ross       30:
1.1       simonb     31: #include <sys/types.h>
                     32: #include <sys/param.h> /* This defines BSD */
                     33: #if defined(BSD) && !defined(BSD4_4) && !defined(__osf__)
                     34: # include <stdio.h>
                     35: # include <strings.h>
                     36: # define strchr(a, b)          index((a), (b))
                     37: # define strrchr(a, b)         rindex((a), (b))
                     38: # define memcpy(a, b, c)       bcopy((b), (a), (c))
                     39: # define memzero(a, b)         bzero((a), (b))
                     40: # define memcmp(a, b, c)       bcmp((a), (b), (c))
                     41: #if defined(NeXT)
                     42:   typedef void sigret_t;
                     43: #else
                     44:   typedef int sigret_t;
                     45: #endif
                     46:
                     47: /* system routines that don't return int */
                     48: char *getenv();
                     49: caddr_t malloc();
                     50:
                     51: #else
                     52: # include <stdio.h>
                     53: # define setbuffer(f, b, s)    setvbuf((f), (b), (b) ? _IOFBF : _IONBF, (s))
                     54: # include <string.h>
                     55: # include <memory.h>
                     56: # include <stdlib.h>
1.3       christos   57: # include <unistd.h>
1.1       simonb     58: # define memzero(a, b)         memset((a), 0, (b))
                     59:   typedef void sigret_t;
                     60: #endif
                     61:
                     62: /* some systems declare sys_errlist in stdio.h! */
                     63: #if defined(__NetBSD__) || defined(__FreeBSD__)
                     64: #define SYS_ERRLIST_DECLARED
                     65: #endif

CVSweb <webmaster@jp.NetBSD.org>