williamr@2: /*- williamr@2: * Copyright (c) 2003 Marcel Moolenaar williamr@2: * All rights reserved. williamr@2: * williamr@2: * Redistribution and use in source and binary forms, with or without williamr@2: * modification, are permitted provided that the following conditions williamr@2: * are met: williamr@2: * williamr@2: * 1. Redistributions of source code must retain the above copyright williamr@2: * notice, this list of conditions and the following disclaimer. williamr@2: * 2. Redistributions in binary form must reproduce the above copyright williamr@2: * notice, this list of conditions and the following disclaimer in the williamr@2: * documentation and/or other materials provided with the distribution. williamr@2: * williamr@2: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR williamr@2: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES williamr@2: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. williamr@2: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, williamr@2: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT williamr@2: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, williamr@2: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY williamr@2: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT williamr@2: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF williamr@2: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. williamr@2: * williamr@2: * $FreeBSD: src/sys/sys/_null.h,v 1.7 2005/01/07 02:29:23 imp Exp $ williamr@2: */ williamr@2: williamr@2: #ifndef NULL williamr@2: #if defined(_KERNEL) || !defined(__cplusplus) williamr@2: #define NULL ((void *)0) williamr@2: #else williamr@2: #if defined(__LP64__) williamr@2: #define NULL (0L) williamr@2: #else williamr@2: #define NULL 0 williamr@2: #endif /* __LP64__ */ williamr@2: #endif /* _KERNEL || !__cplusplus */ williamr@2: williamr@2: #endif