[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Stuff missing in gnulib needed for MinGW
From: |
Simon Josefsson |
Subject: |
Stuff missing in gnulib needed for MinGW |
Date: |
Wed, 16 Jan 2008 14:32:17 +0100 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) |
I have done a quick port of Shishi to MinGW and noticed some things that
were needed but for which there were no gnulib replacements:
getuid
getpwnam
syslog
struct passwd from pwd.h
res_query from arpa/nameserv.h and -lresolv
C_IN, T_TXT, T_SRV etc from arpa/nameserv.h
netinet/in6.h
resolv.h
gethostname prototype from unistd.h
h_errno? from netdb.h
sys/ioctl.h
errno.h
Some of them may not be well standardized..
I suspect some of these are candidates to be implemented in gnulib.
However, the implementation will be very trivial, because Windows
doesn't have a similar concept. For example, for 'getuid', the MinGW
code in gnulib for it would just return 0, 42, or whatever.
I've noticed that kdewin32 implements some of these, but most of the
functions (including getuid) are just dummy functions:
http://websvn.kde.org/trunk/kdesupport/kdewin32/include/mingw/
http://websvn.kde.org/trunk/kdesupport/kdewin32/src/
http://websvn.kde.org/trunk/kdesupport/kdewin32/src/unistd.c?revision=696032&view=markup
What do people think about having dummy functions in gnulib? Do they
serve a purpose, or do they hide problems and lead to confusion?
We already have some modules in gethostname and getdomainname, but they
might be regarded as exceptions.
I would find a 'getuid' replacement that just returned 0 to be useful.
It helps me avoid doing the getuid check in my configure.ac and to avoid
polluting code with HAVE_GETUID etc. Is this sufficient reason to
implement this in gnulib?
Thanks,
Simon
- Stuff missing in gnulib needed for MinGW,
Simon Josefsson <=