forked from nuttx/nuttx-update
Fixed for 8051 w/SDCC compiler
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@454 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
932463210f
commit
98c638416d
9 changed files with 44 additions and 13 deletions
|
@ -284,3 +284,6 @@
|
|||
* NSH ifconfig command now shows uIP status was well (examples/nsh)
|
||||
|
||||
0.3.6 2007-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Changes for use with SDCC compiler
|
||||
|
||||
|
|
|
@ -695,6 +695,7 @@ Other memory:
|
|||
<pre><ul>
|
||||
0.3.6 2007-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Changes for use with SDCC compiler
|
||||
</pre></ul>
|
||||
|
||||
<table width ="100%">
|
||||
|
|
2
TODO
2
TODO
|
@ -18,7 +18,7 @@ NuttX TODO List (Last updated December 13, 2007)
|
|||
(1) ARM/DM320 (arch/arm/src/dm320/)
|
||||
(2) ARM/LPC214x (arch/arm/src/lpc214x/)
|
||||
(3) pjrc-8052 / MCS51 (arch/pjrc-8051/)
|
||||
|
||||
(0) z80 (arch/z80/)
|
||||
|
||||
o Task/Scheduler (sched/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -38,10 +38,13 @@
|
|||
************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sched.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "clock_internal.h"
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
|
|
@ -91,15 +91,28 @@ EXTERN uint16 htons (uint16 hs);
|
|||
|
||||
/* Functions to manipulate address representations */
|
||||
|
||||
EXTERN int inet_aton(const char *cp, struct in_addr *inp);
|
||||
EXTERN in_addr_t inet_addr(const char *cp);
|
||||
EXTERN in_addr_t inet_network(const char *cp);
|
||||
EXTERN char *inet_ntoa(struct in_addr in);
|
||||
EXTERN struct in_addr inet_makeaddr(in_addr_t net, in_addr_t host);
|
||||
EXTERN int inet_aton(FAR const char *cp, FAR struct in_addr *inp);
|
||||
EXTERN in_addr_t inet_addr(FAR const char *cp);
|
||||
EXTERN in_addr_t inet_network(FAR const char *cp);
|
||||
|
||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
||||
EXTERN FAR char *inet_ntoa(struct in_addr in);
|
||||
EXTERN in_addr_t inet_lnaof(struct in_addr in);
|
||||
EXTERN in_addr_t inet_netof(struct in_addr in);
|
||||
EXTERN int inet_pton(int af, const char *cp, void *buf);
|
||||
EXTERN const char *inet_ntop(int af, const void *cp, char *buf, socklen_t len);
|
||||
#else
|
||||
EXTERN FAR char *_inet_ntoa(in_addr_t in);
|
||||
# define inet_ntoa(in) _inet_ntoa(in.s_addr);
|
||||
|
||||
EXTERN in_addr_t _inet_lnaof(in_addr_t in);
|
||||
# define inet_lnaof(in) _inet_lnaof(in.s_addr);
|
||||
|
||||
EXTERN in_addr_t _inet_netof(in_addr_t in);
|
||||
# define inet_netof(in) _inet_netof(in.s_addr);
|
||||
#endif
|
||||
EXTERN struct in_addr inet_makeaddr(in_addr_t net, in_addr_t host);
|
||||
|
||||
EXTERN int inet_pton(int af, FAR const char *cp, FAR void *buf);
|
||||
EXTERN const char *inet_ntop(int af, FAR const void *cp, FAR char *buf, socklen_t len);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -105,8 +105,8 @@ EXTERN int rand(void);
|
|||
|
||||
#ifndef CONFIG_DISABLE_ENIVRON
|
||||
EXTERN FAR char **get_environ_ptr( void );
|
||||
EXTERN FAR char *getenv(const char *name);
|
||||
EXTERN int putenv(char *string);
|
||||
EXTERN FAR char *getenv(FAR const char *name);
|
||||
EXTERN int putenv(FAR char *string);
|
||||
EXTERN int clearenv(void);
|
||||
EXTERN int setenv(const char *name, const char *value, int overwrite);
|
||||
EXTERN int unsetenv(const char *name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/************************************************************
|
||||
* types.h
|
||||
* sys/types.h
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
|
|
@ -96,7 +96,7 @@ static const char environment[] = "";
|
|||
*
|
||||
************************************************************/
|
||||
|
||||
char *getenv(const char *name)
|
||||
FAR char *getenv(FAR const char *name)
|
||||
{
|
||||
const char *penv = environment;
|
||||
int size = sizeof(environment);
|
||||
|
|
|
@ -56,10 +56,21 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
char *inet_ntoa(struct in_addr in)
|
||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
||||
FAR char *inet_ntoa(struct in_addr in)
|
||||
{
|
||||
static char buffer[18];
|
||||
char *ptr = (char*)&in.s_addr;
|
||||
sprintf(buffer, "%d.%d.%d.%d", ptr[0], ptr[1], ptr[2], ptr[3]);
|
||||
return buffer;
|
||||
}
|
||||
#else
|
||||
FAR char *_inet_ntoa(in_addr_t in)
|
||||
{
|
||||
static char buffer[18];
|
||||
FAR char *ptr = (FAR char*)∈
|
||||
sprintf(buffer, "%d.%d.%d.%d", ptr[0], ptr[1], ptr[2], ptr[3]);
|
||||
return buffer;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue