public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Christian Jaeger <christian@jaeger.mine.nu>
To: ecos-patches@ecos.sourceware.org
Cc: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] [PATCH] Fix includes for <string.h> and PATH_MAX
Date: Mon, 11 Aug 2008 21:40:00 -0000	[thread overview]
Message-ID: <097b0aaaaabc6116f35cc8b18479cf0b8c848863.1218489651.git.christian-novo@jaeger.mine.nu> (raw)
In-Reply-To: <48A0A081.80502@jaeger.mine.nu>

[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]


This was required for me to build the configtool (using
host/configure) on Debian testing (Lenny) with gcc 4.3.1

Probably there are nicer places to put those includes, though.
---
PS. gcc 4.2.4-3 is also installed, but the default compiler "gcc" is
set to 4.3.1-8.

PS.2: note that I also had to change acsupport/config.sub to

    #! /bin/sh
    echo "$1"

as I'm on a x86_64 machine and it didn't recognize the string.

PS.3: there were also tons of warnings which I didn't care about.

PS.4: tell me if you can handle this kind of patches (there are some
knobs to tweak)


 host/infra/assert.cxx                              |    4 ++++
 host/libcdl/build.cxx                              |    4 ++++
 host/libcdl/cdlmisc.cxx                            |    3 +++
 host/libcdl/parse.cxx                              |    3 +++
 .../configtool/standalone/common/cdl_exec.cxx      |    3 +++
 .../configtool/standalone/common/ecosconfig.cxx    |    1 +
 6 files changed, 18 insertions(+), 0 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 097b0aaaaabc6116f35cc8b18479cf0b8c848863.diff --]
[-- Type: text/x-patch; name="097b0aaaaabc6116f35cc8b18479cf0b8c848863.diff", Size: 2486 bytes --]

diff --git a/host/infra/assert.cxx b/host/infra/assert.cxx
index 27922a5..5892de1 100644
--- a/host/infra/assert.cxx
+++ b/host/infra/assert.cxx
@@ -68,6 +68,10 @@ extern "C" {
 }
 #endif
 
+#if defined(HAVE_MKSTEMP) && !defined(_MSC_VER)
+#include <string.h> // strcpy
+#endif
+
 // These are needed for the table of callbacks.
 #include <utility>
 #include <iterator>
diff --git a/host/libcdl/build.cxx b/host/libcdl/build.cxx
index 551c3de..0a09fd9 100644
--- a/host/libcdl/build.cxx
+++ b/host/libcdl/build.cxx
@@ -58,6 +58,10 @@
 // the class definitions rely on these headers.
 #include <cdlcore.hxx>
 
+// strncmp, strlen, strcpy
+#include <string.h>
+
+
 //}}}
 
 //{{{  Statics                          
diff --git a/host/libcdl/cdlmisc.cxx b/host/libcdl/cdlmisc.cxx
index 8366629..9c94539 100644
--- a/host/libcdl/cdlmisc.cxx
+++ b/host/libcdl/cdlmisc.cxx
@@ -76,6 +76,9 @@
 // For access to DBL_DIG
 #include <cfloat>
 
+// strlen, strncmp:
+#include <string.h>
+
 //}}}
 
 //{{{  Cdl::is_valid_xxx()                                      
diff --git a/host/libcdl/parse.cxx b/host/libcdl/parse.cxx
index db9ed08..51f90fa 100644
--- a/host/libcdl/parse.cxx
+++ b/host/libcdl/parse.cxx
@@ -59,6 +59,9 @@
 // the class definitions rely on these headers.
 #include <cdlcore.hxx>
 
+// strcmp, strncmp:
+#include <string.h>
+
 //}}}
 
 //{{{  Description                              
diff --git a/host/tools/configtool/standalone/common/cdl_exec.cxx b/host/tools/configtool/standalone/common/cdl_exec.cxx
index 8ba066e..40aafb7 100644
--- a/host/tools/configtool/standalone/common/cdl_exec.cxx
+++ b/host/tools/configtool/standalone/common/cdl_exec.cxx
@@ -53,6 +53,9 @@
 #include "build.hxx"
 #include "cdl_exec.hxx"
 
+// on Linux (Debian): PATH_MAX:
+#include <linux/limits.h>
+
 // ----------------------------------------------------------------------------
 bool cdl_exec::quiet            = false;
 bool cdl_exec::verbose          = false;
diff --git a/host/tools/configtool/standalone/common/ecosconfig.cxx b/host/tools/configtool/standalone/common/ecosconfig.cxx
index 8e27780..b02d6ff 100644
--- a/host/tools/configtool/standalone/common/ecosconfig.cxx
+++ b/host/tools/configtool/standalone/common/ecosconfig.cxx
@@ -51,6 +51,7 @@
 #endif
 #include "cdl_exec.hxx"
 #include "ecosconfig.hxx"
+#include <string.h> // strcmp, strncmp
 
 #define TOOL_VERSION "2.net"
 #define TOOL_COPYRIGHT "Copyright (c) 2002 Red Hat, Inc.\nCopyright (c) 2004-2006 eCosCentric Limited"


[-- Attachment #3: Type: text/plain, Size: 148 bytes --]

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

      reply	other threads:[~2008-08-11 21:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-11 12:36 [ECOS] Installation on Debian on x86_64 Christian Jaeger
2008-08-11 13:02 ` [ECOS] unable to locate Tcl header file tcl.h Christian Jaeger
2008-08-11 14:29   ` Sergei Gavrikov
2008-08-11 15:24     ` Christian Jaeger
2008-08-11 17:07       ` Sergei Gavrikov
2008-08-11 17:34         ` Christian Jaeger
2008-08-11 18:06           ` Andrew Lunn
2008-08-11 20:27             ` Christian Jaeger
2008-08-11 21:40               ` Christian Jaeger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=097b0aaaaabc6116f35cc8b18479cf0b8c848863.1218489651.git.christian-novo@jaeger.mine.nu \
    --to=christian@jaeger.mine.nu \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=ecos-patches@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).