"Fossies" - the Fresh Open Source Software Archive

Member "tnftp-20200705/libedit/sys.h" (4 Jul 2020, 3758 Bytes) of package /linux/privat/tnftp-20200705.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "sys.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 20151004_vs_20200705.

    1 /*  $NetBSD: sys.h,v 1.7 2020/07/04 13:43:21 lukem Exp $    */
    2 /*  from    NetBSD: sys.h,v 1.27 2016/05/09 21:46:56 christos Exp   */
    3 
    4 /*-
    5  * Copyright (c) 1992, 1993
    6  *  The Regents of the University of California.  All rights reserved.
    7  *
    8  * This code is derived from software contributed to Berkeley by
    9  * Christos Zoulas of Cornell University.
   10  *
   11  * Redistribution and use in source and binary forms, with or without
   12  * modification, are permitted provided that the following conditions
   13  * are met:
   14  * 1. Redistributions of source code must retain the above copyright
   15  *    notice, this list of conditions and the following disclaimer.
   16  * 2. Redistributions in binary form must reproduce the above copyright
   17  *    notice, this list of conditions and the following disclaimer in the
   18  *    documentation and/or other materials provided with the distribution.
   19  * 3. Neither the name of the University nor the names of its contributors
   20  *    may be used to endorse or promote products derived from this software
   21  *    without specific prior written permission.
   22  *
   23  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   26  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   27  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   29  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   33  * SUCH DAMAGE.
   34  *
   35  *  @(#)sys.h   8.1 (Berkeley) 6/4/93
   36  */
   37 
   38 /*
   39  * sys.h: Put all the stupid compiler and system dependencies here...
   40  */
   41 #ifndef _h_sys
   42 #define _h_sys
   43 
   44 #if 0 /* tnftp */
   45 #ifdef HAVE_SYS_CDEFS_H
   46 #include <sys/cdefs.h>
   47 #endif
   48 #endif /* tnftp */
   49 
   50 #if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__)  || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
   51 # define __attribute__(A)
   52 #endif
   53 
   54 #if 0 /* tnftp */
   55 #ifndef __BEGIN_DECLS
   56 # ifdef  __cplusplus
   57 #  define __BEGIN_DECLS  extern "C" {
   58 #  define __END_DECLS    }
   59 # else
   60 #  define __BEGIN_DECLS
   61 #  define __END_DECLS
   62 # endif
   63 #endif
   64 #endif /* tnftp */
   65 
   66 /* If your compiler does not support this, define it to be empty. */
   67 #define libedit_private __attribute__((__visibility__("hidden")))
   68 
   69 #ifndef __arraycount
   70 # define __arraycount(a) (sizeof(a) / sizeof(*(a)))
   71 #endif
   72 
   73 #if 0 /* tnftp */
   74 #include <stdio.h>
   75 
   76 #ifndef HAVE_STRLCAT
   77 #define strlcat libedit_strlcat
   78 size_t  strlcat(char *dst, const char *src, size_t size);
   79 #endif
   80 
   81 #ifndef HAVE_STRLCPY
   82 #define strlcpy libedit_strlcpy
   83 size_t  strlcpy(char *dst, const char *src, size_t size);
   84 #endif
   85 
   86 #ifndef HAVE_GETLINE
   87 #define getline libedit_getline
   88 ssize_t getline(char **line, size_t *len, FILE *fp);
   89 #endif
   90 
   91 #ifndef _DIAGASSERT
   92 #define _DIAGASSERT(x)
   93 #endif
   94 
   95 #ifndef __RCSID
   96 #define __RCSID(x)
   97 #endif
   98 
   99 #ifndef HAVE_U_INT32_T
  100 typedef unsigned int    u_int32_t;
  101 #endif
  102 
  103 #ifndef HAVE_SIZE_MAX
  104 #define SIZE_MAX    ((size_t)-1)
  105 #endif
  106 
  107 #define REGEX       /* Use POSIX.2 regular expression functions */
  108 #undef  REGEXP      /* Use UNIX V8 regular expression functions */
  109 #endif /* tnftp */
  110 
  111 #if defined(__sun)
  112 extern int tgetent(char *, const char *);
  113 extern int tgetflag(char *);
  114 extern int tgetnum(char *);
  115 extern int tputs(const char *, int, int (*)(int));
  116 extern char* tgoto(const char*, int, int);
  117 extern char* tgetstr(char*, char**);
  118 #endif
  119 
  120 #if HAVE_REGEX_H /* tnftp extension */
  121 # include <regex.h>
  122 # define REGEX
  123 #endif
  124 
  125 #endif /* _h_sys */