Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

[A computer is] like an Old Testament god, with a lot of rules and no mercy. -- Joseph Campbell


computers / alt.os.linux / Re: O_TEXT for PDOS/386

SubjectAuthor
* O_TEXT for PDOS/386Paul Edwards
+* Re: O_TEXT for PDOS/386Richard Kettlewell
|`* Re: O_TEXT for PDOS/386Paul Edwards
| `- Re: O_TEXT for PDOS/386Richard Kettlewell
+* Re: O_TEXT for PDOS/386Lew Pitcher
|+* Re: O_TEXT for PDOS/386Paul Edwards
||`* Re: O_TEXT for PDOS/386Lew Pitcher
|| +* Re: O_TEXT for PDOS/386Paul Edwards
|| |`* Re: O_TEXT for PDOS/386Lew Pitcher
|| | `* Re: O_TEXT for PDOS/386Paul Edwards
|| |  `* Re: O_TEXT for PDOS/386Richard Kettlewell
|| |   +* Re: O_TEXT for PDOS/386Paul Edwards
|| |   |`* Re: O_TEXT for PDOS/386Richard Kettlewell
|| |   | `* Re: O_TEXT for PDOS/386Paul Edwards
|| |   |  `* Re: O_TEXT for PDOS/386Richard Kettlewell
|| |   |   `* Re: O_TEXT for PDOS/386Paul Edwards
|| |   |    `* Re: O_TEXT for PDOS/386Richard Kettlewell
|| |   |     +* Re: O_TEXT for PDOS/386Paul Edwards
|| |   |     |+* Re: O_TEXT for PDOS/386Richard Kettlewell
|| |   |     ||`* Re: O_TEXT for PDOS/386Paul Edwards
|| |   |     || `* Re: O_TEXT for PDOS/386Richard Kettlewell
|| |   |     ||  `* Re: O_TEXT for PDOS/386Paul Edwards
|| |   |     ||   `- Re: O_TEXT for PDOS/386Paul Edwards
|| |   |     |`- Re: O_TEXT for PDOS/386Jasen Betts
|| |   |     `* OT: O_TEXT for PDOS/386J.O. Aho
|| |   |      `* Re: OT: O_TEXT for PDOS/386Paul Edwards
|| |   |       `* Re: OT: O_TEXT for PDOS/386Lew Pitcher
|| |   |        `* Re: OT: O_TEXT for PDOS/386Paul Edwards
|| |   |         `* Re: OT: O_TEXT for PDOS/386J.O. Aho
|| |   |          `- Re: OT: O_TEXT for PDOS/386Paul Edwards
|| |   `- Re: O_TEXT for PDOS/386Jasen Betts
|| `* Re: O_TEXT for PDOS/386Peter 'Shaggy' Haywood
||  `* Re: O_TEXT for PDOS/386Paul Edwards
||   `* Re: O_TEXT for PDOS/386Lew Pitcher
||    `- Re: O_TEXT for PDOS/386Paul Edwards
|`- Re: O_TEXT for PDOS/386Richard Kettlewell
`* Re: O_TEXT for PDOS/386Lew Pitcher
 `* Re: O_TEXT for PDOS/386Paul Edwards
  `* Re: O_TEXT for PDOS/386J.O. Aho
   `* Re: O_TEXT for PDOS/386Paul Edwards
    +* Re: O_TEXT for PDOS/386J.O. Aho
    |+- Re: O_TEXT for PDOS/386Richard Kettlewell
    |`- Re: O_TEXT for PDOS/386Paul Edwards
    `* Re: O_TEXT for PDOS/386Jasen Betts
     `- Re: O_TEXT for PDOS/386Paul Edwards

Pages:12
Re: O_TEXT for PDOS/386

<ur5mdj$3bduf$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3310&group=alt.os.linux#3310

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lew.pitcher@digitalfreehold.ca (Lew Pitcher)
Newsgroups: alt.os.linux
Subject: Re: O_TEXT for PDOS/386
Date: Wed, 21 Feb 2024 20:28:35 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <ur5mdj$3bduf$1@dont-email.me>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<lm7gak-kc1.ln1@hendrix.foo> <ur4v9t$366tp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 21 Feb 2024 20:28:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7a1a405dfea1f8bffbdb47f3218502f6";
logging-data="3520463"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18qnNPPc7qEoE54gjjtx+aPIq7h9gHeNh0="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:j1fUUaYeOq6s/E1ZyJLVe5wm2SQ=
 by: Lew Pitcher - Wed, 21 Feb 2024 20:28 UTC

On Wed, 21 Feb 2024 21:54:02 +0800, Paul Edwards wrote:
[snip]
> When the ELF executable is run on PDOS/386, I will
> have no way of knowing that this open is text, and
> thus PDOS/386 (the OS) should add CRs whenever it
> sees a LF.

ISTM that you are looking at this from the wrong end.

POSIX open() does not make a distinction between a "text"
and a "binary" file; all files are "binary". Programs
(including Linux programs) that are coded to the POSIX
standard already accommodate this. So, any code you port
from a Linux environment (either source code or ELF
executable) is already in a state to read and write
a binary file. Given this, then there is no need for
an O_TEXT flag for a Linux program, as no Linux program
expects open() to provide special conditions for text
data.

Given this, there only one problem to resolve: how to
allow for text data to be interchanged transparently
between the MSDOS/Windows side of your PDOS/386 and
the Linux side.

And, that's not the problem you are chasing ATM.

[snip]

--
Lew Pitcher
"In Skills We Trust"

Re: O_TEXT for PDOS/386

<ur5t2n$3d5c6$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3311&group=alt.os.linux#3311

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazilah@gmail.com (Paul Edwards)
Newsgroups: alt.os.linux
Subject: Re: O_TEXT for PDOS/386
Date: Thu, 22 Feb 2024 06:22:13 +0800
Organization: A noiseless patient Spider
Lines: 66
Message-ID: <ur5t2n$3d5c6$1@dont-email.me>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<lm7gak-kc1.ln1@hendrix.foo> <ur4v9t$366tp$1@dont-email.me>
<ur5mdj$3bduf$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 21 Feb 2024 22:22:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ddc99c20dba38873cfbfcc79cf1ee053";
logging-data="3577222"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198436ODjgka96CC9LFrJvRvSDxs3Qvqm0="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:2+PddyCgalAdf7G5/1bkne3KR9k=
In-Reply-To: <ur5mdj$3bduf$1@dont-email.me>
 by: Paul Edwards - Wed, 21 Feb 2024 22:22 UTC

On 22/02/24 04:28, Lew Pitcher wrote:
> On Wed, 21 Feb 2024 21:54:02 +0800, Paul Edwards wrote:
> [snip]
>> When the ELF executable is run on PDOS/386, I will
>> have no way of knowing that this open is text, and
>> thus PDOS/386 (the OS) should add CRs whenever it
>> sees a LF.
>
> ISTM that you are looking at this from the wrong end.
>
> POSIX open() does not make a distinction between a "text"
> and a "binary" file; all files are "binary". Programs

Sure. And I'm talking about changing POSIX to
add the distinction, for anyone who has a use
for such a thing.

> (including Linux programs) that are coded to the POSIX
> standard already accommodate this. So, any code you port
> from a Linux environment (either source code or ELF
> executable) is already in a state to read and write
> a binary file.

This would be new code obviously, and include
an O_TEXT.

> Given this, then there is no need for
> an O_TEXT flag for a Linux program, as no Linux program
> expects open() to provide special conditions for text
> data.

I want to be able to WRITE such a Linux program.

> Given this, there only one problem to resolve: how to
> allow for text data to be interchanged transparently
> between the MSDOS/Windows side of your PDOS/386 and
> the Linux side.

PDOS/386 *will be Linux*. A mini-clone. Also a
mini-clone of OS/2. It's already a mini-clone
of Windows, and sort of a clone of MSDOS too.

All on a 360k floppy.

The only question is - on this all-encompassing OS -
are text files going to follow DOS (CP/M) convention
or Unix convention?

And currently I am going for CP/M, which means my
Linux executables need to provide the appropriate
information so that they run seamlessly in this
CP/M-standard environment.

One day I'll probably do the reverse. And since it
is the C library that is adding CRs for Windows,
it will require a similar enhancement for the
Windows CreateFile() interface to pass a "text"
flag so that PDOS/386 can STRIP the CRs that will
be flowing through.

But that looks even more difficult:

https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea

BFN. Paul.

Re: O_TEXT for PDOS/386

<ur5tfj$3d79o$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3312&group=alt.os.linux#3312

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!news.niel.me!news.gegeweb.eu!gegeweb.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazilah@gmail.com (Paul Edwards)
Newsgroups: alt.os.linux
Subject: Re: O_TEXT for PDOS/386
Date: Thu, 22 Feb 2024 06:29:05 +0800
Organization: A noiseless patient Spider
Lines: 70
Message-ID: <ur5tfj$3d79o$1@dont-email.me>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
<ur4nhi$33uer$1@dont-email.me> <wwvplwqdmwc.fsf@LkoBDZeT.terraraq.uk>
<ur4r5m$34umv$1@dont-email.me> <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 21 Feb 2024 22:29:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ddc99c20dba38873cfbfcc79cf1ee053";
logging-data="3579192"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19oLz3gd8MthC5bBDWMK7mSMI4Cv/yUEVA="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:LGkRu7MkcRbLDdGr/yxQocOOMUA=
In-Reply-To: <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
 by: Paul Edwards - Wed, 21 Feb 2024 22:29 UTC

On 21/02/24 22:20, Richard Kettlewell wrote:
> Paul Edwards <mutazilah@gmail.com> writes:
>> On 21/02/24 20:25, Richard Kettlewell wrote:
>>> Standard C doesn’t have open(), read() or write() either,
>>
>> Indeed - because PDPCLIB's implementation of fopen()
>> needs to do the open syscall (INT 80H EAX = 5H).
>>
>> fopen already knows whether the file is being opened as text or
>> binary, and I don't want that information lost when I do that
>> interrupt above. Even though Linux (currently, and very likely
>> forever) won't use it, PDOS/386 has a use for it (in the short term).
>>
>>> but you seem to want to modify the behaviour of those.
>>
>> I don't think that is an accurate statement.
>>
>> What behavior, where?
>
> You’ve been talking about doing translation _somewhere_,

Yes - when run under PDOS/386.

Currently the only Linux ELF program that runs
under PDOS/386 is a "hello world".

And I don't think anyone cares if I change the
behavior of that.

And that program doesn't even use open(), so is
not subject to my proposed change.

I guess I am talking about changing FUTURE
behavior of a FUTURE program.

But I thought you were implying I was going
to break something.

> and cited
> Cygwin as an example in your first posting, and have been consistently
> using the flag name from Cygwin. Cygwin’s O_TEXT causes read() and
> write() to translate between newline conventions, so if you meant
> something else then it was a confusing decision to use Cygwin as an
> example.

Cygwin is a correct example, I believe.

And Cygwin doesn't change the behavior of Linux ELF
executables either.

Nor does it change the behavior of existing POSIX
source code.

> If, in fact, you don’t want to add translation to read() and write()

I do.

I guess it's just a semantic debate as to whether
this constitutes a change in behavior.

All existing Linux ELF programs are unchanged.

Even new Linux ELF programs won't change when
run under Linux.

The flag only takes effect when the ELF is run
on a competing system.

BFN. Paul.

Re: O_TEXT for PDOS/386

<wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3316&group=alt.os.linux#3316

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: invalid@invalid.invalid (Richard Kettlewell)
Newsgroups: alt.os.linux
Subject: Re: O_TEXT for PDOS/386
Date: Thu, 22 Feb 2024 09:57:29 +0000
Organization: terraraq NNTP server
Message-ID: <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
<ur4nhi$33uer$1@dont-email.me> <wwvplwqdmwc.fsf@LkoBDZeT.terraraq.uk>
<ur4r5m$34umv$1@dont-email.me> <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
<ur5tfj$3d79o$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="70573"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:19/lQ8NlPqDEJ5Zw9ROmKeYM8x0=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
 by: Richard Kettlewell - Thu, 22 Feb 2024 09:57 UTC

Paul Edwards <mutazilah@gmail.com> writes:
> Cygwin is a correct example, I believe.
>
> And Cygwin doesn't change the behavior of Linux ELF
> executables either.

AFAIK it can’t run them at all, so I don’t know why that would be
relevant.

> Nor does it change the behavior of existing POSIX source code.

Your use case was C90 programs, not POSIX programs, last time you
mentioned it. Has that changed now?

>> If, in fact, you don’t want to add translation to read() and write()
> I do.

OK, so an ELF executable (that had been modified to use your
hypothetical O_TEXT flag) would get newline translation from read() and
write() when run on your toy OS, but not when run on a real Linux
kernel. There’s the change in behavior.

At any rate we’re back to the issue that you say want to add
Cygwin-style translation to read() and write(), but you also say that
you will only be running programs written in C90, which doesn’t have
open(), so nothing will ever pass O_TEXT and the translation will never
be activated.

> I guess it's just a semantic debate as to whether this constitutes a
> change in behavior.

This would go a lot quicker if you didn’t engage in “semantic debates”.

--
https://www.greenend.org.uk/rjk/

Re: O_TEXT for PDOS/386

<ur7ari$3rchp$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3317&group=alt.os.linux#3317

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazilah@gmail.com (Paul Edwards)
Newsgroups: alt.os.linux
Subject: Re: O_TEXT for PDOS/386
Date: Thu, 22 Feb 2024 19:23:26 +0800
Organization: A noiseless patient Spider
Lines: 80
Message-ID: <ur7ari$3rchp$1@dont-email.me>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
<ur4nhi$33uer$1@dont-email.me> <wwvplwqdmwc.fsf@LkoBDZeT.terraraq.uk>
<ur4r5m$34umv$1@dont-email.me> <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
<ur5tfj$3d79o$1@dont-email.me> <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Feb 2024 11:23:30 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9b39800342b2c9043759c80131ff59a4";
logging-data="4043321"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18wIMIuodOJPaorZvAB85dZtWUtvZulZqM="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:Q4CWqhPaYSCkEyPHL8Q+se7VdJg=
In-Reply-To: <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
 by: Paul Edwards - Thu, 22 Feb 2024 11:23 UTC

On 22/02/24 17:57, Richard Kettlewell wrote:
> Paul Edwards <mutazilah@gmail.com> writes:

>> Cygwin is a correct example, I believe.
>>
>> And Cygwin doesn't change the behavior of Linux ELF
>> executables either.
>
> AFAIK it can’t run them at all, so I don’t know why that would be
> relevant.

That's exactly the point - it doesn't run them.
No behavior is being changed by Cygwin either.

>> Nor does it change the behavior of existing POSIX source code.
>
> Your use case was C90 programs, not POSIX programs, last time you
> mentioned it. Has that changed now?

I am the vendor of a C90 runtime library for Linux (PDPCLIB).

fopen() necessarily does an open syscall.

>>> If, in fact, you don’t want to add translation to read() and write()
>> I do.
>
> OK, so an ELF executable (that had been modified to use your
> hypothetical O_TEXT flag) would get newline translation from read() and
> write() when run on your toy OS, but not when run on a real Linux
> kernel. There’s the change in behavior.

Well you can call it that if you want. But as I said,
I think it is odd to call something a change in behavior
when the software that would be "changing" hasn't even
been written yet. Or at least, the INT 80H open() processing
of PDOS/386 hasn't been written yet. Only write to stdout
has been written so far. And exit.

Also, when you say "the ELF executable that has been
modified", I would use the word "built" rather than
"modified". I am building new ELF executables according
to a hypothetical version of POSIX/Linux that includes
a new O_TEXT definition.

> At any rate we’re back to the issue that you say want to add
> Cygwin-style translation to read() and write(), but you also say that
> you will only be running programs written in C90, which doesn’t have
> open(), so nothing will ever pass O_TEXT and the translation will never
> be activated.

PDPCLIB will do that.

I clearly haven't done a very good job of explaining
what I want.

I am organizing contact with the "Austin Group" (I've
become a member and downloaded the latest POSIX draft).

Is there any wording I should use to avoid the several
days of confusion we've had here?

When I wrote my original message I thought it was a very
simple suggestion, using the widely-known Cygwin prior art.

Instead, I'm not even sure my proposal is understood.

>> I guess it's just a semantic debate as to whether this constitutes a
>> change in behavior.
>
> This would go a lot quicker if you didn’t engage in “semantic debates”.

I wasn't attempting to. I was just trying to identify
the point of contention as semantics, not a technical
issue.

It's still not clear to me that it really is semantics,
because you are using language that I wouldn't use.

BFN. Paul.

OT: O_TEXT for PDOS/386

<l3ou4nFdkpqU1@mid.individual.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3318&group=alt.os.linux#3318

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: user@example.net (J.O. Aho)
Newsgroups: alt.os.linux
Subject: OT: O_TEXT for PDOS/386
Date: Thu, 22 Feb 2024 13:48:23 +0100
Lines: 16
Message-ID: <l3ou4nFdkpqU1@mid.individual.net>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
<ur4nhi$33uer$1@dont-email.me> <wwvplwqdmwc.fsf@LkoBDZeT.terraraq.uk>
<ur4r5m$34umv$1@dont-email.me> <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
<ur5tfj$3d79o$1@dont-email.me> <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net OxFizugVMMCnfTFw2nyPyw6w0SnGqrVWh+lYVk13kCD1SAEceH
Cancel-Lock: sha1:s8i30g2h6BSL0uvPv2s0ZK4V8HM= sha256:0CjROZyVUjhJOvHHmQ8Geqhp0MaCxktwZPwEj09Zvsg=
User-Agent: Mozilla Thunderbird
Content-Language: en-US-large
In-Reply-To: <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
 by: J.O. Aho - Thu, 22 Feb 2024 12:48 UTC

On 22/02/2024 10.57, Richard Kettlewell wrote:
> Paul Edwards <mutazilah@gmail.com> writes:

>> I guess it's just a semantic debate as to whether this constitutes a
>> change in behavior.
>
> This would go a lot quicker if you didn’t engage in “semantic debates”.

For me it whole feels like a repeat of systemd when they stupidly picked
a namespace already used by the kernel and wanted the kernel to change
nem of their namespace.

The whole can be solved in the header to define missing macro.

--
//Aho

Re: OT: O_TEXT for PDOS/386

<ur7jd0$3t7h1$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3319&group=alt.os.linux#3319

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazilah@gmail.com (Paul Edwards)
Newsgroups: alt.os.linux
Subject: Re: OT: O_TEXT for PDOS/386
Date: Thu, 22 Feb 2024 21:49:19 +0800
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <ur7jd0$3t7h1$1@dont-email.me>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
<ur4nhi$33uer$1@dont-email.me> <wwvplwqdmwc.fsf@LkoBDZeT.terraraq.uk>
<ur4r5m$34umv$1@dont-email.me> <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
<ur5tfj$3d79o$1@dont-email.me> <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
<l3ou4nFdkpqU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Feb 2024 13:49:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9b39800342b2c9043759c80131ff59a4";
logging-data="4103713"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19uv7y28S1KfkJ5UjP0ls+/rQrHGaStpMA="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:u5ktbHjNKU0ZfzXsPPrL3ED8Xd4=
In-Reply-To: <l3ou4nFdkpqU1@mid.individual.net>
 by: Paul Edwards - Thu, 22 Feb 2024 13:49 UTC

On 22/02/24 20:48, J.O. Aho wrote:
> On 22/02/2024 10.57, Richard Kettlewell wrote:
>> Paul Edwards <mutazilah@gmail.com> writes:
>
>>> I guess it's just a semantic debate as to whether this constitutes a
>>> change in behavior.
>>
>> This would go a lot quicker if you didn’t engage in “semantic debates”.
>
> For me it whole feels like a repeat of systemd when they stupidly picked
> a namespace already used by the kernel and wanted the kernel to change
> nem of their namespace.
>
> The whole can be solved in the header to define missing macro.

Define it to what? That's my original question.

And by who?

BFN. Paul.

Re: OT: O_TEXT for PDOS/386

<ur7n99$3t1bb$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3320&group=alt.os.linux#3320

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lew.pitcher@digitalfreehold.ca (Lew Pitcher)
Newsgroups: alt.os.linux
Subject: Re: OT: O_TEXT for PDOS/386
Date: Thu, 22 Feb 2024 14:55:38 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <ur7n99$3t1bb$1@dont-email.me>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
<ur4nhi$33uer$1@dont-email.me> <wwvplwqdmwc.fsf@LkoBDZeT.terraraq.uk>
<ur4r5m$34umv$1@dont-email.me> <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
<ur5tfj$3d79o$1@dont-email.me> <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
<l3ou4nFdkpqU1@mid.individual.net> <ur7jd0$3t7h1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Feb 2024 14:55:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d905bba534577a88bb9ba448e38e8080";
logging-data="4097387"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Rsnr6pE11lF/D8mJt2RBNDVqG6SjTM3k="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:nuVkGiExAYS7iFptSe2Jrb9X2VE=
 by: Lew Pitcher - Thu, 22 Feb 2024 14:55 UTC

On Thu, 22 Feb 2024 21:49:19 +0800, Paul Edwards wrote:

> On 22/02/24 20:48, J.O. Aho wrote:
>> On 22/02/2024 10.57, Richard Kettlewell wrote:
>>> Paul Edwards <mutazilah@gmail.com> writes:
>>
>>>> I guess it's just a semantic debate as to whether this constitutes a
>>>> change in behavior.
>>>
>>> This would go a lot quicker if you didn’t engage in “semantic debates”.
>>
>> For me it whole feels like a repeat of systemd when they stupidly picked
>> a namespace already used by the kernel and wanted the kernel to change
>> nem of their namespace.
>>
>> The whole can be solved in the header to define missing macro.
>
> Define it to what? That's my original question.

That's up to whomever defines it.

> And by who?

That would be you. And /not/ by Linux.

--
Lew Pitcher
"In Skills We Trust"

Re: O_TEXT for PDOS/386

<wwvr0h47bsu.fsf@LkoBDZeT.terraraq.uk>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3321&group=alt.os.linux#3321

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: invalid@invalid.invalid (Richard Kettlewell)
Newsgroups: alt.os.linux
Subject: Re: O_TEXT for PDOS/386
Date: Thu, 22 Feb 2024 15:34:25 +0000
Organization: terraraq NNTP server
Message-ID: <wwvr0h47bsu.fsf@LkoBDZeT.terraraq.uk>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
<ur4nhi$33uer$1@dont-email.me> <wwvplwqdmwc.fsf@LkoBDZeT.terraraq.uk>
<ur4r5m$34umv$1@dont-email.me> <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
<ur5tfj$3d79o$1@dont-email.me> <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
<ur7ari$3rchp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="75434"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:4j9YalCcNRdViQ0y1zkbdOWhQuA=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
 by: Richard Kettlewell - Thu, 22 Feb 2024 15:34 UTC

Paul Edwards <mutazilah@gmail.com> writes:
> On 22/02/24 17:57, Richard Kettlewell wrote:
>> Paul Edwards <mutazilah@gmail.com> writes:
>
>>> Cygwin is a correct example, I believe.
>>>
>>> And Cygwin doesn't change the behavior of Linux ELF
>>> executables either.
>>
>> AFAIK it can’t run them at all, so I don’t know why that would be
>> relevant.
>
> That's exactly the point - it doesn't run them.
> No behavior is being changed by Cygwin either.

The behavior of read() and write() is changed by the O_TEXT flag in
Cygwin.

>>> Nor does it change the behavior of existing POSIX source code.
>>
>> Your use case was C90 programs, not POSIX programs, last time you
>> mentioned it. Has that changed now?
>
> I am the vendor of a C90 runtime library for Linux (PDPCLIB).
>
> fopen() necessarily does an open syscall.

If a file was opened with fopen() then the stdio functions (putc, fread,
etc) can do the newline translation. No need to mess with the behavior
read() and write(). But I think we’ve been round that loop and for
unknown reasons you still seem to want to do it the hard way.

>>>> If, in fact, you don’t want to add translation to read() and write()
>>> I do.
>>
>> OK, so an ELF executable (that had been modified to use your
>> hypothetical O_TEXT flag) would get newline translation from read() and
>> write() when run on your toy OS, but not when run on a real Linux
>> kernel. There’s the change in behavior.
>
> Well you can call it that if you want. But as I said, I think it is
> odd to call something a change in behavior when the software that
> would be "changing" hasn't even been written yet. Or at least, the
> INT 80H open() processing of PDOS/386 hasn't been written yet. Only
> write to stdout has been written so far. And exit.

Once again, this would go a lot quicker if you didn’t engage in
“semantic debates”.

> Also, when you say "the ELF executable that has been modified", I
> would use the word "built" rather than "modified". I am building new
> ELF executables according to a hypothetical version of POSIX/Linux
> that includes a new O_TEXT definition.

If it’s unmodified then it won’t set O_TEXT.

>> At any rate we’re back to the issue that you say want to add
>> Cygwin-style translation to read() and write(), but you also say that
>> you will only be running programs written in C90, which doesn’t have
>> open(), so nothing will ever pass O_TEXT and the translation will
>> never be activated.
>
> PDPCLIB will do that.

If you control the C library then you can do the translation in the
<stdio.h> implementation; there is no need to mess with the behavior of
read() and write().

> I clearly haven't done a very good job of explaining what I want.

Indeed.

--
https://www.greenend.org.uk/rjk/

Re: OT: O_TEXT for PDOS/386

<ur8u02$6gq4$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3328&group=alt.os.linux#3328

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazilah@gmail.com (Paul Edwards)
Newsgroups: alt.os.linux
Subject: Re: OT: O_TEXT for PDOS/386
Date: Fri, 23 Feb 2024 09:56:16 +0800
Organization: A noiseless patient Spider
Lines: 76
Message-ID: <ur8u02$6gq4$1@dont-email.me>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
<ur4nhi$33uer$1@dont-email.me> <wwvplwqdmwc.fsf@LkoBDZeT.terraraq.uk>
<ur4r5m$34umv$1@dont-email.me> <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
<ur5tfj$3d79o$1@dont-email.me> <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
<l3ou4nFdkpqU1@mid.individual.net> <ur7jd0$3t7h1$1@dont-email.me>
<ur7n99$3t1bb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 23 Feb 2024 01:56:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4de7f0f8eb4b8cc1dcbf8958b99da91b";
logging-data="213828"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18OMk4DCflsbffZiQveDALt6Ej8d/O0jas="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:cUydby7oNOlxCtcLplP3b5nUyTI=
In-Reply-To: <ur7n99$3t1bb$1@dont-email.me>
 by: Paul Edwards - Fri, 23 Feb 2024 01:56 UTC

On 22/02/24 22:55, Lew Pitcher wrote:
> On Thu, 22 Feb 2024 21:49:19 +0800, Paul Edwards wrote:
>
>> On 22/02/24 20:48, J.O. Aho wrote:
>>> On 22/02/2024 10.57, Richard Kettlewell wrote:
>>>> Paul Edwards <mutazilah@gmail.com> writes:
>>>
>>>>> I guess it's just a semantic debate as to whether this constitutes a
>>>>> change in behavior.
>>>>
>>>> This would go a lot quicker if you didn’t engage in “semantic debates”.
>>>
>>> For me it whole feels like a repeat of systemd when they stupidly picked
>>> a namespace already used by the kernel and wanted the kernel to change
>>> nem of their namespace.
>>>
>>> The whole can be solved in the header to define missing macro.
>>
>> Define it to what? That's my original question.
>
> That's up to whomever defines it.
>
>> And by who?
>
> That would be you. And /not/ by Linux.

That's not correct.

I can't properly define it myself. If I define it
myself, to an arbitrary value, then the ELF executable
will do strange things now or in the future when run
on Linux.

ie if I take over an existing flag or flags, or
choose a currently unused bit.

Again - I've clearly done a really really crappy
job of explaining what I want.

I don't know what I'm doing wrong.

Is there anyone who actually understands my
suggestion who can translate English to English?

I'll need a translated version for when I speak
to the Austin group otherwise I'll be going around
the exact same circle.

It's possible that I have some "unstated assumptions".
I have found that a problem in the past. But I don't
know what they are until after a lot of discussion.

I can take a guess though.

My goal for PDOS/386 is not to run *ANY* *EXISTING*
Linux ELF binaries.

My goal is to run *SPECIFIC* *FUTURE* Linux ELF
binaries.

Specifically ones linked with PDPCLIB where I have
done very specific things (which I control) so that
THE BINARIES work on BOTH Linux and PDOS/386.

I'm not attempting to create a Linux clone. I'm only
trying to create a very limited clone.

And I'm not trying to get CRs on Linux. I'm only
trying to get CRs on PDOS/386.

Again - I thought I explained it adequately, but of
course I always think that, but this is not the first
time I have been mistaken about what is "clear".

BFN. Paul.

Re: O_TEXT for PDOS/386

<ur8v4u$6nf0$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3329&group=alt.os.linux#3329

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazilah@gmail.com (Paul Edwards)
Newsgroups: alt.os.linux
Subject: Re: O_TEXT for PDOS/386
Date: Fri, 23 Feb 2024 10:15:56 +0800
Organization: A noiseless patient Spider
Lines: 187
Message-ID: <ur8v4u$6nf0$1@dont-email.me>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
<ur4nhi$33uer$1@dont-email.me> <wwvplwqdmwc.fsf@LkoBDZeT.terraraq.uk>
<ur4r5m$34umv$1@dont-email.me> <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
<ur5tfj$3d79o$1@dont-email.me> <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
<ur7ari$3rchp$1@dont-email.me> <wwvr0h47bsu.fsf@LkoBDZeT.terraraq.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 23 Feb 2024 02:15:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4de7f0f8eb4b8cc1dcbf8958b99da91b";
logging-data="220640"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19AaKFaRCM5hzuJA9+0+XYdF1Jq4Q2LvjA="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:BvmJa5wVX6SmhSfgqQvwTpQHb3k=
In-Reply-To: <wwvr0h47bsu.fsf@LkoBDZeT.terraraq.uk>
 by: Paul Edwards - Fri, 23 Feb 2024 02:15 UTC

On 22/02/24 23:34, Richard Kettlewell wrote:
> Paul Edwards <mutazilah@gmail.com> writes:
>> On 22/02/24 17:57, Richard Kettlewell wrote:
>>> Paul Edwards <mutazilah@gmail.com> writes:
>>
>>>> Cygwin is a correct example, I believe.
>>>>
>>>> And Cygwin doesn't change the behavior of Linux ELF
>>>> executables either.
>>>
>>> AFAIK it can’t run them at all, so I don’t know why that would be
>>> relevant.
>>
>> That's exactly the point - it doesn't run them.
>> No behavior is being changed by Cygwin either.
>
> The behavior of read() and write() is changed by the O_TEXT flag in
> Cygwin.

Sure - that's existing Cygwin that has *already
changed*. I'm not proposing a change to anything
that already exists.

>>>> Nor does it change the behavior of existing POSIX source code.
>>>
>>> Your use case was C90 programs, not POSIX programs, last time you
>>> mentioned it. Has that changed now?
>>
>> I am the vendor of a C90 runtime library for Linux (PDPCLIB).
>>
>> fopen() necessarily does an open syscall.
>
> If a file was opened with fopen() then the stdio functions (putc, fread,
> etc) can do the newline translation.

I don't WANT to do newline translation when *my*
binary *runs on Linux*.

I want my binaries to behave like any normal Linux program.

So I can't translate in the C library, unless the C
library does some sort of special call to detect the
environment and change behavior accordingly.

I think O_TEXT (with Cygwin prior art) is the neater
solution to this logical problem.

> No need to mess with the behavior
> read() and write().

No need to mess with the behavior of read() and
write() on WHICH SYSTEM?

PDOS/386 is the only thing that would be doing
any messing.

And that's far less mess than the alternative.

> But I think we’ve been round that loop and for
> unknown reasons you still seem to want to do it the hard way.

I don't consider this to be the hard way.

Can you suggest a syscall that I could use to detect
whether I am running under true Linux or PDOS/386
so that I can get the C library to adjust appropriately?

Also, the C library (as with Cygwin) may need to adjust
on a file-by-file basis. ie a syscall needs to be done
"do you want translation to be done on this particular
filename?". open() doesn't have the ability to return
such a status, so I would need to do a similar syscall
to open to find the translation requirements.

And this overhead needs to be added to (my) Linux programs
even when running on Linux - overhead for no purpose,
when a simple flag (that is ignored) is all that is required.

>>>>> If, in fact, you don’t want to add translation to read() and write()
>>>> I do.
>>>
>>> OK, so an ELF executable (that had been modified to use your
>>> hypothetical O_TEXT flag) would get newline translation from read() and
>>> write() when run on your toy OS, but not when run on a real Linux
>>> kernel. There’s the change in behavior.
>>
>> Well you can call it that if you want. But as I said, I think it is
>> odd to call something a change in behavior when the software that
>> would be "changing" hasn't even been written yet. Or at least, the
>> INT 80H open() processing of PDOS/386 hasn't been written yet. Only
>> write to stdout has been written so far. And exit.
>
> Once again, this would go a lot quicker if you didn’t engage in
> “semantic debates”.

I'm not deliberately engaging in semantic debates.

I'm just saying that if that's your definition, then
fine, yes, you're right, by that definition.

>> Also, when you say "the ELF executable that has been modified", I
>> would use the word "built" rather than "modified". I am building new
>> ELF executables according to a hypothetical version of POSIX/Linux
>> that includes a new O_TEXT definition.
>
> If it’s unmodified then it won’t set O_TEXT.

If *WHAT* is unmodified?

An existing ELF binary or one that I will build in
the future?

>>> At any rate we’re back to the issue that you say want to add
>>> Cygwin-style translation to read() and write(), but you also say that
>>> you will only be running programs written in C90, which doesn’t have
>>> open(), so nothing will ever pass O_TEXT and the translation will
>>> never be activated.
>>
>> PDPCLIB will do that.
>
> If you control the C library then you can do the translation in the
> <stdio.h> implementation; there is no need to mess with the behavior of
> read() and write().

Not true. The translation needs to be conditional.
So I need a different set of infrastructure to do
translation in the C library.

>> I clearly haven't done a very good job of explaining what I want.
>
> Indeed.

And I'm not doing that deliberately either.

I'm a native English speaker, but this is not the
first time I have failed to convey my message.

Sorry about that, but I don't know where I am
going wrong.

Maybe I can express it in C code/pseudocode.

Solution 1:

fopen()
{ if (strcmp(mode, "r")
{
flag |= O_TEXT; /* cannot be zero!!! */
}
syscall(syscall_open, name, flag);
}

Solution 2:

fopen()
{ if (strcmp(mode, "r")
{
rc = syscall(syscall_os_check);
if (rc == PDOS386) /* as opposed to GENUINE LINUX */
{
rc = syscall(syscall_check_translation, filename);
if (rc == TRANSLATION_REQUIRED)
{
FILE.translation_flag = 1;
}
}
}
}

fwrite()
{ if (FILE.translation_flag)
{
for (...) /* add CRs */
}
}

Let me know if the pseudocode is understandable,
or needs to be fleshed out in even more detail.

BFN. Paul.

Re: OT: O_TEXT for PDOS/386

<l3r6jsFplefU1@mid.individual.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3333&group=alt.os.linux#3333

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: user@example.net (J.O. Aho)
Newsgroups: alt.os.linux
Subject: Re: OT: O_TEXT for PDOS/386
Date: Fri, 23 Feb 2024 10:25:16 +0100
Lines: 22
Message-ID: <l3r6jsFplefU1@mid.individual.net>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
<ur4nhi$33uer$1@dont-email.me> <wwvplwqdmwc.fsf@LkoBDZeT.terraraq.uk>
<ur4r5m$34umv$1@dont-email.me> <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
<ur5tfj$3d79o$1@dont-email.me> <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
<l3ou4nFdkpqU1@mid.individual.net> <ur7jd0$3t7h1$1@dont-email.me>
<ur7n99$3t1bb$1@dont-email.me> <ur8u02$6gq4$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net Q/OmqlITa+h6By4Pz7rV9gcghtfteEPQbObv6ffFxL/RkUM6xa
Cancel-Lock: sha1:VAm2EQUv4K6MNt3AasFHjUaOylA= sha256:WGwP2GgsvXnsbzPFFc7herujacN9MA5lS0ozdjtHKAw=
User-Agent: Mozilla Thunderbird
Content-Language: en-US-large
In-Reply-To: <ur8u02$6gq4$1@dont-email.me>
 by: J.O. Aho - Fri, 23 Feb 2024 09:25 UTC

On 23/02/2024 02.56, Paul Edwards wrote:
> On 22/02/24 22:55, Lew Pitcher wrote:
>> On Thu, 22 Feb 2024 21:49:19 +0800, Paul Edwards wrote:

>>> And by who?
>>
>> That would be you. And /not/ by Linux.
>
> I can't properly define it myself. If I define it
> myself, to an arbitrary value, then the ELF executable
> will do strange things now or in the future when run
> on Linux.

Try 0x0

You need to handle it in you own library pdpclib, do not expect others
to change for you think providing a file that isn't the one on disk is ok.

--
//Aho

Re: O_TEXT for PDOS/386

<wwvmsrrzdd1.fsf@LkoBDZeT.terraraq.uk>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3334&group=alt.os.linux#3334

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: invalid@invalid.invalid (Richard Kettlewell)
Newsgroups: alt.os.linux
Subject: Re: O_TEXT for PDOS/386
Date: Fri, 23 Feb 2024 10:25:30 +0000
Organization: terraraq NNTP server
Message-ID: <wwvmsrrzdd1.fsf@LkoBDZeT.terraraq.uk>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
<ur4nhi$33uer$1@dont-email.me> <wwvplwqdmwc.fsf@LkoBDZeT.terraraq.uk>
<ur4r5m$34umv$1@dont-email.me> <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
<ur5tfj$3d79o$1@dont-email.me> <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
<ur7ari$3rchp$1@dont-email.me> <wwvr0h47bsu.fsf@LkoBDZeT.terraraq.uk>
<ur8v4u$6nf0$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="91624"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:v9a0wMcJWlxcNYa+rNZ3yFG13BI=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
 by: Richard Kettlewell - Fri, 23 Feb 2024 10:25 UTC

Paul Edwards <mutazilah@gmail.com> writes:
>> No need to mess with the behavior read() and write().
>
> No need to mess with the behavior of read() and write() on WHICH
> SYSTEM?

Any system.

>> But I think we’ve been round that loop and for unknown reasons you
>> still seem to want to do it the hard way.
>
> I don't consider this to be the hard way.
>
> Can you suggest a syscall that I could use to detect
> whether I am running under true Linux or PDOS/386
> so that I can get the C library to adjust appropriately?

uname()

From another posting:

> Specifically ones linked with PDPCLIB where I have
> done very specific things (which I control) so that
> THE BINARIES work on BOTH Linux and PDOS/386.

Do you get that this is a weird requirement? You could just compile your
code twice, one for Linux and once for your toy platform.

--
https://www.greenend.org.uk/rjk/

Re: OT: O_TEXT for PDOS/386

<ur9s57$g12n$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3335&group=alt.os.linux#3335

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazilah@gmail.com (Paul Edwards)
Newsgroups: alt.os.linux
Subject: Re: OT: O_TEXT for PDOS/386
Date: Fri, 23 Feb 2024 18:30:54 +0800
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <ur9s57$g12n$1@dont-email.me>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
<ur4nhi$33uer$1@dont-email.me> <wwvplwqdmwc.fsf@LkoBDZeT.terraraq.uk>
<ur4r5m$34umv$1@dont-email.me> <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
<ur5tfj$3d79o$1@dont-email.me> <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
<l3ou4nFdkpqU1@mid.individual.net> <ur7jd0$3t7h1$1@dont-email.me>
<ur7n99$3t1bb$1@dont-email.me> <ur8u02$6gq4$1@dont-email.me>
<l3r6jsFplefU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 23 Feb 2024 10:31:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4de7f0f8eb4b8cc1dcbf8958b99da91b";
logging-data="525399"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/1sTK6BdJITh/h2y8rGs2OTa+0A7/23Uw="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:t9Ac5taG+/6vhJz0saRLIS+pY6U=
In-Reply-To: <l3r6jsFplefU1@mid.individual.net>
 by: Paul Edwards - Fri, 23 Feb 2024 10:30 UTC

On 23/02/24 17:25, J.O. Aho wrote:
> On 23/02/2024 02.56, Paul Edwards wrote:
>> On 22/02/24 22:55, Lew Pitcher wrote:
>>> On Thu, 22 Feb 2024 21:49:19 +0800, Paul Edwards wrote:
>
>>>> And by who?
>>>
>>> That would be you. And /not/ by Linux.
>>
>> I can't properly define it myself. If I define it
>> myself, to an arbitrary value, then the ELF executable
>> will do strange things now or in the future when run
>> on Linux.
>
> Try 0x0
>
> You need to handle it in you own library pdpclib, do not expect others
> to change for you think providing a file that isn't the one on disk is ok.

If it boils down to that, then I will do one of
the things I already mentioned.

I will define it to 0x8000 0000 or 0x4000 0000
or alter the definition of an existing flag
like NOATIME.

It will achieve what I want, even though it is
a bit odd when running on real Linux.

Any suggestions within those parameters?

Otherwise I will just choose one of those things
at random and carry on my merry way.

Probably I will chose 0x8000 0000 as Linux seems
to be working their way up the bits, so I will
take what I need working my way down the bits.

What I don't know yet is whether Linux will throw
an error for the unknown flag (0x8000 0000) or
whether they will in the future put in such a
check.

If they do, I then need to switch to commandeering
NOATIME or whatever and rebuilding my software.

BFN. Paul.

Re: O_TEXT for PDOS/386

<ur9vn2$gptq$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3336&group=alt.os.linux#3336

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazilah@gmail.com (Paul Edwards)
Newsgroups: alt.os.linux
Subject: Re: O_TEXT for PDOS/386
Date: Fri, 23 Feb 2024 19:31:42 +0800
Organization: A noiseless patient Spider
Lines: 80
Message-ID: <ur9vn2$gptq$1@dont-email.me>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
<ur4nhi$33uer$1@dont-email.me> <wwvplwqdmwc.fsf@LkoBDZeT.terraraq.uk>
<ur4r5m$34umv$1@dont-email.me> <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
<ur5tfj$3d79o$1@dont-email.me> <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
<ur7ari$3rchp$1@dont-email.me> <wwvr0h47bsu.fsf@LkoBDZeT.terraraq.uk>
<ur8v4u$6nf0$1@dont-email.me> <wwvmsrrzdd1.fsf@LkoBDZeT.terraraq.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 23 Feb 2024 11:31:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4de7f0f8eb4b8cc1dcbf8958b99da91b";
logging-data="550842"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/yLoDBRmOD8XQP8R+71im/isiMbKoCJ/A="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:9nW6uZgyI8N6typtc8nT0MsKXr8=
In-Reply-To: <wwvmsrrzdd1.fsf@LkoBDZeT.terraraq.uk>
 by: Paul Edwards - Fri, 23 Feb 2024 11:31 UTC

On 23/02/24 18:25, Richard Kettlewell wrote:
> Paul Edwards <mutazilah@gmail.com> writes:
>>> No need to mess with the behavior read() and write().
>>
>> No need to mess with the behavior of read() and write() on WHICH
>> SYSTEM?
>
> Any system.

There is a need, or at least, desire, to mess
with the behavior of read and write on PDOS/386,
for the exact same reason that Cygwin does.

It has no impact on anyone else.

>>> But I think we’ve been round that loop and for unknown reasons you
>>> still seem to want to do it the hard way.
>>
>> I don't consider this to be the hard way.
>>
>> Can you suggest a syscall that I could use to detect
>> whether I am running under true Linux or PDOS/386
>> so that I can get the C library to adjust appropriately?
>
> uname()

Thanks. I've just tested that (syscall 122).

root@kerravon2-pc:/home/kerravon/w2kshare# ./pdptest.exe
welcome to pdptest
buf is XLinuxX
buf + 65 is Xkerravon2-pcX
buf + 65 * 2 is X6.5.0-18-genericX
buf + 65 * 3 is X#18~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 7
11:40:03 UTC 2X
buf + 65 * 4 is Xx86_64X
buf + 65 * 5 is X(none)X
m1 is 00000000

It looks to me like I need a buffer of size 6 * 65,
but I can add another 200 bytes and hope that is
enough.

It's not ideal, but it'll probably be sufficient.

And perhaps I could fudge this call so that on
PDOS/386 it returns 0x1234 as a magic number
instead of 0, so that I know it is PDOS/386.

That way I don't need to do a strcmp to a
particular system name. As I guess ultimately
I am trying to develop an alternative to POSIX.
So this could indicate that the alternative is
in effect.

And then if I am on a PDOS/386 (or POSIX-alternate)
system when I am opening a text file I can include a
flag of 0x8000 0000 to the open syscall.

> From another posting:
>
>> Specifically ones linked with PDPCLIB where I have
>> done very specific things (which I control) so that
>> THE BINARIES work on BOTH Linux and PDOS/386.
>
> Do you get that this is a weird requirement? You could just compile your
> code twice, one for Linux and once for your toy platform.

Sure - in fact I could just use the Win32 binaries.

But if I have to do that, I can no longer advertise
it as a "mini-Linux clone" that runs "properly-built"
Linux executables.

Where "properly-built" is something I just make up now
and roughly means "supports both POSIX and POSIX-alternate
systems".

BFN. Paul.

Re: O_TEXT for PDOS/386

<urnbrt$3t6qk$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3375&group=alt.os.linux#3375

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazilah@gmail.com (Paul Edwards)
Newsgroups: alt.os.linux
Subject: Re: O_TEXT for PDOS/386
Date: Wed, 28 Feb 2024 21:18:49 +0800
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <urnbrt$3t6qk$1@dont-email.me>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
<ur4nhi$33uer$1@dont-email.me> <wwvplwqdmwc.fsf@LkoBDZeT.terraraq.uk>
<ur4r5m$34umv$1@dont-email.me> <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
<ur5tfj$3d79o$1@dont-email.me> <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
<ur7ari$3rchp$1@dont-email.me> <wwvr0h47bsu.fsf@LkoBDZeT.terraraq.uk>
<ur8v4u$6nf0$1@dont-email.me> <wwvmsrrzdd1.fsf@LkoBDZeT.terraraq.uk>
<ur9vn2$gptq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 28 Feb 2024 13:18:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="502f8de6b28ef0ddcf3708890a9caeea";
logging-data="4102996"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Z9hfBp0vuzLCFi3oy0EVAGOoAo74Crrk="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:PYcRkPOOAW/i5Sky68lZd3Oc7TQ=
In-Reply-To: <ur9vn2$gptq$1@dont-email.me>
 by: Paul Edwards - Wed, 28 Feb 2024 13:18 UTC

Note that I have a new pdos.zip at http://pdos.org
that implements this and other things (like a dummy
fork and trimmed exec so that system() from the
Linux app works on PDOS/386).

I went with O_TEXT of 0x4000 0000 so that 0x8000 0000
could be reserved to mean "more flags available in
another variable" or whatever.

Elsewhere someone told me that even if POSIX defined
O_TEXT, in Linux they could just set that to 0, so
it was Linux I needed, not POSIX.

So I wrote to the linux-kernel mailing list asking
for suggestions, but there was no reply so I went
ahead with the above.

Proof of concept for all features (another one is
command line with no Linux stack) can be found here:

https://sourceforge.net/p/pdos/gitcode/ci/master/tree/src/int80.c

And it runs this Linux test program:

https://sourceforge.net/p/pdos/gitcode/ci/master/tree/pdpclib/makefile.lnp

That concludes my immediate interest in Linux,
and I'm on to OS/2 that needs to be fleshed
out more.

BFN. Paul.

Re: O_TEXT for PDOS/386

<urpukn$3ikcl$1@gonzo.revmaps.no-ip.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3412&group=alt.os.linux#3412

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.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!fx15.iad.POSTED!not-for-mail
From: usenet@revmaps.no-ip.org (Jasen Betts)
Newsgroups: alt.os.linux
Subject: Re: O_TEXT for PDOS/386
Organization: JJ's own news server
Message-ID: <urpukn$3ikcl$1@gonzo.revmaps.no-ip.org>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 29 Feb 2024 12:51:35 -0000 (UTC)
Injection-Info: gonzo.revmaps.no-ip.org; posting-host="localhost:127.0.0.1";
logging-data="3756437"; mail-complaints-to="usenet@gonzo.revmaps.no-ip.org"
User-Agent: slrn/1.0.3 (Linux)
X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s;a
+M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W;(T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6
{T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q;8
"9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^
Lines: 37
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Thu, 29 Feb 2024 13:00:50 UTC
Date: Thu, 29 Feb 2024 12:51:35 -0000 (UTC)
X-Received-Bytes: 2659
 by: Jasen Betts - Thu, 29 Feb 2024 12:51 UTC

On 2024-02-21, Richard Kettlewell <invalid@invalid.invalid> wrote:
> Paul Edwards <mutazilah@gmail.com> writes:
>> On 21/02/24 10:51, Lew Pitcher wrote:
>>> If you are concerned with PDOS/386 being able to use source code written
>>> to the POSIX standard,
>>
>> Not just source - that is easy to deal with.
>> The executable.
>
> Executables won’t have your extra flag unless you’ve personally modified
> and recompiled them.

Some source targeted for DOS will have O_TEXT, Turbo C had this feature
in 1988 but if you go there you probably need to implement fmode also,

>>> The alternative is to specify that such a flag /is/ required for
>>> PDOS/386,
>>
>> That's the alternative I am after.
>>
>>> which restricts you to using code written specifically for PDOS/386,
>>> and
>>
>> It is only code that uses the new flag that will work nicely on
>> PDOS/386, yes.

> How will you modify other syscalls (for example fstat and lseek) to be
> play nicely with the newline translation?

They don't play nicely don't on DOS or Windows (or UTF-8 etc...)

This is probably not needed. I'm faily sure standards allow ftell and
fseek to deal in cookies on text files.

--
Jasen.
🇺🇦 Слава Україні

Re: O_TEXT for PDOS/386

<urpva0$3ikcl$2@gonzo.revmaps.no-ip.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3415&group=alt.os.linux#3415

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
From: usenet@revmaps.no-ip.org (Jasen Betts)
Newsgroups: alt.os.linux
Subject: Re: O_TEXT for PDOS/386
Organization: JJ's own news server
Message-ID: <urpva0$3ikcl$2@gonzo.revmaps.no-ip.org>
References: <ur1i55$2chm2$1@dont-email.me> <ur2c4t$2h63i$1@dont-email.me>
<ur2co0$2hogi$1@dont-email.me> <ur2p1q$2k2bi$1@dont-email.me>
<ur363a$2mvmf$1@dont-email.me> <ur3ofe$2ptvg$1@dont-email.me>
<ur3ro9$2udhn$1@dont-email.me> <wwvjzmy87wd.fsf@LkoBDZeT.terraraq.uk>
<ur4nhi$33uer$1@dont-email.me> <wwvplwqdmwc.fsf@LkoBDZeT.terraraq.uk>
<ur4r5m$34umv$1@dont-email.me> <wwva5nt99ve.fsf@LkoBDZeT.terraraq.uk>
<ur5tfj$3d79o$1@dont-email.me> <wwv1q94izxy.fsf@LkoBDZeT.terraraq.uk>
<ur7ari$3rchp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 29 Feb 2024 13:02:56 -0000 (UTC)
Injection-Info: gonzo.revmaps.no-ip.org; posting-host="localhost:127.0.0.1";
logging-data="3756437"; mail-complaints-to="usenet@gonzo.revmaps.no-ip.org"
User-Agent: slrn/1.0.3 (Linux)
X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s;a
+M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W;(T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6
{T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q;8
"9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^
Lines: 37
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Thu, 29 Feb 2024 13:30:46 UTC
Date: Thu, 29 Feb 2024 13:02:56 -0000 (UTC)
X-Received-Bytes: 2862
 by: Jasen Betts - Thu, 29 Feb 2024 13:02 UTC

On 2024-02-22, Paul Edwards <mutazilah@gmail.com> wrote:
> On 22/02/24 17:57, Richard Kettlewell wrote:
>> Paul Edwards <mutazilah@gmail.com> writes:
>
>>> Cygwin is a correct example, I believe.
>>>
>>> And Cygwin doesn't change the behavior of Linux ELF
>>> executables either.
>>
>> AFAIK it can’t run them at all, so I don’t know why that would be
>> relevant.
>
> That's exactly the point - it doesn't run them.
> No behavior is being changed by Cygwin either.
>
>>> Nor does it change the behavior of existing POSIX source code.
>>
>> Your use case was C90 programs, not POSIX programs, last time you
>> mentioned it. Has that changed now?
>
> I am the vendor of a C90 runtime library for Linux (PDPCLIB).

As the vendor you get to choose the constants used in the header file
provided for compiling programs to link against your library.

you loose compatability with other standard libraries. but maybe
that's not a problem

> I think it is odd to call something a change in behavior
> when the software that would be "changing" hasn't even
> been written yet. Or at least, the INT 80H open() processing
> of PDOS/386 hasn't been written yet. Only write to stdout
> has been written so far. And exit.

--
Jasen.
🇺🇦 Слава Україні

Re: O_TEXT for PDOS/386

<urq03u$3ikcl$3@gonzo.revmaps.no-ip.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3416&group=alt.os.linux#3416

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
From: usenet@revmaps.no-ip.org (Jasen Betts)
Newsgroups: alt.os.linux
Subject: Re: O_TEXT for PDOS/386
Organization: JJ's own news server
Message-ID: <urq03u$3ikcl$3@gonzo.revmaps.no-ip.org>
References: <ur1i55$2chm2$1@dont-email.me> <ur2urm$2k2bi$4@dont-email.me>
<ur368i$2mvmf$2@dont-email.me> <l3llocFp8erU1@mid.individual.net>
<ur4oes$346ae$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 29 Feb 2024 13:16:46 -0000 (UTC)
Injection-Info: gonzo.revmaps.no-ip.org; posting-host="localhost:127.0.0.1";
logging-data="3756437"; mail-complaints-to="usenet@gonzo.revmaps.no-ip.org"
User-Agent: slrn/1.0.3 (Linux)
X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s;a
+M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W;(T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6
{T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q;8
"9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^
Lines: 35
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Thu, 29 Feb 2024 13:30:48 UTC
Date: Thu, 29 Feb 2024 13:16:46 -0000 (UTC)
X-Received-Bytes: 2434
 by: Jasen Betts - Thu, 29 Feb 2024 13:16 UTC

On 2024-02-21, Paul Edwards <mutazilah@gmail.com> wrote:
> On 21/02/24 15:06, J.O. Aho wrote:
>
>>>>> And it is not important to maintain the same value
>>>>> as Cygwin, because Cygwin creates PE executables,
>>>>> while mine is for ELF executables.
>>>>
>>>> Are you just trying to keep your Linux source
>>>> source-compatible with your (Cygwin-based) Windows
>>>> source? Or are you actually looking for the functionality
>>>> behind the O_TEXT flag?
>>>
>>> The latter. Functionality on PDOS/386, not Linux.
>>
>> Think you need to look into the windows source code, as open() already
>> exists in windows
>
> There is no such syscall. kernel32 exports CreateFile.
>
> Regardless - Windows won't run the Linux ELF binary -
> not even the one I produce myself - regardless. Although
> if you install WSL it would, but that's installing
> Linux - and of course Linux programs run under Linux.
>
> It is PDOS/386 that will run it. And receive the
> INT 80H. And check for the flag.
>

so make you library figure out which OS is running and
remap the flags given to the to open() function call as
apropriate when translating to int80

--
Jasen.
🇺🇦 Слава Україні

Re: O_TEXT for PDOS/386

<urvgpa$1uio9$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3437&group=alt.os.linux#3437

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mutazilah@gmail.com (Paul Edwards)
Newsgroups: alt.os.linux
Subject: Re: O_TEXT for PDOS/386
Date: Sat, 2 Mar 2024 23:31:49 +0800
Organization: A noiseless patient Spider
Lines: 66
Message-ID: <urvgpa$1uio9$1@dont-email.me>
References: <ur1i55$2chm2$1@dont-email.me> <ur2urm$2k2bi$4@dont-email.me>
<ur368i$2mvmf$2@dont-email.me> <l3llocFp8erU1@mid.individual.net>
<ur4oes$346ae$1@dont-email.me> <urq03u$3ikcl$3@gonzo.revmaps.no-ip.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 2 Mar 2024 15:31:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="54a092635716d5e0e81b49a89bdcae15";
logging-data="2050825"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/8ObPp/wGmagnE5/wKGI6LVMq908QGIrQ="
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:gxGE1B9SUAqWRwXMwjRwvi0ztKo=
In-Reply-To: <urq03u$3ikcl$3@gonzo.revmaps.no-ip.org>
 by: Paul Edwards - Sat, 2 Mar 2024 15:31 UTC

On 29/02/24 21:16, Jasen Betts wrote:

> On 2024-02-21, Paul Edwards <mutazilah@gmail.com> wrote:
>> On 21/02/24 15:06, J.O. Aho wrote:
>>
>>>>>> And it is not important to maintain the same value
>>>>>> as Cygwin, because Cygwin creates PE executables,
>>>>>> while mine is for ELF executables.
>>>>>
>>>>> Are you just trying to keep your Linux source
>>>>> source-compatible with your (Cygwin-based) Windows
>>>>> source? Or are you actually looking for the functionality
>>>>> behind the O_TEXT flag?
>>>>
>>>> The latter. Functionality on PDOS/386, not Linux.
>>>
>>> Think you need to look into the windows source code, as open() already
>>> exists in windows
>>
>> There is no such syscall. kernel32 exports CreateFile.
>>
>> Regardless - Windows won't run the Linux ELF binary -
>> not even the one I produce myself - regardless. Although
>> if you install WSL it would, but that's installing
>> Linux - and of course Linux programs run under Linux.
>>
>> It is PDOS/386 that will run it. And receive the
>> INT 80H. And check for the flag.
>
> so make you library figure out which OS is running and
> remap the flags given to the to open() function call as
> apropriate when translating to int80

Why would anything need to be remapped? Whenever
Linux binaries are run, I use standard Linux
values for everything in every system call. With
one single exception, which is an addition, not
a change - I add the O_TEXT of 0x4000 0000, which
I want ignored on Linux (only), and is indeed
ignored (on Linux).

Anyway, PDOS/386 now runs 32-bit MSDOS (by some
definition), Win32, Linux and OS/2 binaries. A
subset of valid binaries. Enough to run my
toolchain, and use my toolchain to rebuild my
toolchain.

OS/2 still has some gaps in the toolchain though.
I don't have a linker to build OS/2 executables
and I don't have the microemacs editor working
for OS/2 32-bit yet. Both are being worked on
currently.

And none of the executables I produce are dependent
on the registers or stack at entry, which clears
the way to introduce the PDOS-generic ABI, where
instead of DLLs, you are given a pointer to a
structure with callback functions for a C library.

BTW, another development was UC386L, a 50k Linux
executable, with no external dependencies, not
even libc, is capable of running that same subset
of valid Win32 and OS/2 executables.

BFN. Paul.

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor