Bruno Haible wrote:
So what you are doing
here is to add a stray ';', which leads to a syntax error:
I guess the patch is attempting to work around an incompatibility with the
'find' implementation on OS/2, which evidently does not support the '+' syntax
that was introduced in POSIX:2001. Bu
> -&& ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then
> +&& ! find "$local_gl_dir" -name '*.diff' -exec false {} + ';'; then
Sorry, this does not look right. According to POSIX [1] the '+' argument
terminates the primary expression "-exec false {} +". So what you are doing
her
> +#ifdef __KLIBC__
> + FILE *result = freopen (filename, mode, stream);
> +
> + /* On OS/2 kLIBC, freopen() returns NULL even if it is successful
> + if filename is NULL. */
> + if (!result && !errno)
> +result = stream;
1) In the comment you say 'if filename is NULL' but in the code y
> * lib/pipe-filter-ii.c (start_wrapper, _beginthreadex, CloseHandle,
> WaiForSingleObject, WaitForMultipleObjects): New on OS/2 kLIBC.
Since you make use of these functions in w32spawn.h, their implementation
does not belong in pipe-filter-ii.c, but rather in some other .c file,
say w32-on-os2.c.
> +#ifndef __KLIBC__
> #define SHELL_SPECIAL_CHARS "\"\\
> \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037*?"
> #define SHELL_SPACE_CHARS "
> \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023
> * lib/binary-io.h (SET_BINARY): put fd in binary mode if it is not a
> console on EMX.
A changelog entry should usually specify the difference between the previous
behaviour and the new behaviour. Therefore here it should better read:
* lib/binary-io.h (SET_BINARY): Don't put fd in binary mode
> + DosGetInfoBlocks (NULL, &ppib);
Reliability: Please don't ignore the return value of DosGetInfoBlocks.
Also, if possible, can you please add a comment with the URL of the
specification of DosGetInfoBlocks? Future readers of this code should
be able to understand its parameters.
Bruno
> +#ifdef __EMX__
> +# define INCL_DOS
> +# include
> +
> +#define strcmp stricmp
> +#define strncmp strnicmp
> +#endif
Please indent these lines:
# define strcmp stricmp
# define strncmp strnicmp
> +if (DosQueryModuleName (hModule, sizeof (location), location))
Can you add a comment
> * lib/spawn.in.h: Do not include sched.h on OS/2 kLIBC.
POSIX [1] specifies that must declare the tag 'sched_param'.
Where do you want to get it from, if not from ?
Bruno
[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/spawn.h.html
> (do_copyrights): Clear unless no_symlink_support is set.
>-S | --more-symlinks | --more-symlink | --more-symlin | --more-symli |
> --more-syml | --more-sym | --more-sy | --more-s | --more- | --more | --mor |
> --mo )
> -symbolic=true
> -do_copyrights=
> +test -z
KO Myung-Hun wrote:
* lib/fdopendir.c (fdopendir): Implement on OS/2 kLIBC.
Patches from coreutils 8.8 by Paul Smedley.
First, we don't have copyright assignment from Paul Smedley, so we can't install
the patch without having that cleared up one way or another.
Second, the patch seems to in
KO Myung-Hun wrote:
+#ifdef __KLIBC__ /* fs doesn't to better than seconds, but we must use
futimes! */
+# define HAVE_WORKING_UTIMES 1
+#endif
Sorry, I don't follow.
Is the problem that kLIBC utimes operates on file systems whose time stamps
resolution are 2 seconds? I recall that this is
KO Myung-Hun wrote:
* lib/fts.c (fts_build): Do not check dir_fd on OS/2 kLIBC.
I'm afraid this change needs more explanation. If the problem is that dirfd
returns -2, the earlier part of fts_build will return when that happens, so that
problem cannot be fixed by the patch that you sent.
W
KO Myung-Hun wrote:
d_ino is not supported correctly on OS/2 kLIBC 0.6. This will be fixed
in 0.7.
How about testing for the bug in 'configure', then? That way, D_INO_IN_DIRENT
will be correct. Programs other than Gnulib use it, so that'd be a better approach.
KO Myung-Hun wrote:
+#ifdef __KLIBC__
+/* To avoid 'conflicting types' error for `__wcwidth' on OS/2 kLIBC.
+ wchar_t(unsigned short) is defined differently from wint_t(int) on
+ OS/2 kLIBC. */
+# undef wcwidth
+/* Ignore wcwidth() of OS/2 kLIBC */
+# undef HAVE_WCWIDTH
+#endif
The #undef i
I don't see why the workaround must be in freopen-safer.c. freopen-safer has
freopen as a prerequisite, so it can assume that freopen doesn't have the bug in
question.
+#ifdef __KLIBC__
+ FILE *result = freopen (filename, mode, stream);
+
+ /* On OS/2 kLIBC, freopen() returns NULL even if i
KO Myung-Hun wrote:
getrlimit() was implemented in kLIBC and works well. Strangely,
however, it crashes due to 'stack overflow' or 'SIGSEGV' when used in
GNU M4.
This needs explanation in the form of a brief comment in the source code.
Also, I don't see how it can be said to work "well" if it
KO Myung-Hun wrote:
+#ifndef __KLIBC__
#define SHELL_SPECIAL_CHARS "\"\\
\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037*?"
#define SHELL_SPACE_CHARS "
\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020
KO Myung-Hun wrote:
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ || defined
__KLIBC__
This patch also has some lines that are too long and should be broken up.
KO Myung-Hun wrote:
+#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) &&
!defined __EMX__
This line is longer than 80 characters ; please break it up, e.g., like this:
#if (!((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) \
&& !defined __EMX__)
I know s
KO Myung-Hun wrote:
/* Get definitions of 'struct sched_param' and 'sigset_t'.
But avoid namespace pollution on glibc systems. */
#if !(defined __GLIBC__ && !defined __UCLIBC__)
-# include
+# ifndef __KLIBC__
+# include
+# endif
Please add a brief note to that comment, to explain
KO Myung-Hun wrote:
+#ifndef __KLIBC__
typedef long int gl_intptr_t;
typedef unsigned long int gl_uintptr_t;
+#else
+typedef int gl_intptr_t;
+typedef unsigned int gl_uintptr_t;
+#endif
This looks brittle.
First, why is it used at all? That is, what's wrong with kLIBC's stdint.h,
which c
KO Myung-Hun wrote:
+echo "$v" | tr -d "$cr$nl"
How about this instead?
printf '%s' "$v"
This avoids the need for cr and for tr, which is simpler and a bit faster. The
script is already using printf so this shouldn't be a portability issue.
KO Myung-Hun wrote:
* gnulib-tool (func_gnulib_dir): Add [A-Za-z]:* case.
The usual globbing pattern elsewhere in Gnulib is '?:*', not '[A-Za-z]:*'. This
is simpler and is just as good in practice.
KO Myung-Hun wrote:
+# OS/2 does not support a symbolc link at all
+case `uname -s` in
+ "OS/2") no_symlink_support=true;;
+ *) no_symlink_support=;;
+esac
Surely it would be better to test this directly, by running 'ln -s' and seeing
it fail, than to look at operating system names.
'symbo
Every po file seems to include entry with empty msgid with some
meta information about it. If argp->doc string contains empty pre section
(like "\v" "Some text to output after options"), argp_help tries to
translate empty string and emits this meta information, like in
bor@opensuse:~/src/grub> gru
For context, gnulib-tests/test-getcwd.c is failing on Mac OS X with exit(7)...
On 30/11/14 05:59, Assaf Gordon wrote:
> One more thing regarding AT_FDCWD:
>
> On Nov 30, 2014, at 0:54, Assaf Gordon wrote:
>
>>
>> But I did notice this:
>> In “m4/getcwd-path-max.m4” there is C code which is very
OS/2 does not support a symbolic link at all.
* gnulib-tool (no_symlink_support): New. Set to true on OS/2,
otherwise clear.
(symbolic, lsymbolic): Set to true unless no_symlink_support is set.
(do_copyrights): Clear unless no_symlink_support is set.
---
gnulib-tool | 14 ++
1 file ch
configure test for HAVE_WORKING_UTIMES fails on OS/2 kLIBC. But it is
required.
* lib/utimesns.c (HAVE_WORKING_UTIMES): Define to 1 on OS/2 kLIBC.
Patches from coreutils 8.8 by Paul Smedley.
---
lib/utimens.c | 4
1 file changed, 4 insertions(+)
diff --git a/lib/utimens.c b/lib/utimens.c
i
* build-aux/bootstrap: Append quoted ; to '-exec' command.
---
build-aux/bootstrap | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 4f0493a..761d25a 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -544,7 +544,7 @@ esa
On OS/2, x:* is an absolute path, too.
* gnulib-tool (func_gnulib_dir): Add [A-Za-z]:* case.
(func_relconcat): Likewise.
---
gnulib-tool | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gnulib-tool b/gnulib-tool
index f1c91c6..b0b77e3 100755
--- a/gnulib-tool
+++ b/gnul
On OS/2 kLIBC, freopen() returns NULL even if it is successful if
filename is NULL.
* lib/freopen-safer.c (klibc_freopen): New.
* lib/freopen.c (orig_freopen): Workaround.
---
lib/freopen-safer.c | 19 +++
lib/freopen.c | 11 +++
2 files changed, 30 insertions(+)
di
* lib/fdopendir.c (fdopendir): Implement on OS/2 kLIBC.
Patches from coreutils 8.8 by Paul Smedley.
---
lib/fdopendir.c | 57 +
1 file changed, 57 insertions(+)
diff --git a/lib/fdopendir.c b/lib/fdopendir.c
index b6c94a0..efe9c7a 100644
--
d_ino is not supported correctly on OS/2 kLIBC 0.6. This will be fixed
in 0.7.
* lib/backupfile.c (REAL_DIR_ENTRY): Define to 1 on OS/2 kLIBC.
* lib/fts.c (D_INO): Define to NOT_AN_INODE_NUMBER on OS/2 kLIBC.
* lib/getcwd.c (MATCHING_INO): Define to true on OS/2 kLIBC.
Patches from coreutils 8.8
* lib/relocatable.c: Define strcmp and strncmp to stricmp and strnicmp
on EMX, respectively.
(_DLL_InitTerm): New on EMX.
(get_shared_library_fullname): Implement on EMX.
---
lib/relocatable.c | 51 ---
1 file changed, 48 insertions(+), 3 deletions(-
Hi/2.
These are OS/2 patches.
Review, please...
[PATCH 01/21] gnulib-tool: disable a symbolic link on OS/2
[PATCH 02/21] gnulib-tool: recognize x:* as an absolute path
[PATCH 03/21] git-version-gen: remove CR as well
[PATCH 04/21] stdint: typedef gl_intptr_t and gl_uintptr_t correctly
[PATCH 05/
dirfd() always return -2 on OS/2 kLIBC 0.6. This will be fixed in 0.7.
* lib/fts.c (fts_build): Do not check dir_fd on OS/2 kLIBC.
Patches from coreutils 8.8 by Paul Smedley.
---
lib/fts.c | 4
1 file changed, 4 insertions(+)
diff --git a/lib/fts.c b/lib/fts.c
index 7f3cdc7..02ebdde 100644
* lib/progreloc.c (find_executable): Implement on EMX.
---
lib/progreloc.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/lib/progreloc.c b/lib/progreloc.c
index 3d7b6a9..5b9e247 100644
--- a/lib/progreloc.c
+++ b/lib/progreloc.c
@@ -44,6 +44,12 @@
# include
#endif
+#
spawn() on OS/2 kLIBC is not silly like one on Windows
* libc/w32spawn.h (SHELL_SPECIAL_CHARS, SHELL_SPACE_CHAR): Set both to
empty string on OS/2 kLIBC.
---
lib/w32spawn.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/lib/w32spawn.h b/lib/w32spawn.h
index 5b7f7ef..3a37092 100644
--- a
UNIXROOT is used to specify a drive of a root of FHS. So if a path is
started with '/', then it should be translated to "$UNIXROOT/".
* lib/relocatable.c (relocate): Prepend $UNIXROOT to pathname if it is
started with '/' on EMX.
---
lib/relocatable.c | 21 +
1 file changed, 2
kLIBC declares struct sched_param in spawn.h, so a redefinition error
occurs.
* lib/spawn.in.h: Do not include sched.h on OS/2 kLIBC.
---
lib/spawn.in.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/spawn.in.h b/lib/spawn.in.h
index eb76bb0..134cb08 100644
--- a/lib/s
intptr_t and uintptr_t are defined as int and unsigned int on OS/2
kLIBC, respectively.
This fixes a type conflict of sbrk() on OS/2 kLIBC.
* lib/stdint.in.h (gl_intptr_t, gl_uintptr_t): typedef to int and
unsigned int on OS/2 kLIBC, repsectively.
---
lib/stdint.in.h | 5 +
1 file changed, 5
getrlimit() was implemented in kLIBC and works well. Strangely,
however, it crashes due to 'stack overflow' or 'SIGSEGV' when used in
GNU M4. So just use getdtablesize().
* lib/getdtablesize.c (rpl_getdtablesize): Do not use getrlimit() on
OS/2 kLIBC.
---
lib/getdtablesize.c | 2 ++
1 file change
wchar_t(unsigned short) is defined differently from wint_t(int) on
OS/2 kLIBC.
* lib/wcwidth.c (wcwidth, HAVE_WCWIDTH): Undefine on OS/2 kLIBC.
---
lib/wcwidth.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/lib/wcwidth.c b/lib/wcwidth.c
index d7837bb..b36abd5 100644
--- a/lib/wcwi
On OS/2, a new line consists of CR and LF.
* build-aux/git-version-gen: Remove CR as well.
---
build-aux/git-version-gen | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index 47d6576..77fb2ad 100755
--- a/build-aux/git-ve
Pipes on kLIBC does not support O_NONBLOCK like Win32.
* lib/pipe-filter-ii.c (start_wrapper, _beginthreadex, CloseHandle,
WaiForSingleObject, WaitForMultipleObjects): New on OS/2 kLIBC.
Reuse Win32 codes on OS/2 kLIBC.
* lib/spawn-pipe.c: Reuse Win32 codes on OS/2 kLIBC.
* lib/w32spawn.h: Do not
* lib/config.charset: Remove os2* from case "$os" in
* lib/localcharset.c (get_charset_aliases): Use embedded encoding
aliases on OS/2.
---
lib/config.charset | 4 +---
lib/localcharset.c | 60 +-
2 files changed, 60 insertions(+), 4 deletions(-
* lib/binary-io.h (SET_BINARY): put fd in binary mode if it is not a
console on EMX.
---
lib/binary-io.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/binary-io.h b/lib/binary-io.h
index 7928f8c..696cdf9 100644
--- a/lib/binary-io.h
+++ b/lib/binary-io.h
@@ -60,7 +60,7 @@
On OS/2 kLIBC, select() works only on sockets.
* lib/pipe-filter-aux.h (HAVE_SELECT): Undefine on OS/2 kLIBC.
---
lib/pipe-filter-aux.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/pipe-filter-aux.h b/lib/pipe-filter-aux.h
index 8f2a707..ee63ac8 100644
--- a/lib/pi
49 matches
Mail list logo