Home | History | Annotate | Line # | Download | only in dist
common_impl.h revision 1.2.2.2
      1  1.2.2.2  pgoyette /*	$NetBSD: common_impl.h,v 1.2.2.2 2018/09/30 01:45:55 pgoyette Exp $	*/
      2  1.2.2.2  pgoyette 
      3  1.2.2.2  pgoyette /*-
      4  1.2.2.2  pgoyette  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
      5  1.2.2.2  pgoyette  *
      6  1.2.2.2  pgoyette  * Copyright (c) 2013 The FreeBSD Foundation
      7  1.2.2.2  pgoyette  * All rights reserved.
      8  1.2.2.2  pgoyette  *
      9  1.2.2.2  pgoyette  * This software was developed by Pawel Jakub Dawidek under sponsorship from
     10  1.2.2.2  pgoyette  * the FreeBSD Foundation.
     11  1.2.2.2  pgoyette  *
     12  1.2.2.2  pgoyette  * Redistribution and use in source and binary forms, with or without
     13  1.2.2.2  pgoyette  * modification, are permitted provided that the following conditions
     14  1.2.2.2  pgoyette  * are met:
     15  1.2.2.2  pgoyette  * 1. Redistributions of source code must retain the above copyright
     16  1.2.2.2  pgoyette  *    notice, this list of conditions and the following disclaimer.
     17  1.2.2.2  pgoyette  * 2. Redistributions in binary form must reproduce the above copyright
     18  1.2.2.2  pgoyette  *    notice, this list of conditions and the following disclaimer in the
     19  1.2.2.2  pgoyette  *    documentation and/or other materials provided with the distribution.
     20  1.2.2.2  pgoyette  *
     21  1.2.2.2  pgoyette  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
     22  1.2.2.2  pgoyette  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23  1.2.2.2  pgoyette  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24  1.2.2.2  pgoyette  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
     25  1.2.2.2  pgoyette  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     26  1.2.2.2  pgoyette  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     27  1.2.2.2  pgoyette  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     28  1.2.2.2  pgoyette  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     29  1.2.2.2  pgoyette  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     30  1.2.2.2  pgoyette  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     31  1.2.2.2  pgoyette  * SUCH DAMAGE.
     32  1.2.2.2  pgoyette  *
     33  1.2.2.2  pgoyette  * $FreeBSD: head/lib/libnv/common_impl.h 326219 2017-11-26 02:00:33Z pfg $
     34  1.2.2.2  pgoyette  */
     35  1.2.2.2  pgoyette 
     36  1.2.2.2  pgoyette #ifndef	_COMMON_IMPL_H_
     37  1.2.2.2  pgoyette #define	_COMMON_IMPL_H_
     38  1.2.2.2  pgoyette 
     39  1.2.2.2  pgoyette #define	fd_is_valid(fd)	(fcntl((fd), F_GETFL) != -1 || errno != EBADF)
     40  1.2.2.2  pgoyette 
     41  1.2.2.2  pgoyette #endif	/* !_COMMON_IMPL_H_ */
     42