Fix build problems with different configuratin options

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2004 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2009-08-02 12:56:52 +00:00
parent 6afa5ccf72
commit 64777d8eaf
4 changed files with 87 additions and 65 deletions
configs/ntosd-dm320/src
lib
netutils/thttpd

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* board/up_network.c * board/up_network.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -43,11 +43,15 @@
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <nuttx/fs.h>
#if CONFIG_NFILE_STREAMS > 0
/**************************************************************************** /****************************************************************************
* Global Functions * Global Functions
****************************************************************************/ ****************************************************************************/
int ileno(FAR FILE *stream) int fileno(FAR FILE *stream)
{ {
int ret = -1; int ret = -1;
if (stream) if (stream)
@ -62,4 +66,5 @@ int ileno(FAR FILE *stream)
} }
return ret; return ret;
} }
#endif /* CONFIG_NFILE_STREAMS */

@ -36,6 +36,13 @@
#ifndef __NETUTILS_THTTPD_VERSION_H #ifndef __NETUTILS_THTTPD_VERSION_H
#define __NETUTILS_THTTPD_VERSION_H #define __NETUTILS_THTTPD_VERSION_H
/****************************************************************************
* Included files
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/compiler.h>
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
@ -63,7 +70,9 @@
/* Server IP address (no host name) */ /* Server IP address (no host name) */
# ifndef CONFIG_THTTPD_IPADDR # ifndef CONFIG_THTTPD_IPADDR
# ifdef CONFIG_CPP_HAVE_WARNING
# warning "CONFIG_THTTPD_IPADDR not defined" # warning "CONFIG_THTTPD_IPADDR not defined"
# endif
# define CONFIG_THTTPD_IPADDR (10<<24|0<<16|0<<8|2) # define CONFIG_THTTPD_IPADDR (10<<24|0<<16|0<<8|2)
# endif # endif
@ -80,7 +89,9 @@
# endif # endif
# ifndef CONFIG_THTTPD_CGI_PATH # ifndef CONFIG_THTTPD_CGI_PATH
# ifdef CONFIG_CPP_HAVE_WARNING
# warning "CONFIG_THTTPD_CGI_PATH not defined" # warning "CONFIG_THTTPD_CGI_PATH not defined"
# endif
# define CONFIG_THTTPD_CGI_PATH "/mnt/www/cgi-bin" # define CONFIG_THTTPD_CGI_PATH "/mnt/www/cgi-bin"
# endif # endif
@ -197,7 +208,9 @@
*/ */
#else /* Dependencies not provided */ #else /* Dependencies not provided */
# ifdef CONFIG_CPP_HAVE_WARNING
# warning "THTTPD not built because dependencies not selected in configuration" # warning "THTTPD not built because dependencies not selected in configuration"
# endif
#endif /* Dependencies not provided */ #endif /* Dependencies not provided */
#endif /* __NETUTILS_THTTPD_VERSION_H */ #endif /* __NETUTILS_THTTPD_VERSION_H */

@ -49,6 +49,9 @@
#include <time.h> #include <time.h>
#include "config.h"
#ifdef CONFIG_THTTPD
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
@ -309,5 +312,6 @@ extern int httpd_read(int fd, const void *buf, size_t nbytes);
extern int httpd_write(int fd, const void *buf, size_t nbytes); extern int httpd_write(int fd, const void *buf, size_t nbytes);
#endif /* CONFIG_THTTPD */
#endif /* __NETUTILS_THTTPD_LIBHTTPD_H */ #endif /* __NETUTILS_THTTPD_LIBHTTPD_H */