* [PATCH 0/2] OS/2 patches
@ 2019-01-17 4:35 KO Myung-Hun
2019-01-17 4:35 ` [PATCH 1/2] fcntl: Remove mis-placed ';' KO Myung-Hun
2019-01-17 4:35 ` [PATCH 2/2] mknod: mknod() needs unistd.h on OS/2 kLIBC KO Myung-Hun
0 siblings, 2 replies; 7+ messages in thread
From: KO Myung-Hun @ 2019-01-17 4:35 UTC (permalink / raw)
To: bug-gnulib
Hi/2.
These are the patches for OS/2.
Review, please...
[PATCH 1/2] fcntl: Remove mis-placed ';'
[PATCH 2/2] mknod: mknod() needs unistd.h on OS/2 kLIBC
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] fcntl: Remove mis-placed ';'
2019-01-17 4:35 [PATCH 0/2] OS/2 patches KO Myung-Hun
@ 2019-01-17 4:35 ` KO Myung-Hun
2019-01-17 4:35 ` [PATCH 2/2] mknod: mknod() needs unistd.h on OS/2 kLIBC KO Myung-Hun
1 sibling, 0 replies; 7+ messages in thread
From: KO Myung-Hun @ 2019-01-17 4:35 UTC (permalink / raw)
To: bug-gnulib
This fixes the compilation error.
* lib/fcntl.c (klibc_fcntl): Remove mis-placed ';'.
---
lib/fcntl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/fcntl.c b/lib/fcntl.c
index f602fad62..51f62ef78 100644
--- a/lib/fcntl.c
+++ b/lib/fcntl.c
@@ -545,7 +545,7 @@ rpl_fcntl_DUPFD_CLOEXEC (int fd, int target)
#ifdef __KLIBC__
static int
-klibc_fcntl (int fd, int action, /* arg */...);
+klibc_fcntl (int fd, int action, /* arg */...)
{
va_list arg_ptr;
int arg;
--
2.13.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] mknod: mknod() needs unistd.h on OS/2 kLIBC
2019-01-17 4:35 [PATCH 0/2] OS/2 patches KO Myung-Hun
2019-01-17 4:35 ` [PATCH 1/2] fcntl: Remove mis-placed ';' KO Myung-Hun
@ 2019-01-17 4:35 ` KO Myung-Hun
2019-01-17 13:45 ` Eric Blake
1 sibling, 1 reply; 7+ messages in thread
From: KO Myung-Hun @ 2019-01-17 4:35 UTC (permalink / raw)
To: bug-gnulib
On OS/2 kLIBC, mknod() is declared in unistd.h. This fixes 'implicit
declaration of function' compilation warning.
* lib/mknod.c: Include unistd.h.
---
lib/mknod.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/mknod.c b/lib/mknod.c
index dbbfe29c4..1d4b490ca 100644
--- a/lib/mknod.c
+++ b/lib/mknod.c
@@ -18,6 +18,8 @@
#include <config.h>
+/* On OS/2 kLIBC, mknod() is declared in unistd.h. */
+#include <unistd.h>
#include <sys/stat.h>
#include <errno.h>
--
2.13.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] mknod: mknod() needs unistd.h on OS/2 kLIBC
2019-01-17 4:35 ` [PATCH 2/2] mknod: mknod() needs unistd.h on OS/2 kLIBC KO Myung-Hun
@ 2019-01-17 13:45 ` Eric Blake
2019-01-17 14:36 ` KO Myung-Hun
0 siblings, 1 reply; 7+ messages in thread
From: Eric Blake @ 2019-01-17 13:45 UTC (permalink / raw)
To: KO Myung-Hun, bug-gnulib
[-- Attachment #1.1: Type: text/plain, Size: 1058 bytes --]
On 1/16/19 10:35 PM, KO Myung-Hun wrote:
> On OS/2 kLIBC, mknod() is declared in unistd.h. This fixes 'implicit
> declaration of function' compilation warning.
>
> * lib/mknod.c: Include unistd.h.
> ---
> lib/mknod.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/mknod.c b/lib/mknod.c
> index dbbfe29c4..1d4b490ca 100644
> --- a/lib/mknod.c
> +++ b/lib/mknod.c
> @@ -18,6 +18,8 @@
>
> #include <config.h>
>
> +/* On OS/2 kLIBC, mknod() is declared in unistd.h. */
> +#include <unistd.h>
> #include <sys/stat.h>
This patch is wrong; it only fixes the symptom instead of the problem,
and anyone using the module would have to repeat the fix in their own .c
files. Instead, we should be fixing the gnulib <sys/stat.h> replacement
header to pull in <unistd.h> automatically on OS/2, so that anyone using
the gnulib module can use just the POSIX header to get the declaration.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] mknod: mknod() needs unistd.h on OS/2 kLIBC
2019-01-17 13:45 ` Eric Blake
@ 2019-01-17 14:36 ` KO Myung-Hun
2019-01-17 18:42 ` Bruno Haible
0 siblings, 1 reply; 7+ messages in thread
From: KO Myung-Hun @ 2019-01-17 14:36 UTC (permalink / raw)
To: Eric Blake; +Cc: bug-gnulib
[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Eric Blake wrote:
> On 1/16/19 10:35 PM, KO Myung-Hun wrote:
>> On OS/2 kLIBC, mknod() is declared in unistd.h. This fixes
>> 'implicit declaration of function' compilation warning.
>>
>> * lib/mknod.c: Include unistd.h. --- lib/mknod.c | 2 ++ 1 file
>> changed, 2 insertions(+)
>>
>> diff --git a/lib/mknod.c b/lib/mknod.c index dbbfe29c4..1d4b490ca
>> 100644 --- a/lib/mknod.c +++ b/lib/mknod.c @@ -18,6 +18,8 @@
>>
>> #include <config.h>
>>
>> +/* On OS/2 kLIBC, mknod() is declared in unistd.h. */ +#include
>> <unistd.h> #include <sys/stat.h>
>
> This patch is wrong; it only fixes the symptom instead of the
> problem, and anyone using the module would have to repeat the fix
> in their own .c files. Instead, we should be fixing the gnulib
> <sys/stat.h> replacement header to pull in <unistd.h> automatically
> on OS/2, so that anyone using the gnulib module can use just the
> POSIX header to get the declaration.
>
Fixed. Thanks a lot.
- --
KO Myung-Hun
Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM
Korean OS/2 User Community : http://www.os2.kr/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (OS/2)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFcQJMFE9YstvghgroRAqYoAJ9eqZnSFKnVEo0/xK/lQF9RwDhfmwCeL+MS
KKlkuDN2g0sxB0KG+gjuuT4=
=7gfK
-----END PGP SIGNATURE-----
[-- Attachment #2: 0001-sys_stat-Include-unistd.h-for-mknod-on-OS-2-kLIBC.patch --]
[-- Type: application/x-patch, Size: 997 bytes --]
[-- Attachment #3: 0001-sys_stat-Include-unistd.h-for-mknod-on-OS-2-kLIBC.patch.sig --]
[-- Type: application/octet-stream, Size: 65 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-01-18 6:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-17 4:35 [PATCH 0/2] OS/2 patches KO Myung-Hun
2019-01-17 4:35 ` [PATCH 1/2] fcntl: Remove mis-placed ';' KO Myung-Hun
2019-01-17 4:35 ` [PATCH 2/2] mknod: mknod() needs unistd.h on OS/2 kLIBC KO Myung-Hun
2019-01-17 13:45 ` Eric Blake
2019-01-17 14:36 ` KO Myung-Hun
2019-01-17 18:42 ` Bruno Haible
2019-01-18 6:50 ` KO Myung-Hun
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).