Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Lars

Pages: [1] 2 3 ... 97
1
Programming / Re: Networking: socket() returns positive `non-socket`
« on: July 12, 2025, 09:56:54 pm »
don't know username and password...

2
Programming / Re: Networking: socket() returns positive `non-socket`
« on: July 12, 2025, 02:23:47 pm »
Can someone help me in setting up the build env ? I would like to build but seemingly, mapmagena and agena are asking for a bunch of libs where I don't know where to get the from, left alone how to build them.

I have some idea of what goes wrong with the socket code.

3
Programming / Re: Networking: socket() returns positive `non-socket`
« on: July 08, 2025, 09:04:11 am »
Building agena with makefile.os2 renamed to makefile, so 'make os2' with gcc 9.2.0 dies with,
Code: [Select]
make all MYCFLAGS="-O2 -static-libgcc -DLUA_BUILD_AS_DLL -D_FILE_OFFSET_BITS=64 -D_DIRENT_HAVE_D_TYPE -DPCRE2_CODE_UNIT_WIDTH=8 -D__ST_MT_ERRNO__ -DLUA_USE_LINUX -DINCL_BASE -DHAVE_NCURSES_H"
make[1]: Entering directory 'H:/tmp/agena-5.1.1-src/src'
gcc -Wall -Wno-attributes -Wno-strict-aliasing -Wno-deprecated-declarations -Wno-unknown-pragmas -fgnu89-inline -fomit-frame-pointer -DLUA_BUILD_AS_DLL -D_FILE_OFFSET_BITS=64 -D_DIRENT_HAVE_D_TYPE -DPCRE2_CODE_UNIT_WIDTH=8 -D__ST_MT_ERRNO__ -DLUA_USE_LINUX -DINCL_BASE -DHAVE_NCURSES_H -O2 -static-libgcc -DLUA_BUILD_AS_DLL -D_FILE_OFFSET_BITS=64 -D_DIRENT_HAVE_D_TYPE -DPCRE2_CODE_UNIT_WIDTH=8 -D__ST_MT_ERRNO__ -DLUA_USE_LINUX -DINCL_BASE -DHAVE_NCURSES_H   -c -o lvm.o lvm.c
In file included from ldo.h:11,
                 from lvm.h:10,
                 from lvm.c:24:
lvm.c: In function 'luaV_execute':
lobject.h:217:37: error: incompatible types when assigning to type 'complex double' from type 'lua_Number *' {aka 'double *'}
  217 |   { TValue *i_o=(obj); i_o->value.c=(x); i_o->tt=LUA_TCOMPLEX; }
      |                                     ^
lvm.c:9121:15: note: in expansion of macro 'setcvalue'
 9121 |               setcvalue(ra, z);
      |               ^~~~~~~~~
make[1]: *** [<builtin>: lvm.o] Error 1
make[1]: Leaving directory 'H:/tmp/agena-5.1.1-src/src'
make: *** [makefile:117: os2] Error 2

Similar error with gcc 4.4.6, just less informative.
Need a cast?

I`d try this:
 { TValue *i_o=(obj); i_o->value.c=(*(complex *)(x)); i_o->tt=LUA_TCOMPLEX; }

Looks like the macro is being passed a pointer to double whereas the macro itself uses "complex" which is likely a struct with 2 doubles.

4
Programming / Re: Networking: socket() returns positive `non-socket`
« on: July 08, 2025, 08:45:15 am »
1) Have one C function that opens a socket and returns its descriptor, a positive integer, to the Lua environment.

2) Have additional, separate C functions that take the socket descriptor from 1) and that bind, connect, etc.

I guess that as soon as the scope of C function 1) in ArcaOS is left and the interpreter returns to the Lua environment, any info on the socket descriptor is lost and the socket is automatically closed so that all the other functions 2) reject it ?

What exactly do you want to say with "the interpreter returns to the Lua environment" ? Your agena.exe code sample is a self-contained executable. I cannot see anything returning to anywhere (granted that the code sample is not complete ...).

I could image that if the "socket" implementation maps socket handles to "virtual" file handles that then handle inheritance and such come into play. That would mean that you will have to know what process or processes access these handles. I have no clue how you would make a socket handle created in process A known to a process B but I suppose that there are ways to do that.
Another thing that I could think of (intentionally or erroneously) is if there is some "tcperrno" variable that might get globally set and that you might have to reset before a call.
I hope that you will only ever get a socket handle >= 3. Because 0 would be for stdin, 1 for stdout and 2 for stderr if we follow the logic that socket handles are mapped to file handles.

5
Programming / Re: Brainstorm: OS/2 on a Different Kernel
« on: June 30, 2025, 11:15:03 am »
What is now left to do is to persuade ChatGPT to write the code for you.

6
Hi/2.

JFS itself supports unicode although I'm not sure its UCS-2 or UTF-8. However, no OS/2 IO APIs do not support Unicode at all. Converting layer is necessary.

Anyway if you have problems only for file names, then try https://github.com/komh/git-os2/releases/tag/2.42.0-os2-r1.

JFS.IFS uses UNICODE.SYS in conjunction with the
  • KernCreateUconvObject
  • KernStrFromUcs
  • KernStrToUcs

Kernel excutive Ring 0 functions (by the way: that is the reason why you have to load UNICODE.SYS before JFS.IFS because KernCreateUConvObject only works during init time and it requires UNICODE.SYS to be available).

That said, I seem to remember that KernStrFromUcs and KernStrToUcs can only convert from/to UCS-2 (as the name implies). If you would need to convert to UTF-8, you would likely need to use KernStrToUcs to go from your local codepage to UCS-2 and then KernStrFromUcs to go from UCS-2 to UTF-8 if you specify that as the target codepage. Would need to look into the OpenJFS sources but I don't think it does that. I also seem to remember that every character of a JFS filename (on disk) is 16-bit. That would exclude UTF-8 as far as I know.

7
Hi

The 'kLIBC Pathwriters' that I installed (klibccfg_1_0_2_1.exe) did not added TEMP, TMPDIR, LOGFILES on the config.sys.

I add those manually and the D: drive issues are gone.

Thanks. I will keep testing the ANPM.

I had updated to this:
https://hobbesarchive.com/Home/Download?path=/Hobbes/pub/os2/util/misc/prewrite2.wpi

which will set the common profile values and circument a problem with the existing klibccfg.dl. I replaced it with a "prewrite.dll", just like AN does.

8
Hardware / Re: URGENT Need for OS/2 Compatible Inkjet Printer
« on: May 30, 2025, 06:53:36 pm »
Looks like the HP Deskjet 6122 has a USB connection which is good to start with.
The easiest will be to buy a Postscript capable printer with a USB connection or even Ethernet connection.
Postscript was and is still pretty well supported by OS/2. I am using a Postscript Printer (Brother MFC-L8650CDW: but this is a Laserprinter) and that works well with the OS/2 supplied Postscript Driver.

9
Setup & Installation / Re: Cannot update python
« on: May 29, 2025, 08:14:47 am »
I still cannot update python.
I tried:
1) updating via ANPM
2) run "yum update python3" from a commandline
3) run "yum update python3 python2.7" from a commandline

All to no avail, each ends with a version conflict, for example from ANPM:
Quote
ERROR with transaction check vs depsolve:python(abi) = 3.9 wird benötigt von (installiert) python3-dateutil-1:2.8.1-3.oc00.noarchBitte melden Sie diesen Fehler unter http://yum.baseurl.org/report

Is there any "force" mode to force the update ?

10
Programming / Re: EDM/2 - The API Project - Undocumented
« on: May 28, 2025, 11:34:41 am »
Hello Steven.

You know more than me on this area.
My references are:
1) DevHlp_AddTraceEvent
-- "SMP Programming Addendum" on the "STRACE - DevHlp Functions"

-- sg244640: "Trace Events for DEVHELP Major Code: 0X0006, Sorted by Tracepoint"
--- OS) DevHlp_AddTraceEvent Post-Invocation 00132 (0X0084)
--- OS) DevHlp_AddTraceEvent Pre-Invocation 00004 (0X0004)


2) DevHlp_SysTrace
-- "Programming Guide and Reference Addendum"  on the "Device Helper (DevHlp) Services and Function Codes" at "DevHlp_SysTrace".

There it says "DevHlp_SysTrace is synonymous with DevHlp_RAS."

On "devhlp.inc" from the DDK it has:
Quote
DevHlp_RAS              EQU     40      ; 28    Put info in RAS trace buffer
DevHlp_SysTrace         EQU     40      ; 28    Synonym for DevHlp_RAS   f180062

This is why I guess that DevHlp_RAS and DevHlp_SysTrace  are the same. No idea about "DevHlp_AddTraceEvent".

Regards

Looks like we are spinning around in circles:

you will realize that major trace code 0x0006 neither lists DevHlp_RAS nor DevHlp_SysTrace. That said, it looks like DevHlp_AddTraceEvent = DevHlp_RAS = DevHlp_SysTrace as that is what this devhelp does: it adds a trace event to the trace buffer.

11
Programming / Re: EDM/2 - The API Project - Undocumented
« on: May 27, 2025, 01:47:34 pm »
DevHlp_AddTraceEvent    -  Not found in pddref.inf

DevHlp_AddTraceEvent = DevHlp_SysTrace = DevHlp_RAS

12
Setup & Installation / Re: Cannot update cups
« on: May 24, 2025, 10:32:19 am »
My initial thought was that the running cups daemon process would be the problem.
But that was not the case. It was that stupid EA problem.
But thanks for the hint. Because as you said, I was not able to kill it and I was not aware that I would need to try several times.

13
Setup & Installation / Re: Cannot update cups
« on: May 22, 2025, 08:02:11 am »
I found the cause:

the system claimed that:

E [21/May/2025:07:44:23 -0100] "/@unixroot/var/run/cups/certs" is not a directory.


That was obviously wrong as this directory does exist and in fact, it is a directory. It turned out that this directory was "contaminated" with the usual Unix EA crap (UID, GID, MODE, etc.). Once I completely removed all EAs from the directory, I was able to properly update CUPS.

Sigh ...

14
Setup & Installation / Cannot update cups
« on: May 22, 2025, 07:21:37 am »
Looks like I am out of luck when it comes to updating packages.

I tried to update CUPS, the package download succeeds (I can find it under \var\cache\yum) but finally I get this:
Error unpacking rpm package 1:cups-2.2.13-2.oc00.pentium4

When I use the commandline, I get this:

Quote
{1}[d:\] yum install cups-2.2.13-2.oc00.pentium4
Geladene Plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
Einrichten des Installationsprozess
Löse Abhängigkeiten auf
--> Führe Transaktionsprüfung aus
---> Paket cups.pentium4 1:2.2.13-1.oc00 markiert, um aktualisiert zu werden
---> Paket cups.pentium4 1:2.2.13-2.oc00 markiert, um an update zu werden
--> Abhängigkeitsauflösung beendet

Abhängigkeiten aufgelöst

================================================================================

 Paket       Arch            Version                   Repository         Größe
================================================================================

Aktualisieren:
 cups        pentium4        1:2.2.13-2.oc00           netlabs-exp        2.0 M

Vorgangsübersicht
================================================================================

Upgrade       1 Package

Gesamtgröße: 2.0 M
Ist dies in Ordnung? [j/N] :j
Lade Pakete herunter:
Running Transaction Check
Führe Verarbeitungstest durch
Verarbeitungstest erfolgreich
Führe Verarbeitung durch
  Aktualisieren: 1:cups-2.2.13-2.oc00.pentium4                              1/2

Error unpacking rpm package 1:cups-2.2.13-2.oc00.pentium4
Warnung: /@unixroot/etc/cups/classes.conf erstellt als /@unixroot/etc/cups/classes.conf.rpmnew
Warnung: /@unixroot/etc/cups/cupsd.conf erstellt als /@unixroot/etc/cups/cupsd.conf.rpmnew
Warnung: /@unixroot/etc/cups/lpoptions erstellt als /@unixroot/etc/cups/lpoptions.rpmnew
Warnung: /@unixroot/etc/cups/printers.conf erstellt als /@unixroot/etc/cups/printers.conf.rpmnew
Fehler: Entpacken des Archivs fehlgeschlagen bei Datei /@unixroot/var/run/cups/certs: cpio: unlink
1:cups-2.2.13-1.oc00.pentium4 was supposed to be removed but is not!

Fehlgeschlagen:
  cups.pentium4 1:2.2.13-1.oc00          cups.pentium4 1:2.2.13-2.oc00

Komplett!

So: is there a way for force an RPM installation ?

If all of this is a problem because CUPS is running, how can I stop CUPS (without manipulating config.sys and rebooting) ?



15
Setup & Installation / Cannot update python
« on: May 12, 2025, 08:34:13 am »
Hi there,

I am offered python3 update to 3.13.2.-1. ANPM properly download all dependencies but fails with a "depsolve" problem.
I have tried both, copy python2.7.exe to python.exe and also python3.9.exe to python.exe but it fails anyway.
How do I force installation ? Obviously, I cannot do that from ANPM but a simple "yum update" does not offer such a thing as a --force switch.

Pages: [1] 2 3 ... 97