Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Sex dumps core (Sex is a Simple editor for X11) -- Seen on debian bugtracking


devel / comp.unix.programmer / Re: Experimental C Build System

SubjectAuthor
* Re: Experimental C Build Systemvallor
+* Re: Experimental C Build SystemNicolas George
|`* Re: Experimental C Build SystemScott Lurndal
| `* Re: Experimental C Build SystemLew Pitcher
|  +* Re: Experimental C Build SystemLawrence D'Oliveiro
|  |+* Re: Experimental C Build SystemScott Lurndal
|  ||`* Re: Experimental C Build SystemLawrence D'Oliveiro
|  || `* Re: Experimental C Build SystemLew Pitcher
|  ||  +- Re: Experimental C Build SystemScott Lurndal
|  ||  `- Re: Experimental C Build SystemLawrence D'Oliveiro
|  |`- Re: Experimental C Build SystemKeith Thompson
|  `* Re: Experimental C Build SystemNicolas George
|   `* Re: Experimental C Build Systemvallor
|    +* Re: Experimental C Build SystemLawrence D'Oliveiro
|    |`- Re: Experimental C Build Systemvallor
|    +* Re: Experimental C Build SystemNicolas George
|    |`- Re: Experimental C Build Systemvallor
|    +- Re: Experimental C Build SystemScott Lurndal
|    `* Re: Experimental C Build SystemKaz Kylheku
|     `- Re: Experimental C Build SystemGeoff Clare
+- Re: Experimental C Build Systemvallor
+* Re: Experimental C Build Systembart
|+* Re: Experimental C Build SystemDavid Brown
||+* Re: Experimental C Build Systembart
|||`* Re: Experimental C Build SystemDavid Brown
||| +- Re: Experimental C Build SystemMalcolm McLean
||| `* Re: Experimental C Build Systembart
|||  +* Re: Experimental C Build SystemMichael S
|||  |+* Re: Experimental C Build SystemScott Lurndal
|||  ||`- Re: Experimental C Build SystemChris M. Thomasson
|||  |`* Re: Experimental C Build SystemDavid Brown
|||  | `* Re: Experimental C Build SystemMichael S
|||  |  +- Re: Experimental C Build SystemLawrence D'Oliveiro
|||  |  +- Re: Experimental C Build SystemScott Lurndal
|||  |  `* Re: Experimental C Build SystemDavid Brown
|||  |   +* Re: Experimental C Build SystemMichael S
|||  |   |`* Re: Experimental C Build SystemDavid Brown
|||  |   | `* Re: Experimental C Build SystemMichael S
|||  |   |  `* Stu Feldman (Was: Experimental C Build System)Kenny McCormack
|||  |   |   `* Re: Stu Feldman (Was: Experimental C Build System)Kaz Kylheku
|||  |   |    `- Re: Stu Feldman (Was: Experimental C Build System)Janis Papanagnou
|||  |   `* Re: Experimental C Build Systembart
|||  |    +- Re: Experimental C Build SystemDavid Brown
|||  |    +* Re: Experimental C Build SystemScott Lurndal
|||  |    |+* Re: Experimental C Build Systembart
|||  |    ||`* Re: Experimental C Build SystemScott Lurndal
|||  |    || `* Re: Experimental C Build SystemMalcolm McLean
|||  |    ||  `- Re: Experimental C Build SystemScott Lurndal
|||  |    |`- Re: Experimental C Build SystemJanis Papanagnou
|||  |    `* Re: Experimental C Build SystemLawrence D'Oliveiro
|||  |     `* Re: Experimental C Build Systembart
|||  |      +* Re: Experimental C Build SystemLawrence D'Oliveiro
|||  |      |`* Re: Experimental C Build Systembart
|||  |      | +- Re: Experimental C Build SystemChris M. Thomasson
|||  |      | `* Re: Experimental C Build SystemLawrence D'Oliveiro
|||  |      |  +- Re: Experimental C Build SystemChris M. Thomasson
|||  |      |  `- Re: Experimental C Build SystemChris M. Thomasson
|||  |      +* Re: Experimental C Build SystemMalcolm McLean
|||  |      |+* Re: Experimental C Build SystemDavid Brown
|||  |      ||+* Re: Experimental C Build Systembart
|||  |      |||`* Re: Experimental C Build SystemLawrence D'Oliveiro
|||  |      ||| `- Re: Experimental C Build Systembart
|||  |      ||`* Re: Experimental C Build SystemMalcolm McLean
|||  |      || +* Re: Experimental C Build Systembart
|||  |      || |+* Re: Experimental C Build SystemMalcolm McLean
|||  |      || ||`- Re: Experimental C Build SystemDavid Brown
|||  |      || |`* Re: Experimental C Build SystemChris M. Thomasson
|||  |      || | `* Re: Experimental C Build Systembart
|||  |      || |  `* Re: Experimental C Build SystemChris M. Thomasson
|||  |      || |   `* Re: Experimental C Build Systembart
|||  |      || |    +- Re: Experimental C Build SystemChris M. Thomasson
|||  |      || |    +* Re: Experimental C Build SystemGary R. Schmidt
|||  |      || |    |`- Re: Experimental C Build SystemChris M. Thomasson
|||  |      || |    +* Re: Experimental C Build SystemMalcolm McLean
|||  |      || |    |+* Re: Experimental C Build SystemChris M. Thomasson
|||  |      || |    ||`- Re: Experimental C Build SystemChris M. Thomasson
|||  |      || |    |`* Re: Experimental C Build SystemDavid Brown
|||  |      || |    | `* Re: Experimental C Build SystemMalcolm McLean
|||  |      || |    |  `* Re: Experimental C Build SystemDavid Brown
|||  |      || |    |   `- Re: Experimental C Build SystemChris M. Thomasson
|||  |      || |    `* Re: Experimental C Build SystemKees Nuyt
|||  |      || |     +- Re: Experimental C Build SystemKeith Thompson
|||  |      || |     `- Re: Experimental C Build SystemScott Lurndal
|||  |      || +* Re: Experimental C Build SystemChris M. Thomasson
|||  |      || |`- Re: Experimental C Build SystemNicolas George
|||  |      || `* Re: Experimental C Build SystemLawrence D'Oliveiro
|||  |      ||  `- Re: Experimental C Build SystemChris M. Thomasson
|||  |      |+- Re: Experimental C Build SystemScott Lurndal
|||  |      |`- Re: Experimental C Build SystemLawrence D'Oliveiro
|||  |      `* Re: Experimental C Build SystemJanis Papanagnou
|||  |       +- Re: Experimental C Build SystemMalcolm McLean
|||  |       `* Re: Experimental C Build Systembart
|||  |        +* Re: Experimental C Build SystemKaz Kylheku
|||  |        |`* Re: Experimental C Build Systembart
|||  |        | +* Re: Experimental C Build SystemJim Jackson
|||  |        | |`- Re: Experimental C Build SystemChris M. Thomasson
|||  |        | `* Re: Experimental C Build SystemKaz Kylheku
|||  |        |  `- Re: Experimental C Build SystemtTh
|||  |        `* Re: Experimental C Build SystemDavid Brown
|||  |         `* Re: Experimental C Build Systembart
|||  |          +- Re: Experimental C Build SystemDavid Brown
|||  |          `* Re: Experimental C Build SystemLawrence D'Oliveiro
|||  `* Re: Experimental C Build SystemDavid Brown
||+- Re: Experimental C Build SystemKaz Kylheku
||`- Re: Experimental C Build SystemLawrence D'Oliveiro
|`* Re: Experimental C Build SystemRichard Harnden
`* Re: Experimental C Build SystemLawrence D'Oliveiro

Pages:123456789101112131415
Re: Experimental C Build System

