8 Feb 19:39
24 Jan 06:53
[PATCH] ldd: support .oct and .so modules
Yaakov (Cygwin/X <yselkowitz <at> users.sourceforge.net>
2012-01-24 05:53:23 GMT
2012-01-24 05:53:23 GMT
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
2012-(Continue reading)01-?? Yaakov Selkowitz <yselkowitz@...> * ldd.cc (start_process): Handle .oct and .so as DLLs. Index: ldd.cc =================================================================== RCS file: /cvs/src/src/winsup/utils/ldd.cc,v retrieving revision 1.13 diff -u -p -r1.13 ldd.cc --- ldd.cc 17 Dec 2011 23:39:47 -0000 1.13 +++ ldd.cc 24 Jan 2012 05:43:41 -0000 @@ -189,7 +189,11 @@ start_process (const wchar_t *fn, bool& PROCESS_INFORMATION pi; si.cb = sizeof (si); wchar_t *cmd; - if (wcslen (fn) < 4 || wcscasecmp (wcschr (fn, L'\0') - 4, L".dll") != 0) + /* OCaml natdynlink plugins (.cmxs) cannot be handled by ldd because they + can only be loaded by flexdll_dlopen() */ + if (wcslen (fn) < 4 || (wcscasecmp (wcschr (fn, L'\0') - 4, L".dll") != 0
13 Jan 10:26
[PATCH] doc: document printf %m
Yaakov (Cygwin/X <yselkowitz <at> users.sourceforge.net>
2012-01-13 09:26:01 GMT
2012-01-13 09:26:01 GMT
New feature just added to newlib. Patch for winsup/doc attached. Yaakov
2012-(Continue reading)01-?? Yaakov Selkowitz <yselkowitz@...> * new-features.sgml (ov-new1.7.10): Document support for the %m %m conversion flag in printf functions. Index: new-features.sgml =================================================================== RCS file: /cvs/src/src/winsup/doc/new-features.sgml,v retrieving revision 1.98 diff -u -p -r1.98 new-features.sgml --- new-features.sgml 12 Jan 2012 23:42:11 -0000 1.98 +++ new-features.sgml 13 Jan 2012 09:20:00 -0000 @@ -105,6 +105,11 @@ dlopen now supports the Glibc-specific R </para></listitem> <listitem><para> +The printf(3) and wprintf(3) families of functions now handle the %m +conversion flag. +</para></listitem> + +<listitem><para> Other new API: clock_settime, __fpurge, getgrouplist, get_current_dir_name, getpt, ppoll, psiginfo, psignal, ptsname_r, sys_siglist, pthread_setschedprio, pthread_sigqueue, sysinfo.
12 Jan 12:28
[PATCH] doc: tgmath.h
Yaakov (Cygwin/X <yselkowitz <at> users.sourceforge.net>
2012-01-12 11:28:44 GMT
2012-01-12 11:28:44 GMT
New header just committed to newlib. Patch attached. Yaakov
2012-01-?? Yaakov Selkowitz <yselkowitz@...> * new-features.sgml (ov-new1.7.10): Document tgmath.h. Index: new-features.sgml =================================================================== RCS file: /cvs/src/src/winsup/doc/new-features.sgml,v retrieving revision 1.97 diff -u -p -r1.97 new-features.sgml --- new-features.sgml 6 Jan 2012 07:13:11 -0000 1.97 +++ new-features.sgml 12 Jan 2012 11:25:14 -0000 @@ -72,6 +72,10 @@ Also, perror and strerror_r no longer cl </para></listitem> <listitem><para> +C99 >tgmath.h< type-generic macros. +</para></listitem> + +<listitem><para> /proc/loadavg now shows the number of currently running processes and the total number of processes. </para></listitem>
1 Jan 19:59
[PATCH] Add pthread_sigqueue(3)
Yaakov (Cygwin/X <yselkowitz <at> users.sourceforge.net>
2012-01-01 18:59:00 GMT
2012-01-01 18:59:00 GMT
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
2012-(Continue reading)01-?? Yaakov Selkowitz <yselkowitz@...> * cygwin.din (pthread_sigqueue): Export. * posix.sgml (std-gnu): Add pthread_sigqueue. * thread.cc (pthread_sigqueue): New function. * include/thread.h (pthread_sigqueue): New function. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. Index: cygwin.din =================================================================== RCS file: /cvs/src/src/winsup/cygwin/cygwin.din,v retrieving revision 1.246 diff -u -p -r1.246 cygwin.din --- cygwin.din 3 Aug 2011 19:17:02 -0000 1.246 +++ cygwin.din 4 Aug 2011 09:21:52 -0000 @@ -1270,6 +1270,7 @@ pthread_setschedparam SIGFE pthread_setschedprio SIGFE
1 Jan 03:45
[PATCH] Add get_current_dir_name(3)
Yaakov (Cygwin/X <yselkowitz <at> users.sourceforge.net>
2012-01-01 02:45:07 GMT
2012-01-01 02:45:07 GMT
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)
30 Dec 07:44
[PATCH] Add getpt(3)
Yaakov (Cygwin/X <yselkowitz <at> users.sourceforge.net>
2011-12-30 06:44:57 GMT
2011-12-30 06:44:57 GMT
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
2011-12-30 Yaakov Selkowitz <yselkowitz@...> * cygwin.din (getpt): Export. * posix.sgml (std-gnu): Add getpt. * tty.cc (getpt): New function. * include/cygwin/stdlib.h [!__STRICT_ANSI__] (getpt): Declare. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. Index: cygwin.din =================================================================== RCS file: /cvs/src/src/winsup/cygwin/cygwin.din,v(Continue reading)
30 Dec 07:25
[PATCH] Fix cancellation points list
Yaakov (Cygwin/X <yselkowitz <at> users.sourceforge.net>
2011-12-30 06:25:25 GMT
2011-12-30 06:25:25 GMT
pthread_rwlock_timedrdlock and pthread_rwlock_timedwrlock aren't implemented yet. Patch attached. Yaakov
2011-12-30 Yaakov Selkowitz <yselkowitz@...>
* thread.cc: Mark pthread_rwlock_timedrdlock and
pthread_rwlock_timedwrlock as not yet implemented in the list of
cancellation points.
Index: thread.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/thread.cc,v
retrieving revision 1.250
diff -u -p -r1.250 thread.cc
--- thread.cc 22 Dec 2011 11:02:36 -0000 1.250
+++ thread.cc 30 Dec 2011 06:22:45 -0000
@@ -810,8 +810,8 @@ pthread::cancel ()
psiginfo ()
psignal ()
pthread_rwlock_rdlock ()
- pthread_rwlock_timedrdlock ()
- pthread_rwlock_timedwrlock ()
+ o pthread_rwlock_timedrdlock ()
+ o pthread_rwlock_timedwrlock ()
pthread_rwlock_wrlock ()
putc ()
(Continue reading)
12 Dec 23:57
[patch,1.7.10] clock_setres returns zero
Dave Korn <dave.korn.cygwin <at> gmail.com>
2011-12-12 22:57:25 GMT
2011-12-12 22:57:25 GMT
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)
4 Dec 08:07
Add support for creating native windows symlinks
Russell Davis <russell.davis <at> gmail.com>
2011-12-04 07:07:05 GMT
2011-12-04 07:07:05 GMT
This was discussed before here: http://cygwin.com/ml/cygwin/2008-03/msg00277.html These were the reasons given for not using native symlinks to create cygwin symlinks, along with my responses: - By default, only administrators have the right to create native symlinks. Admins running with restricted permissions under UAC don't have this right. This is true, however the feature can be made optional through the CYGWIN environment variable (just like winsymlinks). For users that can add the permission or disable UAC, the use of native symlinks is a huge step towards making cygwin more unified with the rest of Windows. - When creating a native symlink, you have to define if this symlink points to a file or a directory. This makes no sense given that symlinks often are created before the target they point to. Also true. However, the type only matters for Windows' usage of the symlink -- cygwin already treats both the types the same. For example, if a native symlink of type `file` actually points to a directory, it will still work fine inside cygwin. It won't work for Win32 programs that try to access it, but that's still no worse than the status quo -- Win32 programs already can't use cygwin symlinks. Since cygwin already supports reading of native symlinks, I was able to add support for this with a fairly small change. Some edge cases probably still need to be handled (disabling for older versions of windows and unsupported file systems), but I wanted to get this out(Continue reading)
14 Nov 12:16
Fwd: Newlib's implementation of isalnum() is causing compiler warnings
Rafal Zwierz <rzwierz <at> googlemail.com>
2011-11-14 11:16:39 GMT
2011-11-14 11:16:39 GMT
Hi, First of all apologies if it is not the right place to submit patches for newlib/libc used by cygwin. If it's not then I would appreciate if you could point me to the right place for submitting such patches. If it is the right place then please read on. main.c (attached) is a simple app which, when compiled with under Cygwin gcc -Wall -Werror main.c shows the following problem: cc1: warnings being treated as errors main.c: In function ‘main’: main.c:6:4: error: array subscript has type ‘char’ The fix is quite simple and is contained in patch.txt. Best wishes, Rafal
--- ctype_orig.h 2009-11-07 15:25:20.000000000 +0000
+++ ctype.h 2011-11-14 10:58:39.108899500 +0000
@@ -54,7 +54,7 @@ extern __IMPORT char *__ctype_ptr__;
Meanwhile, the real index to __ctype_ptr__+1 must be cast to int,
since isalpha(0x100000001LL) must equal isalpha(1), rather than being
an out-of-bounds reference on a 64-bit machine. */
(Continue reading)
RSS Feed