There is very little that should need porting, especially if you only need
protobuf-lite.  The "lite" subset avoids depending even on
open()/read()/write().

If your platform does not have pthreads, you will have to edit some code in
google/protobuf/stubs/common.{h,cc} and google/protobuf/stubs/once.{h,cc} to
use whatever threading primitives are available on your platform.

You don't need to worry about endianness -- the code already takes care of
that.

Probably the biggest issue will be working around compiler quirks, if your
platform does not use GCC.

On Thu, Jan 21, 2010 at 3:45 AM, F. Girault <florian.gira...@gmail.com>wrote:

> Hi all,
>
> I have been playing around with protocol buffers for a few days, and
> finally able to get a working version under windows using a cygwin
> environment.
>
> It seems very convenient, ansd now I am thinking of trying to port it
> in to a non-posix environment: micro-ITRON.
>
> Where should I start to look at to port protocol buffers? The idea
> would be to be able to compile the protobuf's static library for use
> with my cross-compiler.
> So I would use cygwin for the build, replacing GCC and compiler
> directive by my appropriate compiler and directives.
>
> At the moment I am looking at the #ifdef _WIN32 flags in the code and
> seeing what changes would be necessary (since I believe that the most
> non-posix OS you had to port to is windows).
>
> Could you please teach me what library/headers does protobuf need
> which are not part of the C++ STL?
> And what should I be careful about? (for example, should I care about
> my target's endianness, or can I leave that to protobuf(maybe you
> already check for endianness when using the runtime for the first
> time?)?)
>
> Of course I am planning to feedback you with any modifications that I
> would add to the core code if it is really possible to port it...
>
> Many thanks in advance.
>
> PS: I would just like to port protobuf's static library, I don't think
> I would need to embed protoc
> from what I understood of its use.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To post to this group, send email to proto...@googlegroups.com.
> To unsubscribe from this group, send email to
> protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/protobuf?hl=en.
>
>
>
>
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.

Reply via email to