<uq641q$2psod$3@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11384&group=comp.unix.programmer#11384

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Fri, 9 Feb 2024 21:04:58 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <uq641q$2psod$3@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <upleoi$34tr4$1@dont-email.me>
<uplhrp$35e9i$1@dont-email.me> <upo1cv$3lbbl$2@dont-email.me>
<upo5b4$3m4fu$1@dont-email.me> <upp43r$3s4nc$4@dont-email.me>
<upp8s5$3tmdd$2@dont-email.me> <upp90v$3tovf$1@dont-email.me>
<upr337$bgc8$2@dont-email.me> <20240205101236.81@kylheku.com>
<upv574$1a3hg$2@dont-email.me> <upvk3j$1cc05$1@dont-email.me>
<uq02vl$1erim$4@dont-email.me> <uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk> <87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me> <877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me> <871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me> <87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me> <uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 9 Feb 2024 21:04:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6b81b1b5b0886ece37827f7a23070dda";
logging-data="2945805"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ScYStJfhGp6KZte6KM66B"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:DXmRn8+AB6MUhv1/YbwYGCXTz1U=
 by: Lawrence D'Oliv - Fri, 9 Feb 2024 21:04 UTC

On Fri, 9 Feb 2024 15:49:45 +0000, bart wrote:

> Some people here seem to think that POSIX is an essential part of C, yet
> windows.c is not considered part of C on Windows.

Precisely. C was born on Unix. “Unix®” as such may be dead, but its
successor, POSIX, can be seen as basically the greatest run-time library
for C.

If Windows NT had not been created by a Unix hater, you would be having
much less trouble with it.

Re: Experimental C Build System

<uq6441$2psod$4@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11385&group=comp.unix.programmer#11385

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Fri, 9 Feb 2024 21:06:10 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <uq6441$2psod$4@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <upv574$1a3hg$2@dont-email.me>
<upvk3j$1cc05$1@dont-email.me> <uq02vl$1erim$4@dont-email.me>
<uq05ip$1fdph$1@dont-email.me> <874jektfn0.fsf@bsb.me.uk>
<87ttmkrxdv.fsf@bsb.me.uk> <uq27ig$1tcfa$1@dont-email.me>
<877cjfrx0p.fsf@bsb.me.uk> <uq2hkf$1v9f9$1@dont-email.me>
<871q9msxxd.fsf@bsb.me.uk> <uq31ts$22580$2@dont-email.me>
<87jzneqwqg.fsf@bsb.me.uk> <uq3uag$290lm$1@dont-email.me>
<uq41cs$2a4jh$1@dont-email.me> <uq5hip$2mgb3$3@dont-email.me>
<b6uxN.277837$Ama9.185969@fx12.iad> <uq63fn$2psf6$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 9 Feb 2024 21:06:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6b81b1b5b0886ece37827f7a23070dda";
logging-data="2945805"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/hc488v+nYlL5c5R/RDjWK"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:5ObOBwspIr/j9Jcl+Z5/yV3Fyr8=
 by: Lawrence D'Oliv - Fri, 9 Feb 2024 21:06 UTC

On Fri, 9 Feb 2024 20:55:19 +0000, bart wrote:

> That looks quite chummy to me, and even nepotic.

It’s your choice to be on the outside, looking in.

Come ... join us ...

Re: Experimental C Build System

<87y1btcpb3.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11386&group=comp.unix.programmer#11386

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Fri, 09 Feb 2024 13:15:12 -0800
Organization: None to speak of
Lines: 21
Message-ID: <87y1btcpb3.fsf@nosuchdomain.example.com>
References: <up8i91$h6iu$1@dont-email.me> <upv574$1a3hg$2@dont-email.me>
<upvk3j$1cc05$1@dont-email.me> <uq02vl$1erim$4@dont-email.me>
<uq05ip$1fdph$1@dont-email.me> <874jektfn0.fsf@bsb.me.uk>
<87ttmkrxdv.fsf@bsb.me.uk> <uq27ig$1tcfa$1@dont-email.me>
<877cjfrx0p.fsf@bsb.me.uk> <uq2hkf$1v9f9$1@dont-email.me>
<871q9msxxd.fsf@bsb.me.uk> <uq31ts$22580$2@dont-email.me>
<87jzneqwqg.fsf@bsb.me.uk> <uq3uag$290lm$1@dont-email.me>
<uq41cs$2a4jh$1@dont-email.me> <uq5hip$2mgb3$3@dont-email.me>
<b6uxN.277837$Ama9.185969@fx12.iad> <uq63fn$2psf6$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="639f38d912c33920e0e5a36e0f09675f";
logging-data="2951029"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/r/Xtd/rdraxQi9YZEUjnw"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:jA3O5ojiGJXhJ3ev2EzMOnbAEFs=
sha1:7CmWkXbfbq1UE6CKd8f8wlL+V4o=
 by: Keith Thompson - Fri, 9 Feb 2024 21:15 UTC

bart <bc@freeuk.com> writes:
> On 09/02/2024 18:25, Scott Lurndal wrote:
>> bart <bc@freeuk.com> writes:
[...]
>>> Some people here seem to think that POSIX is an essential part of C,
>> I don't recall anyone other than you thinking that.
>
> It's mentioned a LOT. Half the open source programs I try seem to use
> calls like 'open' instead of 'fopen', suggesting that the author
> seemed to think such a function is standard C, or that can be used as
> though it was standard.

Rather, I'd say it suggests that the author doesn't care about
portability to non-POSIX systems, which is perfectly sensible if the
program depends on POSIX-specific features anyway. Similarly, plenty of
C and C++ code depends on Windows features.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Re: Experimental C Build System

<20240209133810.84@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11387&group=comp.unix.programmer#11387

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!news.furie.org.uk!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Fri, 9 Feb 2024 21:56:50 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <20240209133810.84@kylheku.com>
References: <up8i91$h6iu$1@dont-email.me> <upleoi$34tr4$1@dont-email.me>
<uplhrp$35e9i$1@dont-email.me> <upo1cv$3lbbl$2@dont-email.me>
<upo5b4$3m4fu$1@dont-email.me> <upp43r$3s4nc$4@dont-email.me>
<upp8s5$3tmdd$2@dont-email.me> <upp90v$3tovf$1@dont-email.me>
<upr337$bgc8$2@dont-email.me> <20240205101236.81@kylheku.com>
<upv574$1a3hg$2@dont-email.me> <upvk3j$1cc05$1@dont-email.me>
<uq02vl$1erim$4@dont-email.me> <uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk> <87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me> <877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me> <871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me> <87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me> <uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me> <20240209084620.832@kylheku.com>
<uq5qkj$2oaag$1@dont-email.me> <20240209103252.434@kylheku.com>
<uq62l7$2pnbt$1@dont-email.me>
Injection-Date: Fri, 9 Feb 2024 21:56:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f0d9c4d56e1bf3d087a60d362bc7520c";
logging-data="2966980"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/9mL9ke9QvI5r4kE9Ktzd8wT0hjE2LVyg="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:NZSc9Fq3nHuW0K2iwNhulRuqlg4=
 by: Kaz Kylheku - Fri, 9 Feb 2024 21:56 UTC

On 2024-02-09, bart <bc@freeuk.com> wrote:
>> MSVCRT.DLL is not documented for public use; when you link to it,
>> you're sticking a fork into the proverbial toaster. UCRT is different.
>>
>
> What exactly to you mean by UCRT; ucrtbase.dll?
>
> That's missing a few useful things, like '_getmainargs' (used to get
> argn, argv for main()), and obscure functions like 'printf'.

I believe printf is in there.

_getmainargs isn't; that's in a VC run time library.

> Meanwhile, if I look at programs such as gcc.exe, as.exe, ld.exe, not
> only do THEY import msvcrt.dll, but the EXEs produced by gcc.exe do so too.

Umm, no; you must be talking specifically about the MinGW ones.

> So they didn't get the memo.

They got the memo. The issue is that even though MSVCRT.DLL is
undocumented, it constitutes a "system library". This is important.

The GNU Public license prohibits programs from being linked to
proprietary code --- but it has an exception for system libraries
(libraries that are part of the target platform where the program runs).

Using MSVCRT.DLL is like sticking a fork in the toaster, but all those
programs being linked to MSVCRT.DLL means the GPL isn't violated.

Compilers under Cygwin don't link to MSVCRT.DLL --- including the ones
in the Cygwin MingW package. (Yes, Cygwin has a package of MinGW
compilers. If you have Cygwin, you just install that, and then you can
build MinGW programs. The built programs probably still link to
MSVCRT.DLL as far as I know. Cygwin itself uses this MinGW compiler
package for compiling some of its components, like the setup.exe program
and I think the cygwin1.dll also.)

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Experimental C Build System

