Pass __KERNEL__ define (or not) to all makes to handle small differences in user-/kernel-builds

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3459 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-04-03 18:42:33 +00:00
parent 306d0d331f
commit 893d4dbbfe
5 changed files with 9 additions and 8 deletions

View file

@ -88,8 +88,8 @@ int namedapp_isavail(FAR const char *appname)
}
}
errno = ENOENT;
return -1;
set_errno(ENOENT);
return ERROR;
}
int exec_namedapp(FAR const char *appname, FAR const char *argv[])

View file

@ -167,7 +167,7 @@ int tftpget(const char *remote, const char *local, in_addr_t addr, bool binary)
if (!packet)
{
ndbg("packet memory allocation failure\n");
errno = ENOMEM;
set_errno(ENOMEM);
goto errout;
}

View file

@ -334,7 +334,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary)
if (!packet)
{
ndbg("packet memory allocation failure\n");
errno = ENOMEM;
set_errno(ENOMEM);
goto errout;
}
@ -388,7 +388,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary)
if (++retry > TFTP_RETRIES)
{
ndbg("Retry count exceeded\n");
errno = ETIMEDOUT;
set_errno(ETIMEDOUT);
goto errout_with_sd;
}
}
@ -455,7 +455,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary)
if (++retry > TFTP_RETRIES)
{
ndbg("Retry count exceeded\n");
errno = ETIMEDOUT;
set_errno(ETIMEDOUT);
goto errout_with_sd;
}
}

View file

@ -431,7 +431,7 @@ int wget(FAR const char *url, FAR char *buffer, int buflen,
if (ret != 0)
{
ndbg("Malformed HTTP URL: %s\n", url);
errno = -ret;
set_errno(-ret);
return ERROR;
}
nvdbg("hostname='%s' filename='%s'\n", ws.hostname, ws.filename);
@ -576,7 +576,7 @@ int wget(FAR const char *url, FAR char *buffer, int buflen,
return OK;
errout_with_errno:
errno = -ret;
set_errno(-ret);
errout:
close(sockfd);
return ERROR;

View file

@ -45,6 +45,7 @@
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <errno.h>
#ifdef CONFIG_NSH_CONSOLE
# include <stdio.h>