aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2006-07-19 22:27:49 +0000
committerDan Fandrich <dan@coneharvesters.com>2006-07-19 22:27:49 +0000
commit684245d6cecd793ca44cf23e6206b6a2a09f046e (patch)
treee732b12cdf3787d6cdcd5d056859c701c4e5f3f7
parentd157c292693972658d138475276dca85df77539b (diff)
Changes to support building for eCos 1.3.1. This has been tested with
file: URLs only.
-rw-r--r--configure.ac15
-rw-r--r--lib/setup.h2
-rw-r--r--lib/timeval.h3
-rw-r--r--src/setup.h2
4 files changed, 19 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 55a442f31..e794273ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -375,6 +375,21 @@ fi
if test "$HAVE_GETHOSTBYNAME" != "1"
then
+ dnl This is for eCos with a stubbed DNS implementation
+ AC_MSG_CHECKING([for gethostbyname for eCos])
+ AC_TRY_LINK([
+#include <stdio.h>
+#include <netdb.h>],
+ [gethostbyname("www.dummysite.com");],
+ [ dnl worked!
+ AC_MSG_RESULT([yes])
+ HAVE_GETHOSTBYNAME="1"],
+ AC_MSG_RESULT(no)
+ )
+fi
+
+if test "$HAVE_GETHOSTBYNAME" != "1"
+then
dnl gethostbyname in the net lib - for BeOS
AC_CHECK_LIB(net, gethostbyname,
[HAVE_GETHOSTBYNAME="1"
diff --git a/lib/setup.h b/lib/setup.h
index ca822c396..f89c82e5f 100644
--- a/lib/setup.h
+++ b/lib/setup.h
@@ -109,7 +109,7 @@
#define FALSE 0
#endif
-#if !defined(__cplusplus) && !defined(__BEOS__) && !defined(typedef_bool)
+#if !defined(__cplusplus) && !defined(__BEOS__) && !defined(__ECOS) && !defined(typedef_bool)
typedef unsigned char bool;
#define typedef_bool
#endif
diff --git a/lib/timeval.h b/lib/timeval.h
index f136a56d9..6be5e4276 100644
--- a/lib/timeval.h
+++ b/lib/timeval.h
@@ -38,7 +38,8 @@
#ifndef HAVE_GETTIMEOFDAY
#if !defined(_WINSOCKAPI_) && !defined(__MINGW32__) && !defined(_AMIGASF) && \
- !defined(__LCC__) && !defined(__WATCOMC__) && !defined(__POCC__)
+ !defined(__LCC__) && !defined(__WATCOMC__) && !defined(__POCC__) && \
+ !defined(__ECOS)
struct timeval {
long tv_sec;
long tv_usec;
diff --git a/src/setup.h b/src/setup.h
index e911922c9..78cb11593 100644
--- a/src/setup.h
+++ b/src/setup.h
@@ -116,7 +116,7 @@
#define FALSE 0
#endif
-#if !defined(__cplusplus) && !defined(__BEOS__) && !defined(typedef_bool)
+#if !defined(__cplusplus) && !defined(__BEOS__) && !defined(__ECOS) && !defined(typedef_bool)
typedef unsigned char bool;
#define typedef_bool
#endif