<20240209135733.479@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11388&group=comp.unix.programmer#11388

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Fri, 9 Feb 2024 22:09:27 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <20240209135733.479@kylheku.com>
References: <up8i91$h6iu$1@dont-email.me> <upv574$1a3hg$2@dont-email.me>
<upvk3j$1cc05$1@dont-email.me> <uq02vl$1erim$4@dont-email.me>
<uq05ip$1fdph$1@dont-email.me> <874jektfn0.fsf@bsb.me.uk>
<87ttmkrxdv.fsf@bsb.me.uk> <uq27ig$1tcfa$1@dont-email.me>
<877cjfrx0p.fsf@bsb.me.uk> <uq2hkf$1v9f9$1@dont-email.me>
<871q9msxxd.fsf@bsb.me.uk> <uq31ts$22580$2@dont-email.me>
<87jzneqwqg.fsf@bsb.me.uk> <uq3uag$290lm$1@dont-email.me>
<uq41cs$2a4jh$1@dont-email.me> <uq5hip$2mgb3$3@dont-email.me>
<b6uxN.277837$Ama9.185969@fx12.iad> <uq63fn$2psf6$1@dont-email.me>
Injection-Date: Fri, 9 Feb 2024 22:09:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f0d9c4d56e1bf3d087a60d362bc7520c";
logging-data="2972025"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/cEi/U0HzkcRt7jBMtsxpgTPOiCSxn0JU="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:x4jFqoYWdI+z8uEgYO5oGC1F/t0=
 by: Kaz Kylheku - Fri, 9 Feb 2024 22:09 UTC

On 2024-02-09, bart <bc@freeuk.com> wrote:
> It's mentioned a LOT. Half the open source programs I try seem to use
> calls like 'open' instead of 'fopen', suggesting that the author seemed
> to think such a function is standard C, or that can be used as though it
> was standard.

Open source programs tend to use POSIX functions because POSIX is
associated with open source.

The most successful open source operating systems we have are all
POSIX-based. Open source programs target open source platforms.
It's a no-brainer.

If you need functionality beyond what is in ISO C, POSIX is more
portable than the alternatives.

For instance, suppose we would like to write a cross-platform programs
that works with serial ports. It has to control baud rate, framing, and
whether hardware handshaking is enable and all that.

If we write that using the POSIX API in <termios.h>, it can easily
be made to run on Linux, Windows, Mac, BSD, ...

If we use the Win32 API for serial control, it will run on Windows.
Maybe on Linux using Wine, and ReactOS, ...

In the TXR project, I use <termios.h> to put the TTY in raw mode for the
editing features in the REPL, together with ANSI escape sequences.
This works fine on Windows: there is a termios implementation in Cygwin,
as well as a translation layer that converts ANSI escapes to
Win32 Console API calls. I can ship this stand-alone without Cygwin and
it runs fine in a cmd.exe Window.

I'd be silly not to use POSIX, because then I would have to write
that separately for Windows.

Among other things I can do in POSIX (including on Windows) is use poll
for all file descriptors, including sockets.

I can open a FILE * stream on a socket using fdopen(fd, "...mode...").

POSIX is the most widely implemented operating system interface
standard.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Experimental C Build System

<uq69q8$2qti2$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11389&group=comp.unix.programmer#11389

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Fri, 9 Feb 2024 22:43:21 +0000
Organization: A noiseless patient Spider
Lines: 72
Message-ID: <uq69q8$2qti2$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <upleoi$34tr4$1@dont-email.me>
<uplhrp$35e9i$1@dont-email.me> <upo1cv$3lbbl$2@dont-email.me>
<upo5b4$3m4fu$1@dont-email.me> <upp43r$3s4nc$4@dont-email.me>
<upp8s5$3tmdd$2@dont-email.me> <upp90v$3tovf$1@dont-email.me>
<upr337$bgc8$2@dont-email.me> <20240205101236.81@kylheku.com>
<upv574$1a3hg$2@dont-email.me> <upvk3j$1cc05$1@dont-email.me>
<uq02vl$1erim$4@dont-email.me> <uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk> <87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me> <877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me> <871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me> <87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me> <uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me> <20240209084620.832@kylheku.com>
<uq5qkj$2oaag$1@dont-email.me> <20240209103252.434@kylheku.com>
<uq62l7$2pnbt$1@dont-email.me> <20240209133810.84@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 9 Feb 2024 22:43:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7249358d931a886a5d72096d92eeb1eb";
logging-data="2979394"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MPXZfr6swZMIT++/KuK7SmKs/SZMNdnQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:HmYByf1qQlvhTSqaOjF4mfmMIRE=
Content-Language: en-GB
In-Reply-To: <20240209133810.84@kylheku.com>
 by: bart - Fri, 9 Feb 2024 22:43 UTC

On 09/02/2024 21:56, Kaz Kylheku wrote:
> On 2024-02-09, bart <bc@freeuk.com> wrote:
>>> MSVCRT.DLL is not documented for public use; when you link to it,
>>> you're sticking a fork into the proverbial toaster. UCRT is different.
>>>
>>
>> What exactly to you mean by UCRT; ucrtbase.dll?
>>
>> That's missing a few useful things, like '_getmainargs' (used to get
>> argn, argv for main()), and obscure functions like 'printf'.
>
> I believe printf is in there.

Not under my ucrtbase.dll if that's the right file. If it was there, it
would go somewhere in here:

2332 00031F90 204688 Fun pow
2333 00033630 210480 Fun powf
2334 00058740 362304 Fun putc
2335 00080BE0 527328 Fun putchar
2336 00059660 366176 Fun puts

I suspect this is used by MS programs which may have their own wrappers
around 'printf'.

> _getmainargs isn't; that's in a VC run time library.
>
>> Meanwhile, if I look at programs such as gcc.exe, as.exe, ld.exe, not
>> only do THEY import msvcrt.dll, but the EXEs produced by gcc.exe do so too.
>
> Umm, no; you must be talking specifically about the MinGW ones.

I'm talking about lots of binaries, for example:

raylib.dll
opengl.dll
sdl2.dll
sqlite3_32.dll
s7.exe
tcc.exe
nim.exe
nasm.exe

>> So they didn't get the memo.
>
> They got the memo. The issue is that even though MSVCRT.DLL is
> undocumented, it constitutes a "system library". This is important.

If they got rid of it, half the programs that run under Windows would
stop working.

> The GNU Public license prohibits programs from being linked to
> proprietary code --- but it has an exception for system libraries
> (libraries that are part of the target platform where the program runs).
>
> Using MSVCRT.DLL is like sticking a fork in the toaster, but all those
> programs being linked to MSVCRT.DLL means the GPL isn't violated.
>
> Compilers under Cygwin don't link to MSVCRT.DLL --- including the ones
> in the Cygwin MingW package. (Yes, Cygwin has a package of MinGW
> compilers. If you have Cygwin, you just install that, and then you can
> build MinGW programs. The built programs probably still link to
> MSVCRT.DLL as far as I know. Cygwin itself uses this MinGW compiler
> package for compiling some of its components, like the setup.exe program
> and I think the cygwin1.dll also.)
>

I'm no idea what the point of CYGWIN is. Never have done either. What
does it bring to the table? Presumably to make some programs that
originate on Linux feel more at home, instead of making the effort to
make them more portable.

Re: Experimental C Build System

