Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Computers are not intelligent. They only think they are.


devel / comp.lang.c / Re: Experimental C Build System

SubjectAuthor
* Experimental C Build Systembart
+* Re: Experimental C Build SystemLawrence D'Oliveiro
|+* Re: Experimental C Build SystemChris M. Thomasson
||`* Re: Experimental C Build SystemDavid Brown
|| +* Re: Experimental C Build SystemChris M. Thomasson
|| |`* Re: Experimental C Build SystemDavid Brown
|| | `- Re: Experimental C Build SystemChris M. Thomasson
|| `- Re: Experimental C Build Systembart
|`* 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 Systembart
| |  `* Re: Experimental C Build SystemRichard Harnden
| |   `* Re: Experimental C Build Systemvallor
| |    +- 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 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 SystemDavid Brown
| |    |||  |         `* Re: Experimental C Build Systembart
| |    |||  |          +- Re: Experimental C Build SystemDavid Brown
| |    |||  |          `* Re: Experimental C Build SystemLawrence D'Oliveiro
| |    |||  |           +* Re: Experimental C Build Systembart
| |    |||  |           |+- Re: Experimental C Build SystemChris M. Thomasson
| |    |||  |           |`* Re: Experimental C Build SystemJim Jackson
| |    |||  |           | `* Re: Experimental C Build SystemMalcolm McLean
| |    |||  |           |  +* Re: Experimental C Build Systembart
| |    |||  |           |  |+* Re: Experimental C Build SystemKeith Thompson
| |    |||  |           |  |`* Re: Experimental C Build SystemKaz Kylheku
| |    |||  |           |  `- Re: Experimental C Build SystemScott Lurndal
| |    |||  |           `* Re: Experimental C Build SystemMalcolm McLean
| |    |||  `* 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
| `* Re: Experimental C Build SystemDavid Brown
+* Re: Experimental C Build SystemTim Rentsch
+- Re: Experimental C Build Systembart
+* Re: Experimental C Build Systemthiago
+- Re: Experimental C Build Systemthiago
`- Re: Experimental C Build Systembart

Pages:1234567891011121314151617
Re: Experimental C Build System

<20240209145219.966@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=33004&group=comp.lang.c#33004

  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=33005&group=comp.lang.c#33005

  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=33006&group=comp.lang.c#33006

  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=33007&group=comp.lang.c#33007

  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=33009&group=comp.lang.c#33009

  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=33010&group=comp.lang.c#33010

  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=33011&group=comp.lang.c#33011

  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=33014&group=comp.lang.c#33014

  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=33016&group=comp.lang.c#33016

  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=33029&group=comp.lang.c#33029

  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=33035&group=comp.lang.c#33035

  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=33036&group=comp.lang.c#33036

  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=33037&group=comp.lang.c#33037

  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=33039&group=comp.lang.c#33039

  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.

Re: Experimental C Build System

<uqbv6c$175cj$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=33117&group=comp.lang.c#33117

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (bart)
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Mon, 12 Feb 2024 02:18:55 +0000
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <uqbv6c$175cj$1@dont-email.me>
References: <up8i91$h6iu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 12 Feb 2024 02:18:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="40a17111670e2090a76e053402bf455d";
logging-data="1283475"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Yg5vMX+4wf2sss3jzZFxzM/cVy9evU3w="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:vdTwDfl2xhTAms3NwT9Lel28a5Q=
Content-Language: en-GB
In-Reply-To: <up8i91$h6iu$1@dont-email.me>
 by: bart - Mon, 12 Feb 2024 02:18 UTC

On 29/01/2024 16:03, bart wrote:
> By 'Build System', I mean a convenient or automatic way to tell a
> compiler which source and library files comprise a project, one that
> doesn't involve extra dependencies.
>
> This proposal comes under 'convenient' rather than 'automatic'. (I did
> try an automatic scheme in the past, but that only worked for specially
> written projects.)

This is a summary of the module scheme in my two main languages:

https://github.com/sal55/langs/blob/master/Modules24.md

The idea for this lite C version came from that, in listing the project
files at the start of the now /only/ module submitted to the compiler.

That C scheme needs revising, and could also use some ideas of Thiago
Adams in being able to work with other compilers like this:

gcc xxx.c -oxxx && xxx # build with gcc

mcc xxx # build with mcc

With mcc, xxx is the lead module. With gcc/etc, it's not clear what xxx
is; it might need to be a fixed file 'build.c' configured for this
project, as otherwise the extra support module name and project lead
name will clash.

It needs a bit more thought...

For for the time being, I'm sticking with my '#pragma module' scheme
which seems to work fine for the projects I've tried it on:

mcc lua
mcc bbx
mcc cjpeg

etc. What more could you want? This is beautifully simple.

Pages:1234567891011121314151617
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor