1 //==========================================================================
2 //####ECOSGPLCOPYRIGHTBEGIN####
3 // -------------------------------------------
4 // This file is part of eCos, the Embedded Configurable Operating System.
5 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
7 // eCos is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU General Public License as published by the Free
9 // Software Foundation; either version 2 or (at your option) any later version.
11 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
12 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 // You should have received a copy of the GNU General Public License along
17 // with eCos; if not, write to the Free Software Foundation, Inc.,
18 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
20 // As a special exception, if other files instantiate templates or use macros
21 // or inline functions from this file, or you compile this file and link it
22 // with other works to produce a work based on this file, this file does not
23 // by itself cause the resulting work to be covered by the GNU General Public
24 // License. However the source code for this file must still be made available
25 // in accordance with section (3) of the GNU General Public License.
27 // This exception does not invalidate any other reasons why a work based on
28 // this file might be covered by the GNU General Public License.
29 // -------------------------------------------
30 //####ECOSGPLCOPYRIGHTEND####
31 //==========================================================================
34 * Copyright (c) 2001, Swedish Institute of Computer Science.
35 * All rights reserved.
37 * Redistribution and use in source and binary forms, with or without
38 * modification, are permitted provided that the following conditions
40 * 1. Redistributions of source code must retain the above copyright
41 * notice, this list of conditions and the following disclaimer.
42 * 2. Redistributions in binary form must reproduce the above copyright
43 * notice, this list of conditions and the following disclaimer in the
44 * documentation and/or other materials provided with the distribution.
45 * 3. Neither the name of the Institute nor the names of its contributors
46 * may be used to endorse or promote products derived from this software
47 * without specific prior written permission.
49 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
50 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
51 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
52 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
53 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
55 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
56 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
57 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
58 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
61 * This file is part of the lwIP TCP/IP stack.
63 * Author: Adam Dunkels <adam@sics.se>
70 #include <cyg/error/codes.h>
71 //while EFAULT should have no meaning in eCos since there are no address spaces
72 //it is defined here because set/getsockopt in lwIP use it.
75 //found no better place for this prototype
78 //#define LWIP_PROVIDE_ERRNO
79 #include <cyg/infra/cyg_type.h>
80 #if (CYG_BYTEORDER == CYG_LSBFIRST)
81 #define BYTE_ORDER LITTLE_ENDIAN
83 #define BYTE_ORDER BIG_ENDIAN
87 typedef unsigned char u8_t;
88 typedef signed char s8_t;
89 typedef unsigned short u16_t;
90 typedef signed short s16_t;
91 typedef unsigned long u32_t;
92 typedef signed long s32_t;
93 typedef unsigned long mem_ptr_t;
102 #define PACK_STRUCT_FIELD(x) x __attribute__((packed))
103 #define PACK_STRUCT_STRUCT __attribute__((packed))
104 #define PACK_STRUCT_BEGIN
105 #define PACK_STRUCT_END
107 #include <cyg/infra/diag.h>
108 #include <cyg/infra/cyg_ass.h>
109 #define LWIP_PLATFORM_DIAG(x) {diag_printf x;}
110 #define LWIP_PLATFORM_ASSERT(x) {CYG_FAIL(x);}
112 #define SYS_ARCH_DECL_PROTECT(x)
113 #define SYS_ARCH_PROTECT(x)
114 #define SYS_ARCH_UNPROTECT(x)
116 #endif /* __ARCH_CC_H__ */