00001 /* 00002 * $Id: error.h 3359 2006-09-05 10:21:46Z riedel $ 00003 * 00004 * Copyright (c) 2004 00005 * Telecooperation Office (TecO), Universitaet Karlsruhe (TH), Germany. 00006 * All rights reserved. 00007 * 00008 * Redistribution and use in source and binary forms, with or without 00009 * modification, are permitted provided that the following conditions 00010 * are met: 00011 * 1. Redistributions of source code must retain the above copyright 00012 * notice, this list of conditions and the following disclaimer. 00013 * 2. Redistributions in binary form must reproduce the above 00014 * copyright notice, this list of conditions and the following 00015 * disclaimer in the documentation and/or other materials provided 00016 * with the distribution. 00017 * 3. Neither the name of the Universitaet Karlsruhe (TH) nor the names 00018 * of its contributors may be used to endorse or promote products 00019 * derived from this software without specific prior written 00020 * permission. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00023 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00024 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00025 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00026 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00027 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00028 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00029 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00030 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00031 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00032 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 * 00034 * Author(s): Max Laier <mlaier@freebsd.org> 00035 */ 00036 00037 #ifndef _ERROR_H_ 00038 #define _ERROR_H_ 00039 00040 #include <errno.h> 00041 00042 LIBPARTICLE_API int * _p_errno(void); 00043 #ifdef _WIN32 00044 #define p_errno (*_p_errno()) 00045 #else 00046 #define p_errno errno 00047 #endif 00048 00049 #ifndef ELAST 00050 #define ELAST 0xe0 00051 #endif 00052 00053 #ifndef EADDRNOTAVAIL 00054 #define EADDRNOTAVAIL (ELAST + 1) 00055 #endif 00056 00057 #ifndef ENOTCONN 00058 #define ENOTCONN (ELAST + 2) 00059 #endif 00060 00061 #ifndef EPROTO 00062 #define EPROTO (ELAST + 3) 00063 #endif 00064 00065 #define ETUPLENOTFOUND (ELAST + 4) 00066 00067 #endif /* _ERROR_H_ */