public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
* uSTL config.h clash
@ 2009-08-29 16:58 Uwe Kindler
  2009-08-29 19:43 ` John Dallaway
  0 siblings, 1 reply; 7+ messages in thread
From: Uwe Kindler @ 2009-08-29 16:58 UTC (permalink / raw)
  To: John Dallaway; +Cc: ecos-devel

Hi John,

if I move the all uSTL headers except of ustl.h into an ustl 
subdirectory, then I need to touch almost all include directives in the 
ustl header and source files. I.e. in unew.c I would replace #include 
"unew.h" by #include "ustl/unew.h". Did I understand this right?

Another solution would be to rename config.h into something like 
ustlconfig.h and rename all include directives that include config.h 
into #include "ustlconfig.h". This would avoid a name clash but the ustl 
headers would still pollute the toplevel include directory.

What would you prefer?

Regards, Uwe

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: uSTL config.h clash
  2009-08-29 16:58 uSTL config.h clash Uwe Kindler
@ 2009-08-29 19:43 ` John Dallaway
  2009-08-29 20:26   ` John Dallaway
  0 siblings, 1 reply; 7+ messages in thread
From: John Dallaway @ 2009-08-29 19:43 UTC (permalink / raw)
  To: Uwe Kindler; +Cc: ecos-devel

Hi Uwe

Uwe Kindler wrote:

> if I move the all uSTL headers except of ustl.h into an ustl
> subdirectory, then I need to touch almost all include directives in the
> ustl header and source files. I.e. in unew.c I would replace #include
> "unew.h" by #include "ustl/unew.h". Did I understand this right?

I've just taken a quick look at the sources. It is indeed unfortunate
that the #includes in the various header files do not specify the ustl/
subdirectory like ustl.h does in the upstream sources. The quick fix
here is to rename config.h to something like ustlcfg.h as you suggest.
But I'm concerned that other conflicts may arise in the future.

Why does the original author make a distinction between include paths in
ustl.h and in the other ustl header files?

John Dallaway

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: uSTL config.h clash
  2009-08-29 19:43 ` John Dallaway
@ 2009-08-29 20:26   ` John Dallaway
  2009-08-29 21:25     ` Uwe Kindler
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: John Dallaway @ 2009-08-29 20:26 UTC (permalink / raw)
  Cc: Uwe Kindler, ecos-devel

Hi Uwe

John Dallaway wrote:

> Uwe Kindler wrote:
> 
>> if I move the all uSTL headers except of ustl.h into an ustl
>> subdirectory, then I need to touch almost all include directives in the
>> ustl header and source files. I.e. in unew.c I would replace #include
>> "unew.h" by #include "ustl/unew.h". Did I understand this right?
> 
> I've just taken a quick look at the sources. It is indeed unfortunate
> that the #includes in the various header files do not specify the ustl/
> subdirectory like ustl.h does in the upstream sources. The quick fix
> here is to rename config.h to something like ustlcfg.h as you suggest.
> But I'm concerned that other conflicts may arise in the future.
> 
> Why does the original author make a distinction between include paths in
> ustl.h and in the other ustl header files?

To answer my own question, I now note that the original code uses a
ustl/ symlink.

I think the correct long-term approach for eCos is to move the header
files (other than ustl.h) into include/ustl/ and to modify the source
code accordingly. This will involve changes to many files but the
changes are trivial and can be applied using a simple substitution so
this should not impact future code imports much. If you agree with this
approach, I will make the changes.

John Dallaway

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: uSTL config.h clash
  2009-08-29 20:26   ` John Dallaway
@ 2009-08-29 21:25     ` Uwe Kindler
  2009-08-29 21:30     ` Uwe Kindler
  2009-08-30 17:39     ` John Dallaway
  2 siblings, 0 replies; 7+ messages in thread
From: Uwe Kindler @ 2009-08-29 21:25 UTC (permalink / raw)
  To: John Dallaway; +Cc: ecos-devel

Hi John,

I think your proposal is the best solution for the uSTL eCos port and I 
agree that the changes are trivial. It would be great if you could do 
the changes.

Thank you.

Uwe

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: uSTL config.h clash
  2009-08-29 20:26   ` John Dallaway
  2009-08-29 21:25     ` Uwe Kindler
@ 2009-08-29 21:30     ` Uwe Kindler
  2009-08-30 17:39     ` John Dallaway
  2 siblings, 0 replies; 7+ messages in thread
From: Uwe Kindler @ 2009-08-29 21:30 UTC (permalink / raw)
  To: John Dallaway, ecos-devel

Hi John,

I forgot one last question - what about the stdint.h header file? That 
should not go into an ustl subfolder. But I think you already know this ;O)

Uwe

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: uSTL config.h clash
  2009-08-29 20:26   ` John Dallaway
  2009-08-29 21:25     ` Uwe Kindler
  2009-08-29 21:30     ` Uwe Kindler
@ 2009-08-30 17:39     ` John Dallaway
  2 siblings, 0 replies; 7+ messages in thread
From: John Dallaway @ 2009-08-30 17:39 UTC (permalink / raw)
  Cc: Uwe Kindler, eCos development list

Hi Uwe

John Dallaway wrote:

> I think the correct long-term approach for eCos is to move the header
> files (other than ustl.h) into include/ustl/ and to modify the source
> code accordingly. This will involve changes to many files but the
> changes are trivial and can be applied using a simple substitution so
> this should not impact future code imports much. If you agree with this
> approach, I will make the changes.

Done. I did not need to change many files after all. I simply added the
new include/ustl/ directory to the compiler's list of header file
directories via CYGPKG_USTL_CFLAGS_ADD. In fact, ustl.h is now closer to
the upstream version.

John Dallaway

^ permalink raw reply	[flat|nested] 7+ messages in thread

* uSTL config.h clash
@ 2009-08-28 16:33 John Dallaway
  0 siblings, 0 replies; 7+ messages in thread
From: John Dallaway @ 2009-08-28 16:33 UTC (permalink / raw)
  To: Uwe Kindler; +Cc: eCos development list

Hi Uwe

There's a problem with uSTL's config.h clashing with a header file used
by the SNMP library package. In this case, it is clear that the uSTL
header files should not be polluting the top-level include/ directory
unless this is necessary as part of the contract with application code.

I note that the upstream version of "ustl.h" looks for the other headers
in a ustl/ subdirectory. Are you able to move all the other headers
(including config.h) into include/ustl/ within the package without
disrupting the rest of the sources too much?

John Dallaway

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-08-30 17:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-29 16:58 uSTL config.h clash Uwe Kindler
2009-08-29 19:43 ` John Dallaway
2009-08-29 20:26   ` John Dallaway
2009-08-29 21:25     ` Uwe Kindler
2009-08-29 21:30     ` Uwe Kindler
2009-08-30 17:39     ` John Dallaway
  -- strict thread matches above, loose matches on Subject: below --
2009-08-28 16:33 John Dallaway

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).