Re: malloc(0) crashing with SIGABRT
On 2019-09-11 20:59, Brian Inglis wrote: On 2019-09-09 11:13, Petr Skočík wrote: There's been a twitter discussion on how different POSIX platforms handle malloc(0): https://twitter.com/sortiecat/status/1170697927804817412 . As for Cygwin, the answer appears to be "not well", but this should be easy to fix. POSIX SUS V4 2018 says: "RETURN VALUE Upon successful completion with size not equal to 0, malloc() shall return a pointer to the allocated space. If size is 0, either: A null pointer shall be returned [CX] [Option Start] and errno may be set to an implementation-defined value, [Option End] or A pointer to the allocated space shall be returned. The application shall ensure that the pointer is not used to access an object. Otherwise, it shall return a null pointer [CX] [Option Start] and set errno to indicate the error. [Option End]" The second option could be implemented by a pointer to an unmapped page, or a reference to an inaccessible mmap-ed area length zero. That's easy: the null pointer, plus some small offset that observes alignment, like 16. (Alignment is important even if the memory isn't accessed, because nonportable programs depend on it for other reasons, like being able to use the least significant few bits of a pointer for tagging.) -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Where is igawk and why doesn't @include replicate this feature?
On 2019-09-11 05:52, Steven Penny wrote: > On Wed, 11 Sep 2019 16:54:49, Troy Kenah wrote: >> I used to embed @include junk.awk statements to reduce repetitive code but >> this no longer works. These were files were not functions, simply code >> snippets; this is the type of error I am now seeing: > Works fine here: > > $ gawk --version > GNU Awk 5.0.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.1.2) > > $ cat one.awk > function f1(n1) { > return n1 + 10 > } > > $ cat two.awk > @include "one.awk" > BEGIN { > print f1(20) > } > > $ unset POSIXLY_CORRECT > $ gawk -f two.awk > 30 > > Finally, I would make a suggestion. "@include" is not POSIX, so if you find > yourself relying on something like this more and more, it might be better to > switch to a proper programming language. Something like Perl, Lua or Tcl. Any number of files are supported with option -f repetition as are expressions with option -e repetition in any order. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: malloc(0) crashing with SIGABRT
On 2019-09-09 11:13, Petr Skočík wrote: > There's been a twitter discussion on how different POSIX platforms > handle malloc(0): https://twitter.com/sortiecat/status/1170697927804817412 . > > As for Cygwin, the answer appears to be "not well", but this should be > easy to fix. POSIX SUS V4 2018 says: "RETURN VALUE Upon successful completion with size not equal to 0, malloc() shall return a pointer to the allocated space. If size is 0, either: A null pointer shall be returned [CX] [Option Start] and errno may be set to an implementation-defined value, [Option End] or A pointer to the allocated space shall be returned. The application shall ensure that the pointer is not used to access an object. Otherwise, it shall return a null pointer [CX] [Option Start] and set errno to indicate the error. [Option End]" The second option could be implemented by a pointer to an unmapped page, or a reference to an inaccessible mmap-ed area length zero. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: retry: Problem transfering X11 cut/copy buffer to windows and back
I sometimes get in this situation where one and only one xterm receives a paste no matter which window (X or Windows) I'm trying to paste into. THIS IS NOT A BUG REPORT, my cygwin is pretty old. However I've found oddly enough if I go into the xterm receiving all the pastes and press CTRL-mousebutton, doesn't matter which button only that one of the xterm menus appears, "Main Options", "VT Fonts", whatever, might take a few tries, it seems to reset things and the pasting problem disappears w/o having to actually restart/reboot/etc anything. The menu only has to appear and then let it close, release the keypresses, nothing in the menu is clicked. YMMV. -- -Barry Shein Software Tool & Die| b...@theworld.com | http://www.TheWorld.com Purveyors to the Trade | Voice: +1 617-STD-WRLD | 800-THE-WRLD The World: Since 1989 | A Public Information Utility | *oo* -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Where is igawk and why doesn't @include replicate this feature?
On 2019-09-10 23:54, Troy Kenah wrote: Hi All, I have a large number of scripts that were using the the igawk script, however I have updated my gawk to a newer release that has obsoleted/removed the igawk script. Gawk's build system stopped installing igawk over five years ago: http://git.savannah.gnu.org/cgit/gawk.git/commit/?id=577ece63770a6c4b5ad00d6998127fb7e85b86b9 I used to embed @include junk.awk statements to reduce repetitive code but this no longer works. These were files were not functions, simply code snippets; this is the type of error I am now seeing: Clearly, the script is not exactly obsolete, since the @include facility in Gawk seems only to work with syntactically complete units, whereas igawk performs blind textual inclusion. If I were you, I'd just bring the igawk script into my code base and continue that way. It's a tiny script that is licensed as public domain; it doesn't carry much "technical debt" or licensing debt. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: retry: Problem transfering X11 cut/copy buffer to windows and back
On Wed, Sep 11, 2019 at 8:52 AM Jon Turney wrote: > > 1. Is there any information I can provide to help debug this problem? > > A reliable way of reproducing the problem would be ideal :) I wish! > Failing that, the /var/log/xwin/XWin.0.log might be informative. > > > 2. Is there a way to reset the X server's (or maybe Windows') > > copy/paste buffer without having to close all my X windows and restart > > the server? > > Not really. > > You can start the X server with the '-noclipboard' option, and then run > 'xwinclip' for clipboard integration (which since it is a separate > process, rather than a thread in the X server, can be killed and restarted). > > Ideally you'd then attach gdb to xwinclip if/when it gets stuck to debug > why that's happening. :) The next time I'm doing an activity which is likely to hit this, I'll see what I can get. -- Jim Reisert AD1C, , http://www.ad1c.us -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: XTerm(331)?
Thanks everyone, and Yaakov, for releasing (348). -- Jim Reisert AD1C, , http://www.ad1c.us -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
[ANNOUNCEMENT] tzcode/tzdata 2019c-1
The following packages have been uploaded to the Cygwin distribution: * tzcode-2019c-1 * tzdata-2019c-1 The Time Zone Database (often called tz or zoneinfo) contains code and data that represent the history of local time for many representative locations around the globe. It is updated periodically to reflect changes made by political bodies to time zone boundaries, UTC offsets, and daylight-saving rules. This release includes DST changes for Fiji and Norfolk Island: https://mm.icann.org/pipermail/tz-announce/2019-September/57.html -- Yaakov -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
[ANNOUNCEMENT] xterm 348-1
The following packages have been uploaded to the Cygwin distribution: * xterm-348-1 The xterm program is a terminal emulator for the X Window System. It provides DEC VT102 and Tektronix 4014 compatible terminals for programs that can't use the window system directly. This version implements ISO/ANSI colors using the 'new' color model (i.e., background color erase). It also implements most of the control sequences for VT220. This is an update to the latest upstream release. -- Yaakov -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
xterm 348-1
The following packages have been uploaded to the Cygwin distribution: * xterm-348-1 The xterm program is a terminal emulator for the X Window System. It provides DEC VT102 and Tektronix 4014 compatible terminals for programs that can't use the window system directly. This version implements ISO/ANSI colors using the 'new' color model (i.e., background color erase). It also implements most of the control sequences for VT220. This is an update to the latest upstream release. -- Yaakov
tzcode/tzdata 2019c-1
The following packages have been uploaded to the Cygwin distribution: * tzcode-2019c-1 * tzdata-2019c-1 The Time Zone Database (often called tz or zoneinfo) contains code and data that represent the history of local time for many representative locations around the globe. It is updated periodically to reflect changes made by political bodies to time zone boundaries, UTC offsets, and daylight-saving rules. This release includes DST changes for Fiji and Norfolk Island: https://mm.icann.org/pipermail/tz-announce/2019-September/57.html -- Yaakov
Re: XTerm(331)?
- Original Message - | From: "Jim Reisert AD1C" | To: "cygwin" | Sent: Wednesday, September 11, 2019 10:26:56 AM | Subject: XTerm(331)? | Can someone please update the Cygwin XTerm? The current version is | (330) but I understand (331) is out there, at least in Fedora: | | [JJR:~] $ xterm -version | XTerm(330) | | https://bugzilla.redhat.com/show_bug.cgi?id=1534475 | | "xterm-331-1.fc27 has been pushed to the Fedora 27 stable repository. | If problems still persist, please make note of it in this bug report." | | This was posted in June of 2018! ...and took 6 months (since 2017/12/30) for Redhat's packager to notice: https://invisible-island.net/xterm/xterm.log.html#xterm_331 patch #348 is current (2019/07/22) https://invisible-island.net/xterm/xterm.log.html#xterm_348 -- Thomas E. Dickey http://invisible-island.net ftp://ftp.invisible-island.net -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: printf, "unable to initialize PRN" message
Am 11.09.2019 um 02:03 schrieb Blair, Charles E III: > I have just installed cygwin (64 bit) and gcc. The "hello world" program > works, but > > #include > int main(){printf( "%c\n" , 'X' );return 0;} > > leads to > > Unable to initialize device PRN > Unable to initialize device PRN I suspect you've just rediscovered ancient knowledge, which dates back as far as MS-DOS 1.x: THOU SHALT NOT NAME THINGS "CON", "COM", "NUL" or "PRN" Those names are reserved for DOS device drivers (similar to, but much more pervasive, than Unix' /dev/printer' etc.) -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: XTerm(331)?
Am 11.09.2019 um 16:26 schrieb Jim Reisert AD1C: Can someone please update the Cygwin XTerm? The current version is (330) but I understand (331) is out there, at least in Fedora: [JJR:~] $ xterm -version XTerm(330) https://bugzilla.redhat.com/show_bug.cgi?id=1534475 "xterm-331-1.fc27 has been pushed to the Fedora 27 stable repository. Current xterm version is 348 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Where is igawk and why doesn't @include replicate this feature?
Troy Kenah writes: > I have a large number of scripts that were using the the igawk script, > however I have updated my gawk to a newer release that has > obsoleted/removed the igawk script. The semantics for @include are different between igawk and "native" gawk @include (since 4.x). The newer gawk versions treat @include statements like they would treat the --include option on the command line. In particular that means that each include is processed only once and you should (only) use it to define functions. The igawk script was removed from gawk in this commit http://git.savannah.gnu.org/cgit/gawk.git/commit/?id=577ece63770a6c4b5ad00d6998127fb7e85b86b9 but left in the manual, so you can resurrect it either from there or from Git: http://git.savannah.gnu.org/cgit/gawk.git/plain/awklib/eg/prog/igawk.sh Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf Q+, Q and microQ: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: retry: Problem transfering X11 cut/copy buffer to windows and back
On 11/09/2019 00:17, Jim Reisert AD1C wrote: I didn't see this message before I posted a separate message. Here is my report again. I am using the latest test X server (1.20.5-3 built 2019-09-06), HOWEVER, I have seen this problem again and again for months now. After I copy/paste enough, either from Xterm to Xterm, or Xterm to Windows, eventually it stops working. I can still select text in the Xterm, but I'm unable to paste it into windows - nothing happens. My fuzzy recollection is that copy/paste from X to X still works, but I forgot to test that today. The only way I have found to fix this is to exit the X server and restart it. Simply creating a new Xterm does not fix the problem. 1. Is there any information I can provide to help debug this problem? A reliable way of reproducing the problem would be ideal :) Failing that, the /var/log/xwin/XWin.0.log might be informative. 2. Is there a way to reset the X server's (or maybe Windows') copy/paste buffer without having to close all my X windows and restart the server? Not really. You can start the X server with the '-noclipboard' option, and then run 'xwinclip' for clipboard integration (which since it is a separate process, rather than a thread in the X server, can be killed and restarted). Ideally you'd then attach gdb to xwinclip if/when it gets stuck to debug why that's happening. :) -- Jon Turney Volunteer Cygwin/X X Server maintainer -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Fwd: Report
>1 [main] cntlm 14392 find_fast_cwd: WARNING: Couldn't compute FAST_CWD=20 >pointer. Please report this problem to >the public mailing list cygwin@cygwin.com >cygwin warning: > MS-DOS style path detected: C:\Program Files (x86)\Cntlm\cntlm.ini > Preferred POSIX equivalent is: /Cntlm/cntlm.ini > CYGWIN environment variable option "nodosfilewarning" turns off this warn= >ing. > Consult the user's guide for more details about POSIX paths: >http://cygwin.com/cygwin-ug-net/using.html#using-pathnames https://cygwin.com/faq.html#faq.using.fixing-find_fast_cwd-warnings -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Fwd: Report
1 [main] cntlm 14392 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer. Please report this problem to the public mailing list cygwin@cygwin.com cygwin warning: MS-DOS style path detected: C:\Program Files (x86)\Cntlm\cntlm.ini Preferred POSIX equivalent is: /Cntlm/cntlm.ini CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
XTerm(331)?
Can someone please update the Cygwin XTerm? The current version is (330) but I understand (331) is out there, at least in Fedora: [JJR:~] $ xterm -version XTerm(330) https://bugzilla.redhat.com/show_bug.cgi?id=1534475 "xterm-331-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report." This was posted in June of 2018! Thanks - Jim -- Jim Reisert AD1C, , http://www.ad1c.us -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Where is igawk and why doesn't @include replicate this feature?
On Wed, 11 Sep 2019 16:54:49, Troy Kenah wrote: I used to embed @include junk.awk statements to reduce repetitive code but this no longer works. These were files were not functions, simply code snippets; this is the type of error I am now seeing: gawk: get_FY2019Q1OIC.awk:28: @include "../inc/segments.awk" gawk: get_FY2019Q1OIC.awk:28: ^ syntax error gawk: get_FY2019Q1OIC.awk:36: fromdate=mktime("2019 09 01 00 00 00") gawk: get_FY2019Q1OIC.awk:36: ^ syntax error gawk: get_FY2019Q1OIC.awk:36: fromdate=mktime("2019 09 01 00 00 00") gawk: get_FY2019Q1OIC.awk:36: ^ 0 is invalid as number of arguments for mktime Works fine here: $ gawk --version GNU Awk 5.0.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.1.2) $ cat one.awk function f1(n1) { return n1 + 10 } $ cat two.awk @include "one.awk" BEGIN { print f1(20) } $ unset POSIXLY_CORRECT $ gawk -f two.awk 30 Finally, I would make a suggestion. "@include" is not POSIX, so if you find yourself relying on something like this more and more, it might be better to switch to a proper programming language. Something like Perl, Lua or Tcl. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Where is igawk and why doesn't @include replicate this feature?
Hi All, I have a large number of scripts that were using the the igawk script, however I have updated my gawk to a newer release that has obsoleted/removed the igawk script. I used to embed @include junk.awk statements to reduce repetitive code but this no longer works. These were files were not functions, simply code snippets; this is the type of error I am now seeing: gawk: get_FY2019Q1OIC.awk:28: @include "../inc/segments.awk" gawk: get_FY2019Q1OIC.awk:28: ^ syntax error gawk: get_FY2019Q1OIC.awk:36: fromdate=mktime("2019 09 01 00 00 00") gawk: get_FY2019Q1OIC.awk:36: ^ syntax error gawk: get_FY2019Q1OIC.awk:36: fromdate=mktime("2019 09 01 00 00 00") gawk: get_FY2019Q1OIC.awk:36: ^ 0 is invalid as number of arguments for mktime Any help would be much appreciated! Regards, Troy Kenah. 0416 273 135 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple