Yaakov (Cygwin/X | 21 Feb 2012 23:44
Picon
Gravatar

[PATCH] Add scandirat(3)

scandirat(3) was added in glibc-2.15[1] and has supposedly been proposed
for addition to POSIX.1[2].  Patch attached.

Yaakov

[1] http://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS
[2] http://article.gmane.org/gmane.linux.man/2419

Attachment (cygwin-scandirat.patch): text/x-patch, 4250 bytes
Yaakov (Cygwin/X | 12 Feb 2012 23:04
Picon
Gravatar

[PATCH] pthread.h: include <time.h>

POSIX states:
> Inclusion of the <pthread.h> header shall make symbols defined in the
> headers <sched.h> and <time.h> visible.

The reason being that some pthread functions take a clockid_t argument,
and the CLOCK_* symbolic names are therein defined.

Patch attached.

Yaakov

Christian Franke | 8 Feb 2012 19:39
Picon
Favicon

[PATCH] Fix C++ compilation of wait(NULL)

This fixes the regression I introduced in sys/wait.h.

Sorry, and thanks for the bug report.

Christian

Yaakov (Cygwin/X | 24 Jan 2012 06:53
Picon
Gravatar

[PATCH] ldd: support .oct and .so modules

Octave modules use the .oct extension, and several programs use .so for
modules even on Cygwin (e.g. Apache2, Mesa, OpenSSL, Ruby).  Currently,
running ldd(1) on any of these returns ENOEXEC.

The attached patch fixes ldd to treat these as DLLs and show their
runtime dependencies.

Yaakov

Attachment (utils-ldd-so-oct.patch): text/x-patch, 950 bytes
Yaakov (Cygwin/X | 13 Jan 2012 10:26
Picon
Gravatar

[PATCH] doc: document printf %m

New feature just added to newlib.  Patch for winsup/doc attached.

Yaakov

Attachment (doc-printf-m.patch): text/x-patch, 881 bytes
Yaakov (Cygwin/X | 12 Jan 2012 12:28
Picon
Gravatar

[PATCH] doc: tgmath.h

New header just committed to newlib.  Patch attached.

Yaakov

Attachment (doc-tgmath.patch): text/x-patch, 721 bytes
Yaakov (Cygwin/X | 1 Jan 2012 19:59
Picon
Gravatar

[PATCH] Add pthread_sigqueue(3)

This patchset adds pthread_sigqueue(3), a GNU extension:

http://www.kernel.org/doc/man-pages/online/pages/man3/pthread_sigqueue.3.html

The implementation is based on the existing sigqueue(2) and
pthread_kill(3) code.

Patches for winsup/cygwin and winsup/doc attached.

Yaakov

Yaakov (Cygwin/X | 1 Jan 2012 03:45
Picon
Gravatar

[PATCH] Add get_current_dir_name(3)

This patchset adds get_current_dir_name(3), a GNU extension:

http://www.gnu.org/software/libc/manual/html_node/Working-Directory.html
http://www.kernel.org/doc/man-pages/online/pages/man3/getcwd.3.html

The test code will show the difference between get_current_dir_name()
and getcwd(NULL, 0) when you cd into a directory via a symlink:

$ gcc -Wall -o test-get_current_dir_name.exe test-get_current_dir_name.c
$ mkdir /tmp/real
$ ln -s real /tmp/symlink
$ cd /tmp/symlink
$ /path/to/test-get_current_dir_name.exe
                  PWD: /tmp/symlink
               getcwd: /tmp/real
 get_current_dir_name: /tmp/symlink

: now try spoofing PWD
$ PWD=$HOME /path/to/test-get_current_dir_name.exe
                  PWD: /home/Yaakov
               getcwd: /tmp/real
 get_current_dir_name: /tmp/real

Patches for newlib, winsup/cygwin, and winsup/doc, plus the STC,
attached.

Yaakov

(Continue reading)

Yaakov (Cygwin/X | 30 Dec 2011 07:44
Picon
Gravatar

[PATCH] Add getpt(3)

getpt(3) is a GNU extension which predates posix_openpt(3):

http://www.kernel.org/doc/man-pages/online/pages/man3/getpt.3.html

The code itself is quite simple, but let me preempt some questions:

1) Yes, portable code should use posix_openpt(3).  Unfortunately not all
code is written with portability in mind.

2) A macro is insufficient as it will not be discovered by an Autoconf
AC_CHECK_FUNC or CMake CHECK_FUNCTION_EXISTS test (which is exactly how
I came across this issue in the first place).

Patches for winsup/cygwin and winsup/doc attached.

Yaakov

Attachment (cygwin-getpt.patch): text/x-patch, 3197 bytes
Attachment (doc-getpt.patch): text/x-patch, 752 bytes
Yaakov (Cygwin/X | 30 Dec 2011 07:25
Picon
Gravatar

[PATCH] Fix cancellation points list

pthread_rwlock_timedrdlock and pthread_rwlock_timedwrlock aren't
implemented yet.  Patch attached.

Yaakov

Dave Korn | 12 Dec 2011 23:57
Picon

[patch,1.7.10] clock_setres returns zero


    Hi folks,

  I actually noticed this in 1.7.9, but looking at the source in CVS I can see
it's still present in 1.7.10.  Here's the STC:

> $ cat clockres.c

#include <stdio.h>
#include <time.h>
#include <errno.h>

int main (int argc, const char **argv)
{
  struct timespec ts;
  if (clock_getres (CLOCK_MONOTONIC, &ts) < 0)
  {
    fprintf (stderr, "Bad: %d\n", errno);
    return -1;
  }
  printf ("%ld sec, %ld nanos\n", ts.tv_sec, ts.tv_nsec);
  return 0;
}

> $ gcc-4 clockres.c -o clockres -W -Wall -Wextra
> clockres.c: In function 'main':
> clockres.c:6:15: warning: unused parameter 'argc'
> clockres.c:6:34: warning: unused parameter 'argv'
> 
> $ ./clockres.exe
(Continue reading)


Gmane