From 65ce0cd0a2a190473e2636939d35b996cb4ce008 Mon Sep 17 00:00:00 2001 From: aethaniel Date: Wed, 1 Jun 2011 01:53:32 +0200 Subject: [PATCH] Modified syscalls.* to fit CPP compilation --- .../tools/libboard_sam3s-ek/include/syscalls.h | 14 ++++++++++---- hardware/tools/libboard_sam3s-ek/source/syscalls.c | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/hardware/tools/libboard_sam3s-ek/include/syscalls.h b/hardware/tools/libboard_sam3s-ek/include/syscalls.h index a4e38656c..d78415946 100644 --- a/hardware/tools/libboard_sam3s-ek/include/syscalls.h +++ b/hardware/tools/libboard_sam3s-ek/include/syscalls.h @@ -37,8 +37,6 @@ /*---------------------------------------------------------------------------- * Headers *----------------------------------------------------------------------------*/ - - #include #include #include @@ -47,10 +45,13 @@ /*---------------------------------------------------------------------------- * Exported functions *----------------------------------------------------------------------------*/ +#ifdef __cplusplus + extern "C" { +#endif -extern caddr_t _sbrk ( int incr ) ; +extern caddr_t _sbrk( int incr ) ; -extern int link( char *old, char *new ) ; +extern int link( char *cOld, char *cNew ) ; extern int _close( int file ) ; @@ -63,3 +64,8 @@ extern int _lseek( int file, int ptr, int dir ) ; extern int _read(int file, char *ptr, int len) ; extern int _write( int file, char *ptr, int len ) ; + +#ifdef __cplusplus +} +#endif + diff --git a/hardware/tools/libboard_sam3s-ek/source/syscalls.c b/hardware/tools/libboard_sam3s-ek/source/syscalls.c index c6a9f22c9..dd2dff8d1 100644 --- a/hardware/tools/libboard_sam3s-ek/source/syscalls.c +++ b/hardware/tools/libboard_sam3s-ek/source/syscalls.c @@ -77,7 +77,7 @@ extern caddr_t _sbrk ( int incr ) return (caddr_t) prev_heap ; } -extern int link( char *old, char *new ) +extern int link( char *cOld, char *cNew ) { return -1 ; }