Implement cfs API on preprocessor level using POSIX functions..

This commit is contained in:
oliverschmidt 2007-12-23 15:29:19 +00:00
parent 1ecf65d6c2
commit 5592b1df6c
4 changed files with 15 additions and 18 deletions

View File

@ -30,7 +30,7 @@
* *
* Author: Oliver Schmidt <ol.sc@web.de> * Author: Oliver Schmidt <ol.sc@web.de>
* *
* @(#)$Id: 6502def.h,v 1.6 2007/12/23 13:55:38 oliverschmidt Exp $ * @(#)$Id: 6502def.h,v 1.7 2007/12/23 15:29:19 oliverschmidt Exp $
*/ */
#ifndef __6502DEF_H__ #ifndef __6502DEF_H__
@ -38,6 +38,8 @@
#include <ctype.h> #include <ctype.h>
#include <conio.h> #include <conio.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdint.h> #include <stdint.h>
/* These names are deprecated, use C99 names. */ /* These names are deprecated, use C99 names. */
@ -104,4 +106,12 @@ typedef unsigned short uip_stats_t;
#define ctk_arch_getkey cgetc #define ctk_arch_getkey cgetc
#define ctk_arch_isprint isprint #define ctk_arch_isprint isprint
#define CFS_READ (O_RDONLY)
#define CFS_WRITE (O_CREAT | O_TRUNC | O_RDWR)
#define cfs_open open
#define cfs_close close
#define cfs_read read
#define cfs_write write
#endif /* __6502DEF_H__ */ #endif /* __6502DEF_H__ */

View File

@ -30,7 +30,7 @@
# #
# Author: Oliver Schmidt <ol.sc@web.de> # Author: Oliver Schmidt <ol.sc@web.de>
# #
# $Id: Makefile.6502,v 1.24 2007/12/21 01:36:35 oliverschmidt Exp $ # $Id: Makefile.6502,v 1.25 2007/12/23 15:29:19 oliverschmidt Exp $
# #
ifndef CONTIKI ifndef CONTIKI
@ -60,8 +60,7 @@ CONTIKI_CPU_SOURCEFILES = log.c error.c config.c clock.c ctk-mouse.c \
mtarch.c mtarch-asm.S lc-asm.S \ mtarch.c mtarch-asm.S lc-asm.S \
uip_arch.c ethernet-drv.c ethernet.c uip_arch.c ethernet-drv.c ethernet.c
CONTIKI_SOURCEFILES += cfs-posix.c cfs-posix-dir.c \ CONTIKI_SOURCEFILES += $(CTK) ctk-conio.c petsciiconv.c cfs-posix-dir.c \
$(CTK) ctk-conio.c petsciiconv.c \
$(CONTIKI_TARGET_SOURCEFILES) $(CONTIKI_CPU_SOURCEFILES) $(CONTIKI_TARGET_SOURCEFILES) $(CONTIKI_CPU_SOURCEFILES)
TARGET_STARTFILES = $(TARGET).o --start-group TARGET_STARTFILES = $(TARGET).o --start-group

View File

@ -30,7 +30,7 @@
* *
* Author: Oliver Schmidt <ol.sc@web.de> * Author: Oliver Schmidt <ol.sc@web.de>
* *
* $Id: contiki-main.c,v 1.13 2007/12/23 12:35:38 oliverschmidt Exp $ * $Id: contiki-main.c,v 1.14 2007/12/23 15:29:51 oliverschmidt Exp $
*/ */
#include "contiki-net.h" #include "contiki-net.h"
@ -58,12 +58,6 @@ PROCINIT(&etimer_process,
void clock_update(void); void clock_update(void);
/*-----------------------------------------------------------------------------------*/
long int
lseek(void)
{
return -1;
}
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
void void
main(void) main(void)

View File

@ -30,7 +30,7 @@
* *
* Author: Oliver Schmidt <ol.sc@web.de> * Author: Oliver Schmidt <ol.sc@web.de>
* *
* $Id: contiki-main.c,v 1.14 2007/12/23 12:35:03 oliverschmidt Exp $ * $Id: contiki-main.c,v 1.15 2007/12/23 15:30:22 oliverschmidt Exp $
*/ */
#include <string.h> #include <string.h>
@ -58,12 +58,6 @@ PROCINIT(&etimer_process,
RESOLV_PROCESS RESOLV_PROCESS
&tcpip_process); &tcpip_process);
/*-----------------------------------------------------------------------------------*/
long int
lseek(void)
{
return -1;
}
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
void * void *
opendir(void) opendir(void)