mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] byteswap.h


From: Volker Grabsch
Subject: Re: [Mingw-cross-env-list] byteswap.h
Date: Sun, 29 May 2011 11:36:49 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Alois Schloegl schrieb:
> The biosig project supports over 40 different data formats, some of these
> data formats are big endian.
> To handle these data formats, I'm using on linux/gcc,
>     #include <byteswap.h>
> 
> It seems that byteswap.h is currently not available within mingw-cross-env.
> Therefore, I'm wondering whether byteswap.h could be included in
> mingw-cross-env, too?

These are actually two questions.

First: Why is byteswap.h not part of MinGW? Note that this question is
off-topic here. It has been answered on the MinGW Users list years ago:

http://old.nabble.com/byteswap.h-included-in-mingw--td14839404.html#a14840440

Second: Can we include an alternative implementation of byteswap.h
in mingw-cross-env? Of course we could, for instance by providing
a package for that. For instance, we could take it from Gnulib:

http://www.gnu.org/software/gnulib/
http://www.gnu.org/s/hello/manual/gnulib/byteswap_002eh.html

However, I don't think this is the "right" way to do it, because
the Gnulib says:

"Gnulib takes a different approach. Its components are intended
 to be shared at the source level, rather than being a library
 that gets built, installed, and linked against. Thus, there is
 no distribution tarball; the idea is to copy files from Gnulib
 into your own source tree."

So I recommend that you copy Gnulib's byteswap.h into your source
tree, and to handle it as some kind of compatibility layer. Also,
you might want to include other Gnulib files you are interested in.

(As always, feel free to disagree with me. If you have compelling
 reasons not to go that route, just complain and we'll talk about
 alternative approaches such as providing some kind of "byteswap"
 or "gnulib" package.)


Greets,
Volker

-- 
Volker Grabsch
---<<(())>>---



reply via email to

[Prev in Thread] Current Thread [Next in Thread]