[Libvir] using gnulib: starting with the physmem and getaddrinfo modules

Jim Meyering jim at meyering.net
Wed Dec 5 12:25:13 UTC 2007


"Richard W.M. Jones" <rjones at redhat.com> wrote:

> More modules we could use (all for MinGW / Windows):
...
>  - gettext
>
>     MinGW lacks <libintl.h> and any gettext function.  I thought that
> gettextize was supposed to supply all the code needed to implement
> these?  Anyhow, it doesn't seem to.

Hi Rich,

That just means you'll have to install gettext there.
That will provide things like the libintl library and
the missing header files.

Note that some projects used to include an intl/
directory, and that gave them libintl.a as well as libintl.h
as a result of the usual ./configure && make process: i.e.,
no need for an external library.

However, these days, it seems that most projects prefer not to
include all of gettext's intl/ directory.

>  - strndup & strsep

stpcpy is another useful one (though currently not used in libvirt).
Lets you do successive string concatenation cleanly and
without the usual O(N^2) penalty that you get when doing
it via strcat.

>  - fcntl [LGPLv3]
>
>     The gnulib one fixes all the flags which are missing from Windows
>
>  - sys_stat
>
>     As above, but for S_* (Unix modes) macros
>
>  - readlink [LGPLv3]
>
>     This explicitly acts as a substitute for this system call on
> MinGW, according to the documentation anyway.

This is such a thin wrapper that it should be easy to
justify changing to LGPLv2.




More information about the libvir-list mailing list