Allow minimal unix target to build in cygwin (but not necessarily run).

Applied a patch from Marc Boucher which has the following changes:

1) Fixed sys_arch.txt documentation to have new return type from
   sys_thread_new.

2) Removed unnecessary casts on calling sys_timeout() in certain files.

3) Removed some unnecessary break statements after return statements.

4) Changed sys_timeout_remove() to sys_untimeout().

5) Added some forgotten #ifndef SYS_LIGHTWEIGHT_PROT to memp.c

6) Changed LWIP_DIAG and LWIP_PLATFORM_ASSERT to have do while().
This commit is contained in:
davidhaas 2003-02-18 19:27:08 +00:00
parent 77f2c43b58
commit f87520e049
3 changed files with 11 additions and 8 deletions

View File

@ -30,7 +30,7 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: cc.h,v 1.4 2003/02/12 22:02:02 davidhaas Exp $
* $Id: cc.h,v 1.5 2003/02/18 19:27:08 davidhaas Exp $
*/
#ifndef __CC_H__
#define __CC_H__
@ -99,12 +99,12 @@ typedef struct _types_fd_set {
#include <stdlib.h>
/* Plaform specific diagnostic output */
#ifndef LWIP_PLATFORM_DIAG
#define LWIP_PLATFORM_DIAG(x) {printf x;}
#define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0)
#endif
#ifndef LWIP_PLATFORM_ASSERT
#define LWIP_PLATFORM_ASSERT(x) {printf("Assertion \"%s\" failed at line %d in %s\n", \
x, __LINE__, __FILE__); fflush(NULL); abort();}
#define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \
x, __LINE__, __FILE__); fflush(NULL); abort();} while(0)
#endif

View File

@ -60,8 +60,8 @@ typedef u32_t mem_ptr_t;
#include <stdio.h>
#include <stdlib.h>
/* Plaform specific diagnostic output */
#define LWIP_PLATFORM_DIAG(x) {printf x;}
#define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0)
#define LWIP_PLATFORM_ASSERT(x) {printf("Assertion \"%s\" failed at line %d in %s\n", \
x, __LINE__, __FILE__); fflush(NULL); abort();}
#define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \
x, __LINE__, __FILE__); fflush(NULL); abort();} while(0)
#endif /* __ARCH_CC_H__ */

View File

@ -31,7 +31,10 @@
CCDEP=gcc
CC=gcc
CFLAGS=-g -Wall -DIPv4 -Os -fpack-struct
#To Compile for linux: make ARCH=linux
#To Compile for cygwin: make ARCH=cygwin
ARCH=unix
CFLAGS=-g -Wall -D$(ARCH) -DIPv4 -Os -fpack-struct
ARFLAGS=rs
CONTRIBDIR=../../../..