<uq69qt$2r05q$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11390&group=comp.unix.programmer#11390

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!news.bbs.nz!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Fri, 9 Feb 2024 22:43:41 +0000
Organization: A noiseless patient Spider
Lines: 72
Message-ID: <uq69qt$2r05q$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <upleoi$34tr4$1@dont-email.me>
<uplhrp$35e9i$1@dont-email.me> <upo1cv$3lbbl$2@dont-email.me>
<upo5b4$3m4fu$1@dont-email.me> <upp43r$3s4nc$4@dont-email.me>
<upp8s5$3tmdd$2@dont-email.me> <upp90v$3tovf$1@dont-email.me>
<upr337$bgc8$2@dont-email.me> <20240205101236.81@kylheku.com>
<upv574$1a3hg$2@dont-email.me> <upvk3j$1cc05$1@dont-email.me>
<uq02vl$1erim$4@dont-email.me> <uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk> <87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me> <877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me> <871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me> <87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me> <uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me> <20240209084620.832@kylheku.com>
<uq5qkj$2oaag$1@dont-email.me> <20240209103252.434@kylheku.com>
<uq62l7$2pnbt$1@dont-email.me> <20240209133810.84@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 9 Feb 2024 22:43:41 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7249358d931a886a5d72096d92eeb1eb";
logging-data="2982074"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kGDkgdSwk9blKi3hYwMkJINVGenn4qXc="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Zv2bwT2k9w7XY92/K2g1HjNojDA=
In-Reply-To: <20240209133810.84@kylheku.com>
Content-Language: en-GB
 by: bart - Fri, 9 Feb 2024 22:43 UTC

On 09/02/2024 21:56, Kaz Kylheku wrote:
> On 2024-02-09, bart <bc@freeuk.com> wrote:
>>> MSVCRT.DLL is not documented for public use; when you link to it,
>>> you're sticking a fork into the proverbial toaster. UCRT is different.
>>>
>>
>> What exactly to you mean by UCRT; ucrtbase.dll?
>>
>> That's missing a few useful things, like '_getmainargs' (used to get
>> argn, argv for main()), and obscure functions like 'printf'.
>
> I believe printf is in there.

Not under my ucrtbase.dll if that's the right file. If it was there, it
would go somewhere in here:

2332 00031F90 204688 Fun pow
2333 00033630 210480 Fun powf
2334 00058740 362304 Fun putc
2335 00080BE0 527328 Fun putchar
2336 00059660 366176 Fun puts

I suspect this is used by MS programs which may have their own wrappers
around 'printf'.

> _getmainargs isn't; that's in a VC run time library.
>
>> Meanwhile, if I look at programs such as gcc.exe, as.exe, ld.exe, not
>> only do THEY import msvcrt.dll, but the EXEs produced by gcc.exe do so too.
>
> Umm, no; you must be talking specifically about the MinGW ones.

I'm talking about lots of binaries, for example:

raylib.dll
opengl.dll
sdl2.dll
sqlite3_32.dll
s7.exe
tcc.exe
nim.exe
nasm.exe

>> So they didn't get the memo.
>
> They got the memo. The issue is that even though MSVCRT.DLL is
> undocumented, it constitutes a "system library". This is important.

If they got rid of it, half the programs that run under Windows would
stop working.

> The GNU Public license prohibits programs from being linked to
> proprietary code --- but it has an exception for system libraries
> (libraries that are part of the target platform where the program runs).
>
> Using MSVCRT.DLL is like sticking a fork in the toaster, but all those
> programs being linked to MSVCRT.DLL means the GPL isn't violated.
>
> Compilers under Cygwin don't link to MSVCRT.DLL --- including the ones
> in the Cygwin MingW package. (Yes, Cygwin has a package of MinGW
> compilers. If you have Cygwin, you just install that, and then you can
> build MinGW programs. The built programs probably still link to
> MSVCRT.DLL as far as I know. Cygwin itself uses this MinGW compiler
> package for compiling some of its components, like the setup.exe program
> and I think the cygwin1.dll also.)
>

I'm no idea what the point of CYGWIN is. Never have done either. What
does it bring to the table? Presumably to make some programs that
originate on Linux feel more at home, instead of making the effort to
make them more portable.

Re: Experimental C Build System

<20240209145219.966@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11391&group=comp.unix.programmer#11391

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Fri, 9 Feb 2024 23:12:11 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 97
Message-ID: <20240209145219.966@kylheku.com>
References: <up8i91$h6iu$1@dont-email.me> <upleoi$34tr4$1@dont-email.me>
<uplhrp$35e9i$1@dont-email.me> <upo1cv$3lbbl$2@dont-email.me>
<upo5b4$3m4fu$1@dont-email.me> <upp43r$3s4nc$4@dont-email.me>
<upp8s5$3tmdd$2@dont-email.me> <upp90v$3tovf$1@dont-email.me>
<upr337$bgc8$2@dont-email.me> <20240205101236.81@kylheku.com>
<upv574$1a3hg$2@dont-email.me> <upvk3j$1cc05$1@dont-email.me>
<uq02vl$1erim$4@dont-email.me> <uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk> <87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me> <877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me> <871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me> <87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me> <uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me> <20240209084620.832@kylheku.com>
<uq5qkj$2oaag$1@dont-email.me> <20240209103252.434@kylheku.com>
<uq62l7$2pnbt$1@dont-email.me> <20240209133810.84@kylheku.com>
<uq69q8$2qti2$1@dont-email.me>
Injection-Date: Fri, 9 Feb 2024 23:12:11 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3de03a7474c831a6f9d55487e9415a62";
logging-data="2991342"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18YScrZAYtnEpKWWkJETKiDn57LMDtih6M="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:9RvG3+ip0PQ9dmUAuqg5oATCNWA=
 by: Kaz Kylheku - Fri, 9 Feb 2024 23:12 UTC

On 2024-02-09, bart <bc@freeuk.com> wrote:
> On 09/02/2024 21:56, Kaz Kylheku wrote:
>> On 2024-02-09, bart <bc@freeuk.com> wrote:
>>>> MSVCRT.DLL is not documented for public use; when you link to it,
>>>> you're sticking a fork into the proverbial toaster. UCRT is different.
>>>>
>>>
>>> What exactly to you mean by UCRT; ucrtbase.dll?
>>>
>>> That's missing a few useful things, like '_getmainargs' (used to get
>>> argn, argv for main()), and obscure functions like 'printf'.
>>
>> I believe printf is in there.
>
> Not under my ucrtbase.dll if that's the right file. If it was there, it
> would go somewhere in here:
>
> 2332 00031F90 204688 Fun pow
> 2333 00033630 210480 Fun powf
> 2334 00058740 362304 Fun putc
> 2335 00080BE0 527328 Fun putchar
> 2336 00059660 366176 Fun puts

Hmm. Lots of hits for identifiers containing printf:

$ strings ucrtbase.dll | grep printf
__conio_common_vcprintf
__conio_common_vcprintf_p
__conio_common_vcprintf_s
__conio_common_vcwprintf
[ SNIP ]
__stdio_common_vfprintf
__stdio_common_vfprintf_p
[ SNIP ]
__stdio_common_vfprintf_s
__stdio_common_vfwprintf
__stdio_common_vfwprintf_p
[ SNIP ]
_get_printf_count_output
[ SNIP ]
_o___conio_common_vcprintf
[ SNIP]
_o___stdio_common_vfwprintf_p
[ SNIP]
_set_printf_count_output

> I suspect this is used by MS programs which may have their own wrappers
> around 'printf'.

This seems to be documented:

"In Visual Studio 2015 The printf and scanf family of functions were
declared as inline and moved to the <stdio.h> and <conio.h> headers."

https://learn.microsoft.com/en-us/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions?view=msvc-170

I'm guessing that these inline functions call one of those symbols
found above, like maybe __stdio_common_vfprintf?

>> only do THEY import msvcrt.dll, but the EXEs produced by gcc.exe do so too.
>>
>> Umm, no; you must be talking specifically about the MinGW ones.
>
> I'm talking about lots of binaries, for example:
>
> raylib.dll
> opengl.dll
> sdl2.dll
> sqlite3_32.dll
> s7.exe
> tcc.exe
> nim.exe
> nasm.exe
>
>>> So they didn't get the memo.
>>
>> They got the memo. The issue is that even though MSVCRT.DLL is
>> undocumented, it constitutes a "system library". This is important.
>
> If they got rid of it, half the programs that run under Windows would
> stop working.

I suspect, mainly just these fledgling ports of unix cruft to Windows.

Most of the Windows world wouldn't notice.

> I'm no idea what the point of CYGWIN is. Never have done either. What
> does it bring to the table? Presumably to make some programs that
> originate on Linux feel more at home, instead of making the effort to
> make them more portable.

