Re: memmem issues

2007-12-19 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 12/19/2007 2:22 PM: > memmem isn't standardized, but even so, it has some bugs based on comparison > with strstr. > > memmem(haystack,len,"",0) should return haystack, not NULL. This should be

Re: memmem issues

2008-01-10 Thread Eric Blake
-ahead for newlib, then we'll need to delete cygwin's copy of memmem.cc. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblak

Re: [patch] recognise when an exec()d process terminates due to unhandled exception

2008-03-13 Thread Eric Blake
of more symbols could not be | found during program initialization. Usually this means an incorrect | or out of date version of one or more DLLs is being erroniously found | on the PATH. | Killed s/erroniously/erroneously/ - -- Don't work too hard, make some time for fun as well! Eric Blak

Re: abort() bug

2008-06-09 Thread Eric Blake
__cleanup to occur _after_ _my_tls.call_signal_handler. | | I think you're right. The call to call_signal_handler was added years | after the addition of the cleanup so it would make sense to move the | cleanup handling after that. | | Want to submit a patch? Sure. 2008-06-09 Eric B

use volatile when replacing Interlocked*

2008-07-12 Thread Eric Blake
Blake <[EMAIL PROTECTED]> Fix usage of recently fixed Interlocked* functions. * winbase.h (ilockincr, ilockdecr, ilockexch, ilockcmpexch): Add volatile qualifier, to match Interlocked* functions. - -- Don't work too hard, make some time for fun as well!

Re: use volatile when replacing Interlocked*

2008-07-12 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 |> 2008-07-12 Eric Blake <[EMAIL PROTECTED]> |> |> Fix usage of recently fixed Interlocked* functions. |> * winbase.h (ilockincr, ilockdecr, ilockexch, ilockcmpexch): Add |> volatile qualifier, to match Interlocked* func

strerrno and new errno values

2008-09-19 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 OK to apply, to match newlib and in preparation for POSIX 200x? 2008-09-19 Eric Blake <[EMAIL PROTECTED]> * errno.cc (_sys_errlist): Add ECANCELED, ENOTRECOVERABLE, EOWNERDEAD. - -- Don't work too hard, make some time

Re: [Patch] Avoid duplicate names in /proc/registry (which may crash find)

2008-12-12 Thread Eric Blake
key if a value called '@' exists? Do you > have an idea for a simple solution? "@" for the named value, and "%.val" for the unnamed default? - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNA

Re: [Patch] Avoid duplicate names in /proc/registry (which may crash find)

2008-12-12 Thread Eric Blake
e could be a key and a value called @ so you > have three @ items. :-P If there is no key or value @, then use @ for the default for compatibility. If there is either a key or a value named @, then use: @ - named key @%val - named value %val - default value - -- Don't work too hard,

Re: errno.h: ESTRPIPE

2009-03-12 Thread Eric Blake
om within Cygwin, so...? And it's not standardized, which means portable code shouldn't use it. -- Eric Blake

Re: [PATCH] Fix type inconsistencies in stdint.h

2009-04-07 Thread Eric Blake
then NOW is the only time worth doing it. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/

Re: [PATCH] Fix type inconsistencies in stdint.h

2009-04-07 Thread Eric Blake
st32_t): Define as int. Are there any corresponding patches needed to ? I haven't checked yet, but we should make absolutely sure that we are consistent across all uses of these types. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BE

avoid compiler warning with DEBUGGING

2009-05-20 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I noticed a complaint about comparing signed and unsigned values, when compiling with DEBUGGING enabled. net.cc also has a lot of trailing blanks. 2009-05-20 Eric Blake * net.cc (gethostby_helper): Use correct signedness. - -- Don&#

Re: mkstemps

2009-07-03 Thread Eric Blake
changes to mktemp.cc, modulo a changed variable name, mirror newlib): 2009-07-03 Eric Blake Add fpurge, mkstemps. * cygwin.din (fpurge, mkstemps): New exports. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * mktemp.cc (_gettemp): Add parameter.

Re: mkstemps

2009-07-03 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 7/3/2009 6:31 AM: > With that vote of confidence, here's the patch (the changes to mktemp.cc, > modulo a changed variable name, mirror newlib): > > 2009-07-03 Eric Blake > >

Re: mkstemps

2009-07-03 Thread Eric Blake
e arc4random approach to newlib? - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with

bug in dup2

2009-07-21 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 POSIX requires dup2(1,1) to return 1 (if stdout is open), not 0. I wonder how long that bug has been present? And the STC: #include int main() { return dup2 (1, 1); } 2009-07-21 Eric Blake * dtable.cc (dup2): Correct return value for

Re: fcntl bug

2009-09-03 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Christopher Faylor on 8/30/2009 6:55 PM: > On Sun, Aug 30, 2009 at 06:32:59PM -0600, Eric Blake wrote: >> According to Eric Blake on 8/24/2009 9:15 AM: >>> While we're at it, fcntl and dup2 both have another minor

Re: [1.7] bugs in faccessat

2009-09-03 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 9/3/2009 9:58 AM: > faccessat has at least two, and probably three bugs. Here's a fix for 1 (typo) and 3 (check for EINVAL in more places), but not for 2 (euidaccess, and the followup request of lchmod). 2009-09-

Re: [1.7] bugs in faccessat

2009-09-09 Thread Eric Blake
l sum total over the past. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - h

Re: [1.7] bugs in faccessat

2009-09-17 Thread Eric Blake
en processed yet? It's been more than a week since I mailed them, and although the USPS isn't lightning fast, a week is generally long enough for domestic mail. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE

Re: fcntl bug

2009-09-21 Thread Eric Blake
cc (fcntl64): Obey POSIX rules. >> * syscalls.cc (dup2): Likewise. > > Thanks for the patch. Go ahead and check this in. > > In particular, thanks for turning (100 * NOFILE_INCR) into a #define. Now applied. - -- Don't work too hard, make some time for fun as well! Eri

Re: [1.7] rename/renameat error

2009-09-23 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 9/22/2009 3:02 PM: > I've got a patch in testing for both of these issues. Does this look okay to apply? The fix in path.cc affects more than just link, hence I had to add a new option to keep mkdir("d/

Re: [1.7] rename/renameat error

2009-09-23 Thread Eric Blake
x27;t encountered anything it broke, but several things (like link("file","missing/")) that were fixed. But I'm not completely positive how symlinks to multi-level directories will behave, so I'm testing it further, and may need yet another tweak. - -- Don't work

Re: [1.7] rename/renameat error

2009-09-24 Thread Eric Blake
elf-contained, and make cygwin more consistent with Linux. For example: touch a ln -s c b link a b/ should fail because b/ is not an existing directory, but without this patch, it succeeds and creates the regular file c as a link to a. 2009-09-24 Eric Blake * syscalls.cc (link)

Re: [1.7] bugs in faccessat

2009-09-24 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 9/3/2009 9:58 AM: > Second, it is not performing the proper checks when AT_EACCESS is set and the > applications' effective id differs from the real id (to fix this would > require > adding a parameter

new exports

2009-09-24 Thread Eric Blake
t fchmodat(,AT_SYMLINK_NOFOLLOW) (aka BSD lchmod), so if/until we implement lchmod, we should not mistakenly change the permissions on the file the symlink is pointing to. I've also posted a newlib patch to declare e[uid]access. 2009-09-24 Eric Blake * syscalls.cc (fchownat): lchmod is not

Re: [1.7] Support for CJK Character Sets

2009-09-24 Thread Eric Blake
mp; 0212-1990)" and have your XP installation disk ready. Let's document this. 2009-09-24 Eric Blake * setup2.sgml (setup-locale-problems): Document how to install non-default charsets. - -- Don't work too hard, make some time for fun as well! Eric Blake

Re: [1.7] Support for CJK Character Sets

2009-09-25 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Corinna Vinschen on 9/25/2009 4:06 AM: >>> 2009-09-24 Eric Blake >>> >>> * setup2.sgml (setup-locale-problems): Document how to install >>> non-default charsets. >> Shoot. > >

Re: [1.7] bugs in faccessat

2009-09-25 Thread Eric Blake
- -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEA

Re: [1.7] rename/renameat error

2009-09-25 Thread Eric Blake
look now? >> >- char new_buf[strlen (newpath) + 5]; >> >+ if (isdirsep (newpath[nlen - 1]) || has_dot_last_component (newpath, >> >false)) > > Same observation: Couldn't newpath be zero length? Also fixed below; actually this one is fixed by using PC_NULL

fexecve, execvpe

2009-09-26 Thread Eric Blake
ch to new-features.sgml and tweaking unistd.h in newlib? P.S Any reason that "dtable.h" and "cygheap.h" aren't self-contained? 2009-09-26 Eric Blake * exec.cc (fexecve): New function. * cygwin.din (execvpe, fexecve): Export new fexecve and existing

Re: fexecve, execvpe

2009-09-26 Thread Eric Blake
her cygheap.h should include these files itself, so that clients don't have to do it. But I'm not too worried - there aren't that many clients. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Ver

Re: [1.7] rename/renameat error

2009-09-29 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Christopher Faylor on 9/26/2009 8:57 AM: >> But how does it look now? > > It looks good. Thanks. Please check in. I missed one corner case in my testing; how about this followup? 2009-09-29 Eric Blake *

Re: [1.7] rename/renameat error

2009-09-29 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Corinna Vinschen on 9/29/2009 1:35 PM: > On Sep 29 13:18, Eric Blake wrote: >> I missed one corner case in my testing; how about this followup? >> >> 2009-09-29 Eric Blake >> >> * syscalls.cc (

detect . in a/.//

2009-09-30 Thread Eric Blake
a=blob;f=tests/test-rename.h 2009-09-30 Eric Blake * path.cc (has_dot_last_component): Detect "a/.//". - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Publi

Re: detect . in a/.//

2009-09-30 Thread Eric Blake
7;t test for backslash path separator since that's a Win32 > path following Win32 rules. */ > const char *last_comp = strrchr (dir, '\0'); Looked like a decent rewrite to me, except why did you use strrchr instead of strchr to find the end of the string? - -- Don&#x

Re: [patch] Update build flags for new compiler feature

2009-10-04 Thread Eric Blake
he latest patch, but it was kind of kind of convenient being able to build under 1.5, as it meant fewer cygwin 1.7 processes to stop before installing a just-built dll. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- V

Re: fd leak in utimensat

2009-10-07 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 10/7/2009 9:04 PM: > I haven't spent time trying to locate where the leak is happening, but > process explorer confirms that this STC leaves a handle open to the file, > preventing further re-creation of a n

Re: utimensat UTIME_NOW granularity bug

2009-10-08 Thread Eric Blake
vailable from Windows. > > Why not send these type of musings to the cygwin-developers list? It really > is more appropriate for this type of discussion. Sorry about the wrong list. At any rate, what about this patch? 2009-10-08 Eric Blake * hires.h (hires_ms): Ch

Re: utimensat UTIME_NOW granularity bug

2009-10-09 Thread Eric Blake
two values: tv_nsec / 100 (nsecs) - scaling down tv_nsec * 10 (usecs) - scaling up so that x will be in terms of 100ns ticks. The relations should be: / 100 = 10/NSPERSEC = 10/1000 * 10 = NSPERSEC/100 = 1000/1000000 since NSPERSEC falls in between nanoseconds a

Re: utimensat UTIME_NOW granularity bug

2009-10-12 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 10/9/2009 6:45 AM: > OK, here's the respin without the churn. > >> It looks like you either don't need the systime() call or it should >> call systime_ns. > > Done. hires_us still uses s

Re: utimensat UTIME_NOW granularity bug

2009-10-12 Thread Eric Blake
e open. That way, the clock_gettime() is as close to the assignment as possible, rather than appearing to be early by the amount of time spent opening the handle. But with that change backed out, the patch is now in. - -- Don't work too hard, make some time for fun as well! Eric Bla

Re: [Patch] Allow to disable root privileges with CYGWIN=noroot

2009-10-13 Thread Eric Blake
tin_va_end() is a no-op for x86?] - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Com

Re: [Patch] Allow to disable root privileges with CYGWIN=noroot

2009-10-13 Thread Eric Blake
ever ported to a system where va_end is more >> than a no-op? [At least, I'm assuming that __builtin_va_end() is a no-op >> for x86?] > > That's probably a good idea, given that POSIX requires the usage of > va_end. PTC? Sure, I'll do an audit. - -- Don&#

missing va_end calls

2009-10-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 As promised: 2009-10-13 Eric Blake * external.cc (cygwin_internal): Use va_end. * fork.cc (child_copy): Likewise. * libc/bsdlib.cc (warn, warnx, err, errx): Likewise. * pinfo.cc (commune_request): Likewise

Re: Honor DESTDIR in w32api and mingw

2009-10-15 Thread Eric Blake
ill default it to empty, which can be changed by either 'make DESTDIR=...' or 'env DESTDIR=... make -e'. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Publi

Re: Honor DESTDIR in w32api and mingw

2009-10-18 Thread Eric Blake
e thinks it can be fixed. Complaining on the subscriber-only mingw is the wrong approach to get autoconf to even be aware of his complaint or ideas for improvement (not that me replying on the cygwin-patches list is any better ;) - -- Don't work too hard, make some time for fun as well! Eric Blake

Re: [PATCH] add get_nprocs, get_nprocs_conf

2009-11-11 Thread Eric Blake
orward to cygwin/sysinfo.h, rather than directly declaring the two functions? - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblak

fix setenv

2009-11-16 Thread Eric Blake
ot;a=b", "", 0) == -1); // and here assert (errno == EINVAL); errno = 0; assert (setenv (NULL, "", 0) == -1); assert (errno == EINVAL); // and here return 0; } 2009-11-16 Eric Blake * environ.cc (setenv): Detect invalid argument. (uns

patch: sleep/nanosleep bug

2009-11-18 Thread Eric Blake
leep (which fails), then checking the current time to see if enough elapsed time has occurred. 2009-11-18 Eric Blake * signal.cc (nanosleep): Support 'infinite' sleep times. (sleep): Avoid uninitialized memory. - -- Don't work too hard, make some time for fun as wel

Re: patch: sleep/nanosleep bug

2009-11-20 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Christopher Faylor on 11/18/2009 1:47 PM: > On Wed, Nov 18, 2009 at 01:13:53PM -0700, Eric Blake wrote: >> 2009-11-18 Eric Blake >> >> * signal.cc (nanosleep): Support 'infinite' sleep times. >&

Re: patch: sleep/nanosleep bug

2009-11-25 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 11/20/2009 7:15 AM: >>> * signal.cc (nanosleep): Support 'infinite' sleep times. >>> (sleep): Avoid uninitialized memory. >> Sorry but, while I agree with the basic idea, thi

Re: patch: sleep/nanosleep bug

2009-11-26 Thread Eric Blake
y likely that someone does 'sleep 50d', and the 100% CPU utilization bug in that case is not a regression since cygwin 1.5 did the same. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: Gnu

VCS and changelogs (was: console enhancements: mouse events etc)

2009-12-15 Thread Eric Blake
were to move to git, in which case the git-merge-changelog program from gnulib almost always merges ChangeLog entries exactly how I was expecting. Maybe I should go ahead and ITP that as a standalone program. - -- Don't work too hard, make some time for fun as well! Eric Blake e..

Re: patch: sleep/nanosleep bug

2009-12-17 Thread Eric Blake
lusion of this patch. > > So, thanks for the patch and please check in. This will then go into 1.7.2. Thanks; committed now. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment:

Re: patch: sleep/nanosleep bug

2009-12-18 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 12/17/2009 7:04 AM: > According to Christopher Faylor on 12/16/2009 9:08 AM: >>> How about the following, then? Same changelog. >> It wonder if your while (!done) loop could be expressed as a for loop but

match pty.h to glibc

2009-12-25 Thread Eric Blake
2009-12-26 Eric Blake * include/pty.h (openpty, forkpty): Mark last two arguments const, to match glibc 2.8. * libc/bsdlib.cc (openpty, forkpty): Likewise. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGI

Re: dup3/O_CLOEXEC/F_DUPFD_CLOEXEC

2010-01-13 Thread Eric Blake
should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* Written by Eric Blake , 2009, and Bruno Haible , 2009. */ #include #include #include #include #include #include #include #define ASSER

Re: dup3/O_CLOEXEC/F_DUPFD_CLOEXEC

2010-01-14 Thread Eric Blake
as open. So even though mq_open does not leak an fd to the current process, it should pass O_CLOEXEC as part of its internal open() call in order to avoid leaking the fd to unrelated child processes. -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu

Re: dup3/O_CLOEXEC/F_DUPFD_CLOEXEC

2010-01-14 Thread Eric Blake
use http://cygwin.com/acronyms/#SHTDI > and I have only so much time. I'm just trying to lay the groundwork > here. I'm not at all opposed to patches adding the still missing > functionality. Fair enough. -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net signature.asc Description: OpenPGP digital signature

Re: [PATCH] define SIGPWR

2010-02-26 Thread Eric Blake
nteractive "*P") (and (not (eq major-mode 'fundamental-mode)) (copyright-update arg)) nil) (add-hook 'before-save-hook 'my-copyright-update) -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

<    1   2