Re: [fpc-pascal] Is there a smart way to save/restore NotifyEvents and objects?

2018-02-02 Thread Dennis Poon
Sven Barth via fpc-pascal wrote: Am 02.02.2018 17:53 schrieb "Dennis" >: I have list of objects which contains references to other objects. I need to save all these objects to harddisk to be restored on a latter day. I

Re: [fpc-pascal] Is there a smart way to save/restore NotifyEvents and objects?

2018-02-02 Thread Sven Barth via fpc-pascal
Am 02.02.2018 17:53 schrieb "Dennis" : I have list of objects which contains references to other objects. I need to save all these objects to harddisk to be restored on a latter day. I know how to stream the data fields of these objects to a TFileStream but the tricky part

Re: [fpc-pascal] question about _fpc_local_unwind

2018-02-02 Thread Sven Barth via fpc-pascal
Am 02.02.2018 18:12 schrieb "Matias Vara" : Hello, 2018-02-02 17:17 GMT+01:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > Am 02.02.2018 15 <02%2002%2020%2018%2015>:50 schrieb "Matias Vara" < > matiasev...@gmail.com>: > > Thanks for the answer, I will

Re: [fpc-pascal] question about _fpc_local_unwind

2018-02-02 Thread Matias Vara
Hello, 2018-02-02 17:17 GMT+01:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > Am 02.02.2018 15 <02%2002%2020%2018%2015>:50 schrieb "Matias Vara" < > matiasev...@gmail.com>: > > Thanks for the answer, I will imitate in Toro the behavior of Win64. > > > Maybe it wound be better

[fpc-pascal] Is there a smart way to save/restore NotifyEvents and objects?

2018-02-02 Thread Dennis
I have list of objects which contains references to other objects. I need to save all these objects to harddisk to be restored on a latter day. I know how to stream the data fields of these objects to a TFileStream but the tricky part is these how to restore the object references. The only

Re: [fpc-pascal] question about _fpc_local_unwind

2018-02-02 Thread Sven Barth via fpc-pascal
Am 02.02.2018 15:50 schrieb "Matias Vara" : Thanks for the answer, I will imitate in Toro the behavior of Win64. Maybe it wound be better if you try to use the i386-embedded or x86_64-embedded targets. The non-embedded targets are simply not geared towards usage on a bare

Re: [fpc-pascal] libc and math.h on Linux

2018-02-02 Thread Adriaan van Os
Marco van de Voort wrote: In our previous episode, Adriaan van Os said: Long double is probably 10-byte extended, but verify that by compiling and running a small C program for your distro. I assume that the FPC clongdouble type has the right size ? Define "right". Well, a cxxx type is

Re: [fpc-pascal] libc and math.h on Linux

2018-02-02 Thread Marco van de Voort
In our previous episode, Adriaan van Os said: > > Long double is probably 10-byte extended, but verify that by compiling and > > running a small C program for your distro. > > I assume that the FPC clongdouble type has the right size ? Define "right". > I checked on OS X (x86) where FPC

Re: [fpc-pascal] question about _fpc_local_unwind

2018-02-02 Thread Matias Vara
Thanks for the answer, I will imitate in Toro the behavior of Win64. Matias 2018-02-01 20:49 GMT+01:00 Jonas Maebe : > On 01/02/18 16:24, Matias Vara wrote: > >> I partial answered my question by reading https://www.freepascal.org/doc >> s-html/ref/refse114.html. So I

Re: [fpc-pascal] libc and math.h on Linux

2018-02-02 Thread Adriaan van Os
Marco van de Voort wrote: Long double is probably 10-byte extended, but verify that by compiling and running a small C program for your distro. I assume that the FPC clongdouble type has the right size ? I checked on OS X (x86) where FPC longdouble is 10-byte, FPC clongdouble is 16-byte and

Re: [fpc-pascal] libc and math.h on Linux

2018-02-02 Thread Marco van de Voort
In our previous episode, Adriaan van Os said: > I have to import the math.h libc functions listed here > . What is the > recommended way to do this for general Linux compatibility ? Not do this ? :-) > Simply declare them external ?

Re: [fpc-pascal] Problem with file descriptors when doing fork on linux

2018-02-02 Thread Luca Olivetti
El 02/02/18 a les 11:33, Michael Van Canneyt ha escrit: Or more generally do exists in fpc some other way how to deal with this problem - to create new process but without copied file descriptors? No, currently not. Why doesn't the unix implementation take into account the

Re: [fpc-pascal] libc and math.h on Linux

2018-02-02 Thread Karoly Balogh (Charlie/SGR)
Hi, On Fri, 2 Feb 2018, Adriaan van Os wrote: > I have to import the math.h libc functions listed here > . What is the > recommended way to do this for general Linux compatibility ? Simply > declare them external ? Load them from libc

[fpc-pascal] libc and math.h on Linux

2018-02-02 Thread Adriaan van Os
I have to import the math.h libc functions listed here . What is the recommended way to do this for general Linux compatibility ? Simply declare them external ? Load them from libc dynamically ? Anything else ? I know that the FPC runtime

Re: [fpc-pascal] Problem with file descriptors when doing fork on linux

2018-02-02 Thread Michael Van Canneyt
On Fri, 2 Feb 2018, Ko Paka wrote: Hello, I would like to ask advice. My colleague run into a problem, when he had used TProcess to spawn other process. Because of fork nature, file descriptors was copied into newly created process. He found that for such cases CLOEXEC flag exists to be used

[fpc-pascal] Problem with file descriptors when doing fork on linux

2018-02-02 Thread Ko Paka
Hello, I would like to ask advice. My colleague run into a problem, when he had used TProcess to spawn other process. Because of fork nature, file descriptors was copied into newly created process. He found that for such cases CLOEXEC flag exists to be used when open file. I found flag declared