The effort is significant. Many things have to be coded twice.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Experimental C Build System

<87ttmhciii.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11392&group=comp.unix.programmer#11392

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Fri, 09 Feb 2024 15:41:57 -0800
Organization: None to speak of
Lines: 38
Message-ID: <87ttmhciii.fsf@nosuchdomain.example.com>
References: <up8i91$h6iu$1@dont-email.me> <upvk3j$1cc05$1@dont-email.me>
<uq02vl$1erim$4@dont-email.me> <uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk> <87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me> <877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me> <871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me> <87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me> <uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me> <20240209084620.832@kylheku.com>
<uq5qkj$2oaag$1@dont-email.me> <20240209103252.434@kylheku.com>
<uq62l7$2pnbt$1@dont-email.me> <20240209133810.84@kylheku.com>
<uq69q8$2qti2$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="3b6abb86f0f3816027ad8c34cf97d3ff";
logging-data="2997642"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/m0tntNgDFr18KF5XMcnBo"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:qcR91PcNjY7liMEczP+WYO/sL/M=
sha1:evOkPqxcwcwV6DFe64+70jah+Cs=
 by: Keith Thompson - Fri, 9 Feb 2024 23:41 UTC

bart <bc@freeuk.com> writes:
> On 09/02/2024 21:56, Kaz Kylheku wrote:
>> On 2024-02-09, bart <bc@freeuk.com> wrote:
[...]
>>> So they didn't get the memo.
>> They got the memo. The issue is that even though MSVCRT.DLL is
>> undocumented, it constitutes a "system library". This is important.
>
> If they got rid of it, half the programs that run under Windows would
> stop working.

Who suggested getting rid of it?

[...]

> I'm no idea what the point of CYGWIN is. Never have done either.

Are you asking?

> What
> does it bring to the table? Presumably to make some programs that
> originate on Linux feel more at home, instead of making the effort to
> make them more portable.

It provides an environment, running under Windows, that resembles a
typical Linux desktop environment. I use it every day myself, because
that's a valuable thing for me. If it's not valuable for you, that's
fine. (I also use WSL for some things.)

I use a lot of programs that happen to rely on a POSIX interface.
Cygwin lets those programs run under Windows. Modifying those programs
to work more directly under Windows would be a tremendous amount of work
that nobody is going to do.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Re: Experimental C Build System

<uq6dhq$2ril5$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11393&group=comp.unix.programmer#11393

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Fri, 9 Feb 2024 23:47:06 +0000
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <uq6dhq$2ril5$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <upleoi$34tr4$1@dont-email.me>
<uplhrp$35e9i$1@dont-email.me> <upo1cv$3lbbl$2@dont-email.me>
<upo5b4$3m4fu$1@dont-email.me> <upp43r$3s4nc$4@dont-email.me>
<upp8s5$3tmdd$2@dont-email.me> <upp90v$3tovf$1@dont-email.me>
<upr337$bgc8$2@dont-email.me> <20240205101236.81@kylheku.com>
<upv574$1a3hg$2@dont-email.me> <upvk3j$1cc05$1@dont-email.me>
<uq02vl$1erim$4@dont-email.me> <uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk> <87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me> <877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me> <871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me> <87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me> <uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me> <20240209084620.832@kylheku.com>
<uq5qkj$2oaag$1@dont-email.me> <20240209103252.434@kylheku.com>
<uq62l7$2pnbt$1@dont-email.me> <20240209133810.84@kylheku.com>
<uq69q8$2qti2$1@dont-email.me> <20240209145219.966@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 9 Feb 2024 23:47:06 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="174e203a272e08607ec691b159e8c7c3";
logging-data="3000997"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX196I7LYVKrczT5mi//grrl4MJPfVLRZaDk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:XxR4u96yYmeEtyb8q/GR3WeY5RA=
In-Reply-To: <20240209145219.966@kylheku.com>
Content-Language: en-GB
 by: bart - Fri, 9 Feb 2024 23:47 UTC

On 09/02/2024 23:12, Kaz Kylheku wrote:
> On 2024-02-09, bart <bc@freeuk.com> wrote:

>> I'm no idea what the point of CYGWIN is. Never have done either. What
>> does it bring to the table? Presumably to make some programs that
>> originate on Linux feel more at home, instead of making the effort to
>> make them more portable.
>
> The effort is significant. Many things have to be coded twice.
>

Well, you need to support both OSes.

My stuff uses one module in the language library which is OS-specific.

At one point I had three versions for three OS targets. It is
effectively a mini cross-platform wrapper around some OS functions.

So for example, to get the address of a function in a shared library
given an instance handle to the library, the Windows version is:

export func os_getdllprocaddr(int hinst, ichar name)ref void=
GetProcAddress(cast(hinst), name)
end

The Linux version is this:

export func os_getdllprocaddr(int hlib, ichar name)ref void=
dlsym(cast(int(hlib)), name)
end

(The third one was OS-neutral. Neither GetProcAddress or dlsym were
available, but to be able to run some programs, 20 or so addresses of
common functions in the C library were hardcoded in a table.)

It is then just a question of including the right OS-specific module.

If rendered to C source code, there would be one .c version for Linux,
and one for Windows, since I dislike using conditional blocks.

Or sometimes (using that third version) a single .c file worked for
both, but with limited functionality. It was for demos.

As I understand your view, you want the Linux program to just call
dlsym(), and need all these subsystems on Windows to make it appear as
though that was natively available.

Re: Experimental C Build System

<uq6dtt$2ril5$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11394&group=comp.unix.programmer#11394

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Fri, 9 Feb 2024 23:53:34 +0000
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <uq6dtt$2ril5$2@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <upvk3j$1cc05$1@dont-email.me>
<uq02vl$1erim$4@dont-email.me> <uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk> <87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me> <877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me> <871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me> <87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me> <uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me> <20240209084620.832@kylheku.com>
<uq5qkj$2oaag$1@dont-email.me> <20240209103252.434@kylheku.com>
<uq62l7$2pnbt$1@dont-email.me> <20240209133810.84@kylheku.com>
<uq69q8$2qti2$1@dont-email.me> <87ttmhciii.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 9 Feb 2024 23:53:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="174e203a272e08607ec691b159e8c7c3";
logging-data="3000997"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+8YQm/kitBINKpaiJA20PsCLH3yJAO4Q="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:qrseraUD3HBBFsVrB06MIMYhy2w=
Content-Language: en-GB
In-Reply-To: <87ttmhciii.fsf@nosuchdomain.example.com>
 by: bart - Fri, 9 Feb 2024 23:53 UTC

On 09/02/2024 23:41, Keith Thompson wrote:
> bart <bc@freeuk.com> writes:
>> On 09/02/2024 21:56, Kaz Kylheku wrote:
>>> On 2024-02-09, bart <bc@freeuk.com> wrote:
> [...]
>>>> So they didn't get the memo.
>>> They got the memo. The issue is that even though MSVCRT.DLL is
>>> undocumented, it constitutes a "system library". This is important.
>>
>> If they got rid of it, half the programs that run under Windows would
>> stop working.
>
> Who suggested getting rid of it?
>
> [...]
>
>> I'm no idea what the point of CYGWIN is. Never have done either.
>
> Are you asking?
>
>> What
>> does it bring to the table? Presumably to make some programs that
>> originate on Linux feel more at home, instead of making the effort to
>> make them more portable.
>
> It provides an environment, running under Windows, that resembles a
> typical Linux desktop environment. I use it every day myself, because
> that's a valuable thing for me. If it's not valuable for you, that's
> fine. (I also use WSL for some things.)
>
> I use a lot of programs that happen to rely on a POSIX interface.
> Cygwin lets those programs run under Windows.

Run or build? If you have a binary, then having a way to run that on a
different OS under some emulation layer is fair enough.

Some people run Windows programs under Linux, or even Macs (although
I've never had much luck with 'wine' myself).

But it seems to be a lot more than that; I can't say more as it's so
long since I tried to use it.

Re: Experimental C Build System

<20240209160015.712@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11395&group=comp.unix.programmer#11395

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Sat, 10 Feb 2024 00:16:06 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <20240209160015.712@kylheku.com>
References: <up8i91$h6iu$1@dont-email.me> <upvk3j$1cc05$1@dont-email.me>
<uq02vl$1erim$4@dont-email.me> <uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk> <87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me> <877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me> <871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me> <87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me> <uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me> <20240209084620.832@kylheku.com>
<uq5qkj$2oaag$1@dont-email.me> <20240209103252.434@kylheku.com>
<uq62l7$2pnbt$1@dont-email.me> <20240209133810.84@kylheku.com>
<uq69q8$2qti2$1@dont-email.me> <87ttmhciii.fsf@nosuchdomain.example.com>
<uq6dtt$2ril5$2@dont-email.me>
Injection-Date: Sat, 10 Feb 2024 00:16:06 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3de03a7474c831a6f9d55487e9415a62";
logging-data="3008957"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+gzEHN0n0yWuiUeo1RCim0dhEnnBj/2dE="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:+VI6CeZbbi+eTA3nJ36JjYjLxwU=
 by: Kaz Kylheku - Sat, 10 Feb 2024 00:16 UTC

On 2024-02-09, bart <bc@freeuk.com> wrote:
> On 09/02/2024 23:41, Keith Thompson wrote:
>> I use a lot of programs that happen to rely on a POSIX interface.
>> Cygwin lets those programs run under Windows.
>
> Run or build? If you have a binary, then having a way to run that on a
> different OS under some emulation layer is fair enough.

It's both. Cygwin provides the build environment with all the tools,
plus the run-time environment also.

Cygwin isn't an emulation layer. It's a run-time library. The main
one is cygwin1.dll. A Cygwin program uses that as its C run time,
instead of ucrtbase.dll or msvcrt.dll.

Nothing is "emulated". The library has various POSIX functions in it, and
those are implemented in terms of the Win32 APIs.

Microsoft's libraries also have some features like this. For instance,
Microsoft has POSIX-like functions (with leading underscores added) like
_popen, and _dup and whatnot. Cygwin removes the underscores and does a
much more thorough job of implementing many more functions, with greater
fidelity.

I maintain a very useful fork of the Cygwin run-time called Cygnal.

Cygnal took a pretty low amount of effort do develop. From time to
time I rebase it to the current Cygwin.

Cygnal claws back some of the "too POSIXY" conventions in the Cygwin
run-time, making it suitable as a run-time library for "native" Windows
programs. Cygnal programs won't suprise Windows users with foreign
conventions, or certain broken behaviors due to being run outside of the
Cygwin installation.

All the changes are documented in a table presented in the home page?

https://www.kylheku.com/cygnal/

> Some people run Windows programs under Linux, or even Macs (although
> I've never had much luck with 'wine' myself).

Cygwin won't run Linux programs on Windows; it's not like Wine.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Experimental C Build System

<20240209161634.475@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11396&group=comp.unix.programmer#11396

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!news.nntp4.net!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Sat, 10 Feb 2024 00:28:43 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 66
Message-ID: <20240209161634.475@kylheku.com>
References: <up8i91$h6iu$1@dont-email.me> <uplhrp$35e9i$1@dont-email.me>
<upo1cv$3lbbl$2@dont-email.me> <upo5b4$3m4fu$1@dont-email.me>
<upp43r$3s4nc$4@dont-email.me> <upp8s5$3tmdd$2@dont-email.me>
<upp90v$3tovf$1@dont-email.me> <upr337$bgc8$2@dont-email.me>
<20240205101236.81@kylheku.com> <upv574$1a3hg$2@dont-email.me>
<upvk3j$1cc05$1@dont-email.me> <uq02vl$1erim$4@dont-email.me>
<uq05ip$1fdph$1@dont-email.me> <874jektfn0.fsf@bsb.me.uk>
<87ttmkrxdv.fsf@bsb.me.uk> <uq27ig$1tcfa$1@dont-email.me>
<877cjfrx0p.fsf@bsb.me.uk> <uq2hkf$1v9f9$1@dont-email.me>
<871q9msxxd.fsf@bsb.me.uk> <uq31ts$22580$2@dont-email.me>
<87jzneqwqg.fsf@bsb.me.uk> <uq3uag$290lm$1@dont-email.me>
<uq41cs$2a4jh$1@dont-email.me> <uq5hip$2mgb3$3@dont-email.me>
<20240209084620.832@kylheku.com> <uq5qkj$2oaag$1@dont-email.me>
<20240209103252.434@kylheku.com> <uq62l7$2pnbt$1@dont-email.me>
<20240209133810.84@kylheku.com> <uq69q8$2qti2$1@dont-email.me>
<20240209145219.966@kylheku.com> <uq6dhq$2ril5$1@dont-email.me>
Injection-Date: Sat, 10 Feb 2024 00:28:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3de03a7474c831a6f9d55487e9415a62";
logging-data="3012014"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GMsII3QXpLiOotZio4DEXN6b7ycxk8lM="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:fxQvZ4veWDndZ5lztgJ81QyHej8=
 by: Kaz Kylheku - Sat, 10 Feb 2024 00:28 UTC

On 2024-02-09, bart <bc@freeuk.com> wrote:
> On 09/02/2024 23:12, Kaz Kylheku wrote:
>> On 2024-02-09, bart <bc@freeuk.com> wrote:
>
>>> I'm no idea what the point of CYGWIN is. Never have done either. What
>>> does it bring to the table? Presumably to make some programs that
>>> originate on Linux feel more at home, instead of making the effort to
>>> make them more portable.
>>
>> The effort is significant. Many things have to be coded twice.
>>
>
> Well, you need to support both OSes.
>
> My stuff uses one module in the language library which is OS-specific.
>
> At one point I had three versions for three OS targets. It is
> effectively a mini cross-platform wrapper around some OS functions.
>
> So for example, to get the address of a function in a shared library
> given an instance handle to the library, the Windows version is:
>
> export func os_getdllprocaddr(int hinst, ichar name)ref void=
> GetProcAddress(cast(hinst), name)
> end
>
> The Linux version is this:
>
> export func os_getdllprocaddr(int hlib, ichar name)ref void=
> dlsym(cast(int(hlib)), name)
> end

With cygwin, the Linux and Windows version is:

dlsym(handle, name);

And that's just a small thing.

How would you write serial control? Say the task is to open a serial
port, set the baud rate to 115200 kbps, 8N1 parity, 8-bit-clean raw
mode, and send a few bytes?

There is a POSIX way to do this, and so I have to write the code just
once, if I have a POSIX library on all the target machines.

Or, say, recursively walk a directory tree. I write the POSIX way to do
it, just once.

Create a hardlink: link(this, that). Will create an NTFS hard link
on Windows.

> As I understand your view, you want the Linux program to just call
> dlsym(), and need all these subsystems on Windows to make it appear as
> though that was natively available.

Well, yes; just like a Visual C program can call printf, as if printf
were natively available in Windows. Or call ShellExecuteEx() so that it
magically looks like Windows can natively "launch" a .PDF or .HTML file
in the same way it can run an .EXE.

That's how abstraction works!

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Experimental C Build System

<87o7cpcg5b.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11397&group=comp.unix.programmer#11397

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Fri, 09 Feb 2024 16:33:04 -0800
Organization: None to speak of
Lines: 21
Message-ID: <87o7cpcg5b.fsf@nosuchdomain.example.com>
References: <up8i91$h6iu$1@dont-email.me> <uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk> <87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me> <877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me> <871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me> <87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me> <uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me> <20240209084620.832@kylheku.com>
<uq5qkj$2oaag$1@dont-email.me> <20240209103252.434@kylheku.com>
<uq62l7$2pnbt$1@dont-email.me> <20240209133810.84@kylheku.com>
<uq69q8$2qti2$1@dont-email.me>
<87ttmhciii.fsf@nosuchdomain.example.com>
<uq6dtt$2ril5$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="3b6abb86f0f3816027ad8c34cf97d3ff";
logging-data="3011471"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HRHXaGEMpE9nbkPU0Ijml"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:e50z9+dumo/25TXd8yIWhInMjCY=
sha1:UrBH+gZ5XbFr/2iEw4Z25PTSd0A=
 by: Keith Thompson - Sat, 10 Feb 2024 00:33 UTC

bart <bc@freeuk.com> writes:
> On 09/02/2024 23:41, Keith Thompson wrote:
[...]
>> I use a lot of programs that happen to rely on a POSIX interface.
>> Cygwin lets those programs run under Windows.
>
> Run or build? If you have a binary, then having a way to run that on a
> different OS under some emulation layer is fair enough.

Cygwin deons't run Linux binaries, but Cygwin has development tools (gcc
et al) similar to what's typically available on Linux. Cygwin is not a
Linux emulation layer. It's a POSIX environment running under Windows.

See <https://cygwin.com/>, particularly the "What..." section at the top.

[...]

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Re: Experimental C Build System

<uq6mtf$2spqe$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11398&group=comp.unix.programmer#11398

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Sat, 10 Feb 2024 02:26:55 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <uq6mtf$2spqe$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk> <87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me> <877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me> <871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me> <87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me> <uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me> <20240209084620.832@kylheku.com>
<uq5qkj$2oaag$1@dont-email.me> <20240209103252.434@kylheku.com>
<uq62l7$2pnbt$1@dont-email.me> <20240209133810.84@kylheku.com>
<uq69q8$2qti2$1@dont-email.me> <87ttmhciii.fsf@nosuchdomain.example.com>
<uq6dtt$2ril5$2@dont-email.me> <87o7cpcg5b.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 10 Feb 2024 02:26:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="cb0aecca639ac885e888a888c6c2d7ce";
logging-data="3041102"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+s/paAjzxVUv9OW0hEUi5C"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:3yNcDYPz7pVi/v0ff8EdWS7PGwo=
 by: Lawrence D'Oliv - Sat, 10 Feb 2024 02:26 UTC

On Fri, 09 Feb 2024 16:33:04 -0800, Keith Thompson wrote:

> Cygwin ... [is] a POSIX environment running under Windows.

And in some ways, more capable than Microsoft’s native-based efforts along
the same lines.

Re: Experimental C Build System

<20240209184422.571@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11399&group=comp.unix.programmer#11399

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Sat, 10 Feb 2024 02:47:06 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <20240209184422.571@kylheku.com>
References: <up8i91$h6iu$1@dont-email.me> <uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk> <87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me> <877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me> <871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me> <87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me> <uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me> <20240209084620.832@kylheku.com>
<uq5qkj$2oaag$1@dont-email.me> <20240209103252.434@kylheku.com>
<uq62l7$2pnbt$1@dont-email.me> <20240209133810.84@kylheku.com>
<uq69q8$2qti2$1@dont-email.me> <87ttmhciii.fsf@nosuchdomain.example.com>
<uq6dtt$2ril5$2@dont-email.me> <87o7cpcg5b.fsf@nosuchdomain.example.com>
<uq6mtf$2spqe$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 10 Feb 2024 02:47:06 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3de03a7474c831a6f9d55487e9415a62";
logging-data="3046596"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18BScoJ596IzhIXmAlEYHTjGytkCF4+Jik="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:rd/X+YxBk3O6qUDzMmDyn/PK6E8=
 by: Kaz Kylheku - Sat, 10 Feb 2024 02:47 UTC

On 2024-02-10, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
> On Fri, 09 Feb 2024 16:33:04 -0800, Keith Thompson wrote:
>
>> Cygwin ... [is] a POSIX environment running under Windows.
>
> And in some ways, more capable than Microsoft’s native-based efforts along
> the same lines.

Cygwin programs are just Win32 programs, and can be deployed without
a Cygwin installation. They are just .exe files that depend on
one or more DLLs from Cygwin, and not an entire OS layer.

Cygwin programs can use Win32 functions: you can call fork() and
CreateWindow() in one file.

Ther is also a project (maintained by me) which offers a patched
cygwin1.dll that suppresses certain POSIX conventions in the way a
program interacts with the environment. This is particularly suitable
for deploying programs built under Cygwin as stand-alone Windows
programs.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Experimental C Build System

<myMxN.142319$taff.15138@fx41.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11401&group=comp.unix.programmer#11401

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!paganini.bofh.team!2.eu.feeder.erje.net!feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx41.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Experimental C Build System
Newsgroups: comp.lang.c,comp.unix.programmer
References: <up8i91$h6iu$1@dont-email.me> <uq02vl$1erim$4@dont-email.me> <uq05ip$1fdph$1@dont-email.me> <874jektfn0.fsf@bsb.me.uk> <87ttmkrxdv.fsf@bsb.me.uk> <uq27ig$1tcfa$1@dont-email.me> <877cjfrx0p.fsf@bsb.me.uk> <uq2hkf$1v9f9$1@dont-email.me> <871q9msxxd.fsf@bsb.me.uk> <uq31ts$22580$2@dont-email.me> <87jzneqwqg.fsf@bsb.me.uk> <uq3uag$290lm$1@dont-email.me> <uq41cs$2a4jh$1@dont-email.me> <uq5hip$2mgb3$3@dont-email.me> <b6uxN.277837$Ama9.185969@fx12.iad> <uq63fn$2psf6$1@dont-email.me>
Lines: 18
Message-ID: <myMxN.142319$taff.15138@fx41.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Sat, 10 Feb 2024 15:24:02 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Sat, 10 Feb 2024 15:24:02 GMT
X-Received-Bytes: 1819
 by: Scott Lurndal - Sat, 10 Feb 2024 15:24 UTC

bart <bc@freeuk.com> writes:
>On 09/02/2024 18:25, Scott Lurndal wrote:
elopment
>> environments exist.
>>
>>> Some people here seem to think that POSIX is an essential part of C,
>>
>> I don't recall anyone other than you thinking that.
>
>It's mentioned a LOT. Half the open source programs I try seem to use
>calls like 'open' instead of 'fopen', suggesting that the author seemed
>to think such a function is standard C, or that can be used as though it
>was standard.
>
>While here (https://en.wikipedia.org/wiki/C_POSIX_library):

Never heard of the "C POSIX library". The wiki page is just a list
of header files that are present in both C standards and POSIX standards.

Re: Experimental C Build System

<20240210195151.00001e6a@yahoo.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11402&group=comp.unix.programmer#11402

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: already5...@yahoo.com (Michael S)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Sat, 10 Feb 2024 19:51:51 +0200
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <20240210195151.00001e6a@yahoo.com>
References: <up8i91$h6iu$1@dont-email.me>
<upleoi$34tr4$1@dont-email.me>
<uplhrp$35e9i$1@dont-email.me>
<upo1cv$3lbbl$2@dont-email.me>
<upo5b4$3m4fu$1@dont-email.me>
<upp43r$3s4nc$4@dont-email.me>
<upp8s5$3tmdd$2@dont-email.me>
<upp90v$3tovf$1@dont-email.me>
<upr337$bgc8$2@dont-email.me>
<20240205101236.81@kylheku.com>
<upv574$1a3hg$2@dont-email.me>
<upvk3j$1cc05$1@dont-email.me>
<uq02vl$1erim$4@dont-email.me>
<uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk>
<87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me>
<877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me>
<871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me>
<87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me>
<uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me>
<20240209084620.832@kylheku.com>
<uq5qkj$2oaag$1@dont-email.me>
<20240209103252.434@kylheku.com>
<uq62l7$2pnbt$1@dont-email.me>
<20240209133810.84@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="0194f250d9ea64fe20656b285706ebf3";
logging-data="3425271"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18o8cUbZAaRhETlUpuaTDp5+GIVxUv+Tto="
Cancel-Lock: sha1:yC4/IBTewIquFTsM3RcqmQ4LFxQ=
X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)
 by: Michael S - Sat, 10 Feb 2024 17:51 UTC

On Fri, 9 Feb 2024 21:56:50 -0000 (UTC)
Kaz Kylheku <433-929-6894@kylheku.com> wrote:

> On 2024-02-09, bart <bc@freeuk.com> wrote:
> >> MSVCRT.DLL is not documented for public use; when you link to it,
> >> you're sticking a fork into the proverbial toaster. UCRT is
> >> different.
> >
> > What exactly to you mean by UCRT; ucrtbase.dll?
> >
> > That's missing a few useful things, like '_getmainargs' (used to
> > get argn, argv for main()), and obscure functions like 'printf'.
>
> I believe printf is in there.
>
> _getmainargs isn't; that's in a VC run time library.
>
> > Meanwhile, if I look at programs such as gcc.exe, as.exe, ld.exe,
> > not only do THEY import msvcrt.dll, but the EXEs produced by
> > gcc.exe do so too.
>
> Umm, no; you must be talking specifically about the MinGW ones.
>
> > So they didn't get the memo.
>
> They got the memo. The issue is that even though MSVCRT.DLL is
> undocumented, it constitutes a "system library". This is important.
>
> The GNU Public license prohibits programs from being linked to
> proprietary code --- but it has an exception for system libraries
> (libraries that are part of the target platform where the program
> runs).
>
> Using MSVCRT.DLL is like sticking a fork in the toaster, but all those
> programs being linked to MSVCRT.DLL means the GPL isn't violated.
>

Today Mingw64 provides two separate gcc programming environments.
One is based on old MSVCRT.DLL, probably from 2013 and other based on
ucrt. One installation package is called mingw-w64-x86_64-gcc and other
called mingw-w64-ucrt-x86_64-gcc.

Re: Experimental C Build System

<20240210200914.00004647@yahoo.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11403&group=comp.unix.programmer#11403

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: already5...@yahoo.com (Michael S)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Sat, 10 Feb 2024 20:09:14 +0200
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <20240210200914.00004647@yahoo.com>
References: <up8i91$h6iu$1@dont-email.me>
<upvk3j$1cc05$1@dont-email.me>
<uq02vl$1erim$4@dont-email.me>
<uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk>
<87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me>
<877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me>
<871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me>
<87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me>
<uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me>
<20240209084620.832@kylheku.com>
<uq5qkj$2oaag$1@dont-email.me>
<20240209103252.434@kylheku.com>
<uq62l7$2pnbt$1@dont-email.me>
<20240209133810.84@kylheku.com>
<uq69q8$2qti2$1@dont-email.me>
<87ttmhciii.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="0194f250d9ea64fe20656b285706ebf3";
logging-data="3425271"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+rE3rl0PxqSOPk2/uw51qubcxv9abMzY0="
Cancel-Lock: sha1:mP7zjjQygI8HY3DFSUtrk82DVN0=
X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)
 by: Michael S - Sat, 10 Feb 2024 18:09 UTC

