Fix apps/netutils/webclient build problem
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5317 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
4c2e48e07f
commit
ddc2a64224
@ -43,7 +43,6 @@ config EXAMPLES_OSTEST_RR_RANGE
|
|||||||
int "Round-robin test - end of search range"
|
int "Round-robin test - end of search range"
|
||||||
default 10000
|
default 10000
|
||||||
range 1 32767
|
range 1 32767
|
||||||
depends on RR_INTERVAL > 0
|
|
||||||
---help---
|
---help---
|
||||||
During round-robin scheduling test two threads are created. Each of the threads
|
During round-robin scheduling test two threads are created. Each of the threads
|
||||||
searches for prime numbers in the configurable range, doing that configurable
|
searches for prime numbers in the configurable range, doing that configurable
|
||||||
@ -57,7 +56,6 @@ config EXAMPLES_OSTEST_RR_RUNS
|
|||||||
int "Round-robin test - number of runs"
|
int "Round-robin test - number of runs"
|
||||||
default 10
|
default 10
|
||||||
range 1 32767
|
range 1 32767
|
||||||
depends on RR_INTERVAL > 0
|
|
||||||
---help---
|
---help---
|
||||||
During round-robin scheduling test two threads are created. Each of the threads
|
During round-robin scheduling test two threads are created. Each of the threads
|
||||||
searches for prime numbers in the configurable range, doing that configurable
|
searches for prime numbers in the configurable range, doing that configurable
|
||||||
|
@ -109,12 +109,14 @@ extern "C" {
|
|||||||
#define EXTERN extern
|
#define EXTERN extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WGET_USE_URLENCODE
|
||||||
EXTERN char *web_post_str(FAR char *buffer, int *size, FAR char *name,
|
EXTERN char *web_post_str(FAR char *buffer, int *size, FAR char *name,
|
||||||
FAR char *value);
|
FAR char *value);
|
||||||
EXTERN char *web_posts_str(FAR char *buffer, int *size, FAR char **name,
|
EXTERN char *web_posts_str(FAR char *buffer, int *size, FAR char **name,
|
||||||
FAR char **value, int len);
|
FAR char **value, int len);
|
||||||
EXTERN int web_post_strlen(FAR char *name, FAR char *value);
|
EXTERN int web_post_strlen(FAR char *name, FAR char *value);
|
||||||
EXTERN int web_posts_strlen(FAR char **name, FAR char **value, int len);
|
EXTERN int web_posts_strlen(FAR char **name, FAR char **value, int len);
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: wget
|
* Name: wget
|
||||||
|
@ -83,6 +83,9 @@
|
|||||||
# if defined(CONFIG_CODECS_BASE64)
|
# if defined(CONFIG_CODECS_BASE64)
|
||||||
# include <apps/netutils/base64.h>
|
# include <apps/netutils/base64.h>
|
||||||
# endif
|
# endif
|
||||||
|
#else
|
||||||
|
# undef CONFIG_CODECS_URLCODE
|
||||||
|
# undef CONFIG_CODECS_BASE64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_NSH_WGET_USERAGENT
|
#ifndef CONFIG_NSH_WGET_USERAGENT
|
||||||
@ -621,6 +624,7 @@ errout:
|
|||||||
* Name: web_post_str
|
* Name: web_post_str
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef WGET_USE_URLENCODE
|
||||||
char *web_post_str(FAR char *buffer, int *size, FAR char *name,
|
char *web_post_str(FAR char *buffer, int *size, FAR char *name,
|
||||||
FAR char *value)
|
FAR char *value)
|
||||||
{
|
{
|
||||||
@ -631,20 +635,24 @@ char *web_post_str(FAR char *buffer, int *size, FAR char *name,
|
|||||||
*size = buffer - dst;
|
*size = buffer - dst;
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: web_post_strlen
|
* Name: web_post_strlen
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef WGET_USE_URLENCODE
|
||||||
int web_post_strlen(FAR char *name, FAR char *value)
|
int web_post_strlen(FAR char *name, FAR char *value)
|
||||||
{
|
{
|
||||||
return strlen(name) + urlencode_len(value,strlen(value)) + 1;
|
return strlen(name) + urlencode_len(value,strlen(value)) + 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: web_posts_str
|
* Name: web_posts_str
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef WGET_USE_URLENCODE
|
||||||
char *web_posts_str(FAR char *buffer, int *size, FAR char **name,
|
char *web_posts_str(FAR char *buffer, int *size, FAR char **name,
|
||||||
FAR char **value, int len)
|
FAR char **value, int len)
|
||||||
{
|
{
|
||||||
@ -667,11 +675,13 @@ char *web_posts_str(FAR char *buffer, int *size, FAR char **name,
|
|||||||
*size=buffer-dst;
|
*size=buffer-dst;
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: web_posts_strlen
|
* Name: web_posts_strlen
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef WGET_USE_URLENCODE
|
||||||
int web_posts_strlen(FAR char **name, FAR char **value, int len)
|
int web_posts_strlen(FAR char **name, FAR char **value, int len)
|
||||||
{
|
{
|
||||||
int wlen = 0;
|
int wlen = 0;
|
||||||
@ -684,6 +694,7 @@ int web_posts_strlen(FAR char **name, FAR char **value, int len)
|
|||||||
|
|
||||||
return wlen + len - 1;
|
return wlen + len - 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: wget
|
* Name: wget
|
||||||
@ -720,7 +731,7 @@ int wget(FAR const char *url, FAR char *buffer, int buflen,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: web_posts_strlen
|
* Name: wget_post
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int wget_post(FAR const char *url, FAR const char *posts, FAR char *buffer,
|
int wget_post(FAR const char *url, FAR const char *posts, FAR char *buffer,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user