On Fri, 09 Feb 2024 15:41:57 -0800
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:

> bart <bc@freeuk.com> writes:
> > On 09/02/2024 21:56, Kaz Kylheku wrote:
> >> On 2024-02-09, bart <bc@freeuk.com> wrote:
> [...]
> >>> So they didn't get the memo.
> >> They got the memo. The issue is that even though MSVCRT.DLL is
> >> undocumented, it constitutes a "system library". This is
> >> important.
> >
> > If they got rid of it, half the programs that run under Windows
> > would stop working.
>
> Who suggested getting rid of it?
>
> [...]
>
> > I'm no idea what the point of CYGWIN is. Never have done either.
>
> Are you asking?
>
> > What
> > does it bring to the table? Presumably to make some programs that
> > originate on Linux feel more at home, instead of making the effort
> > to make them more portable.
>
> It provides an environment, running under Windows, that resembles a
> typical Linux desktop environment. I use it every day myself, because
> that's a valuable thing for me. If it's not valuable for you, that's
> fine. (I also use WSL for some things.)
>
> I use a lot of programs that happen to rely on a POSIX interface.
> Cygwin lets those programs run under Windows. Modifying those
> programs to work more directly under Windows would be a tremendous
> amount of work that nobody is going to do.
>

I didn't encounter situation in which, given the choice, I would prefer
cygwin over msys2 at least for decade. I still have to use cygwin with
Altera/Intel Nios2 development environment (non-pro variant), because
there is no alternative. I don't like it at all.

Re: Experimental C Build System

<20240210201726.00002cf1@yahoo.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11404&group=comp.unix.programmer#11404

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: already5...@yahoo.com (Michael S)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Sat, 10 Feb 2024 20:17:26 +0200
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <20240210201726.00002cf1@yahoo.com>
References: <up8i91$h6iu$1@dont-email.me>
<uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk>
<87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me>
<877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me>
<871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me>
<87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me>
<uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me>
<20240209084620.832@kylheku.com>
<uq5qkj$2oaag$1@dont-email.me>
<20240209103252.434@kylheku.com>
<uq62l7$2pnbt$1@dont-email.me>
<20240209133810.84@kylheku.com>
<uq69q8$2qti2$1@dont-email.me>
<87ttmhciii.fsf@nosuchdomain.example.com>
<uq6dtt$2ril5$2@dont-email.me>
<87o7cpcg5b.fsf@nosuchdomain.example.com>
<uq6mtf$2spqe$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: dont-email.me; posting-host="0194f250d9ea64fe20656b285706ebf3";
logging-data="3425271"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/cGzT3B2WKUTCpHgymdu179/fzmUUpT40="
Cancel-Lock: sha1:484kQ0PJziq/AqGaOrRE4IwI8Y0=
X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)
 by: Michael S - Sat, 10 Feb 2024 18:17 UTC

On Sat, 10 Feb 2024 02:26:55 -0000 (UTC)
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:

> On Fri, 09 Feb 2024 16:33:04 -0800, Keith Thompson wrote:
>
> > Cygwin ... [is] a POSIX environment running under Windows.
>
> And in some ways, more capable than Microsoft’s native-based efforts
> along the same lines.

Many basic things, like file I/O and creation of processes is several
time slower under cygwin than under native Windows.

Re: Experimental C Build System

<uq8o8v$3padl$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=11405&group=comp.unix.programmer#11405

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!usenet.network!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo...@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Experimental C Build System
Date: Sat, 10 Feb 2024 21:02:23 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <uq8o8v$3padl$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me> <uq05ip$1fdph$1@dont-email.me>
<874jektfn0.fsf@bsb.me.uk> <87ttmkrxdv.fsf@bsb.me.uk>
<uq27ig$1tcfa$1@dont-email.me> <877cjfrx0p.fsf@bsb.me.uk>
<uq2hkf$1v9f9$1@dont-email.me> <871q9msxxd.fsf@bsb.me.uk>
<uq31ts$22580$2@dont-email.me> <87jzneqwqg.fsf@bsb.me.uk>
<uq3uag$290lm$1@dont-email.me> <uq41cs$2a4jh$1@dont-email.me>
<uq5hip$2mgb3$3@dont-email.me> <20240209084620.832@kylheku.com>
<uq5qkj$2oaag$1@dont-email.me> <20240209103252.434@kylheku.com>
<uq62l7$2pnbt$1@dont-email.me> <20240209133810.84@kylheku.com>
<uq69q8$2qti2$1@dont-email.me> <87ttmhciii.fsf@nosuchdomain.example.com>
<uq6dtt$2ril5$2@dont-email.me> <87o7cpcg5b.fsf@nosuchdomain.example.com>
<uq6mtf$2spqe$1@dont-email.me> <20240210201726.00002cf1@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 10 Feb 2024 21:02:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="cb0aecca639ac885e888a888c6c2d7ce";
logging-data="3975605"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18vy13hAD+uMimFL/IZU3kU"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:rwFfNJwWVqc60hV97u1O4rDDkXQ=
 by: Lawrence D'Oliv - Sat, 10 Feb 2024 21:02 UTC

On Sat, 10 Feb 2024 20:17:26 +0200, Michael S wrote:

> On Sat, 10 Feb 2024 02:26:55 -0000 (UTC)
> Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
>
>> On Fri, 09 Feb 2024 16:33:04 -0800, Keith Thompson wrote:
>>
>> > Cygwin ... [is] a POSIX environment running under Windows.
>>
>> And in some ways, more capable than Microsoft’s native-based efforts
>> along the same lines.
>
> Many basic things, like file I/O and creation of processes is several
> time slower under cygwin than under native Windows.

Nevertheless, it manages to get some things working properly, like poll/
select on pipes.

Pages:123456789101112131415
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor