Re: [fpc-pascal] libc unit and FreeBSD

2008-01-14 Thread Marco van de Voort
> Anybody know if there is a generic set of methods that supports all > (or most) unix style OS's? I looked in 'baseunix', but there the > group and name methods relate to a process id's, not to file > attributes... Baseunix and Unix should be implementable without libc for maximal portability. B

[fpc-pascal] What about signals.pp on win32?

2008-01-14 Thread Tiziano De Togni
I was trying to convert a C source to Pascal. It uses signals, and I thought that these things were not available on Win platforms. Documentation talks about signals in oldlinux and baseunix units only (Linux). Then I went on the signals.pp unit in: C:\fpc\...\source\rtl\win32\signals.pp

Re: [fpc-pascal] What about signals.pp on win32?

2008-01-14 Thread Michael Van Canneyt
On Mon, 14 Jan 2008, Tiziano De Togni wrote: > > I was trying to convert a C source to Pascal. It uses signals, and I thought > that these things were not available on Win platforms. > > Documentation talks about signals in oldlinux and baseunix units only (Linux). > > Then I went on the sign

Re: [fpc-pascal] libc unit and FreeBSD

2008-01-14 Thread Michael Van Canneyt
On Mon, 14 Jan 2008, Marco van de Voort wrote: > > Anybody know if there is a generic set of methods that supports all > > (or most) unix style OS's? I looked in 'baseunix', but there the > > group and name methods relate to a process id's, not to file > > attributes... > > Baseunix and Unix s

Re: [fpc-pascal] Problem using fpc

2008-01-14 Thread Damien Gerard
On Jan 14, 2008, at 7:13 AM, Plato wrote: Compiling using the IDE+fpc 2.2.0 works correctly on my laptop(celeron cpu), yet on my new desktop(Intel 2140 Dual Core + one SATA disk and 2 IDE disks) I consistently get the following result if compiling a program(or unit) eg for a file 'x

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Michael Van Canneyt
On Mon, 14 Jan 2008, Damien Gerard wrote: > > With fpc you can get "myfile.pas(77,47) Warning: Constructing a class "" > with abstract methods" > I just would like to know why it is allowed to build classes with abstract > methods. AFIK it is different from other compilers and it is a bit s

[fpc-pascal] Classes with abstract methods

2008-01-14 Thread Damien Gerard
With fpc you can get "myfile.pas(77,47) Warning: Constructing a class "" with abstract methods" I just would like to know why it is allowed to build classes with abstract methods. AFIK it is different from other compilers and it is a bit strange for me. -- Damien Gerard [EMAIL PROTEC

Re: [fpc-pascal] What about signals.pp on win32?

2008-01-14 Thread Michael Van Canneyt
On Mon, 14 Jan 2008, Tiziano De Togni wrote: > Michael Van Canneyt ha scritto: > > > > On Mon, 14 Jan 2008, Tiziano De Togni wrote: > > > > > I was trying to convert a C source to Pascal. It uses signals, and I > > > thought > > > that these things were not available on Win platforms. > > > >

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Damien Gerard
On Jan 14, 2008, at 10:27 AM, Michael Van Canneyt wrote: On Mon, 14 Jan 2008, Damien Gerard wrote: With fpc you can get "myfile.pas(77,47) Warning: Constructing a class "" with abstract methods" I just would like to know why it is allowed to build classes with abstract methods. AF

Re: [fpc-pascal] What about signals.pp on win32?

2008-01-14 Thread Tiziano De Togni
Michael Van Canneyt ha scritto: On Mon, 14 Jan 2008, Tiziano De Togni wrote: I was trying to convert a C source to Pascal. It uses signals, and I thought that these things were not available on Win platforms. Documentation talks about signals in oldlinux and baseunix units only (Linux). Then

Re: [fpc-pascal] arm-linux, program does not start when using unit pthreads

2008-01-14 Thread Bernd Mueller
Koenraad Lelong wrote: Bernd Mueller schreef: Koenraad Lelong wrote: I tried on my arm-linux board, AFAIK NOT uClibc. It works fine. Thanks. Are you crosscompiling? Do you use static or dynamic linking? Regards, Bernd. When I read you reply about linking I realised I didn't think about the

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Michael Van Canneyt
On Mon, 14 Jan 2008, Damien Gerard wrote: > > On Jan 14, 2008, at 10:27 AM, Michael Van Canneyt wrote: > > > > > > >On Mon, 14 Jan 2008, Damien Gerard wrote: > > > > > > > >With fpc you can get "myfile.pas(77,47) Warning: Constructing a class > > >"" > > >with abstract methods" > > >I just

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Damien Gerard
On Jan 14, 2008, at 11:00 AM, Graeme Geldenhuys wrote: On 14/01/2008, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: Is there a way to abort the compilation in this cases instead of a warning ? Currently not. If you want to be that strict, then use Interfaces instead of Abstract class

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Damien Gerard
On Jan 14, 2008, at 10:53 AM, Michael Van Canneyt wrote: On Mon, 14 Jan 2008, Damien Gerard wrote: On Jan 14, 2008, at 10:27 AM, Michael Van Canneyt wrote: On Mon, 14 Jan 2008, Damien Gerard wrote: With fpc you can get "myfile.pas(77,47) Warning: Constructing a class "" with

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Graeme Geldenhuys
On 14/01/2008, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > > > > Is there a way to abort the compilation in this cases instead of a warning ? > > Currently not. If you want to be that strict, then use Interfaces instead of Abstract classes. - Regards, - Graeme -

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Matt Emson
Graeme Geldenhuys wrote: On 14/01/2008, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: Is there a way to abort the compilation in this cases instead of a warning ? Currently not. If you want to be that strict, then use Interfaces instead of Abstract classes I always found (an

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Peter Vreman
>> >It is allowed to create such instances: as long as you don't call any of the >> >abstract methods, there will be no problem. >> >> >> Is there a way to abort the compilation in this cases instead of a warning ? > > Currently not. You can abort compilation in case of any warning with the -Sew o

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Michael Van Canneyt
On Mon, 14 Jan 2008, Peter Vreman wrote: > >> >It is allowed to create such instances: as long as you don't call any of > >> >the > >> >abstract methods, there will be no problem. > >> > >> > >> Is there a way to abort the compilation in this cases instead of a warning > >> ? > > > > Currently

Re: [fpc-pascal] libc unit and FreeBSD

2008-01-14 Thread Graeme Geldenhuys
Hi, For now I wrapped the libc calls with $IFDEF LINUX and for other unix variants I simply return the Group ID and User ID (instead of the more friend names). A quick work-around for me would be to read the /etc/groups and /etc/passwd files looking for the Group ID or User ID and return the asso

Re: [fpc-pascal] libc unit and FreeBSD

2008-01-14 Thread Marc Santhoff
Am Montag, den 14.01.2008, 09:23 +0200 schrieb Graeme Geldenhuys: > The offending code is as follows... > > function GetGroupName(gid: integer): string; > var > p: PGroup; > begin > p := getgrgid(gid); > if p <> nil then > result := p^.gr_name; > end; > > function GetUserName(uid: inte

Re: [fpc-pascal] libc unit and FreeBSD

2008-01-14 Thread Jonas Maebe
On 14 Jan 2008, at 12:03, Graeme Geldenhuys wrote: A quick work-around for me would be to read the /etc/groups and /etc/passwd files looking for the Group ID or User ID and return the associated names. I can parse and keep a copy of those files in memory while the File Dialog is open - than wa

Re: [fpc-pascal] libc unit and FreeBSD

2008-01-14 Thread Graeme Geldenhuys
On 14/01/2008, Jonas Maebe <[EMAIL PROTECTED]> wrote: > > Does anybody know if unix type OS's allow normal (general) users to > > read those files from /etc? > > Yes, but they they do not necessarily contain any useful information. > The actually used information may be on an ldap server, in a neti

[fpc-pascal] TStringList

2008-01-14 Thread Damien Gerard
I often use TObjectLis, which is able to destroy by itself objects in its list. However, is it the same with a TStringList when an object is added with AddObject ? I mean when the method .Clear or Delete are called, is my associated object is destroyed in the same time ? I suppose there i

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Jonas Maebe
On 14 Jan 2008, at 14:43, Damien Gerard wrote: On Jan 14, 2008, at 11:55 AM, Michael Van Canneyt wrote: The problem with this mechanism is that if you have another warning which occurs first, that will stop your compilation, you'll never get to the abstract warning... I agree. May be a n

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Damien Gerard
On Jan 14, 2008, at 11:55 AM, Michael Van Canneyt wrote: On Mon, 14 Jan 2008, Peter Vreman wrote: It is allowed to create such instances: as long as you don't call any of the abstract methods, there will be no problem. Is there a way to abort the compilation in this cases instead of

Re: [fpc-pascal] TStringList

2008-01-14 Thread Michael Van Canneyt
On Mon, 14 Jan 2008, Damien Gerard wrote: > > I often use TObjectLis, which is able to destroy by itself objects in its > list. > However, is it the same with a TStringList when an object is added with > AddObject ? No. > > I mean when the method .Clear or Delete are called, is my associated

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Damien Gerard
On Jan 14, 2008, at 2:59 PM, Jonas Maebe wrote: On 14 Jan 2008, at 14:43, Damien Gerard wrote: On Jan 14, 2008, at 11:55 AM, Michael Van Canneyt wrote: The problem with this mechanism is that if you have another warning which occurs first, that will stop your compilation, you'll never get

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Peter Vreman
>>> The problem with this mechanism is that if you have another >>> warning which occurs first, >>> that will stop your compilation, you'll never get to the abstract >>> warning... >> >> I agree. >> May be a new option in a future release of fpc ? :) >> It would be nice to have a switch to do it. >

Re: [fpc-pascal] Classes with abstract methods

2008-01-14 Thread Jonas Maebe
On 14 Jan 2008, at 15:45, Peter Vreman wrote: There is already a feature request for the ability to turn off/on certain warnings in Mantis. Upgrading certain warnings (and hints/ notes) to errors is quite related. It should be quite doable for an outsider to implement this sort functionality, b

[fpc-pascal] The fpGUI Toolkit supports FreeBSD!

2008-01-14 Thread Graeme Geldenhuys
Hi, Since revision 490, FreeBSD has been certified as a supported platform of fpGUI! :) I've used FPC 2.2.0 under DesktopBSD v1.6 (which is derived from FreeBSD 6). I've compiled all the example and prototype projects and tested each one individually. Everything works exactly like under Linux an

Re: [fpc-pascal] The fpGUI Toolkit supports FreeBSD!

2008-01-14 Thread Bee
As a side note... I'm also getting ready for the next fpGUI release. A few minor fixes are all that is left. fpGUI has had some major improvements and fixes added since the previous v0.5 release. The next release should be a good one! I've been waiting to compile Lazarus IDE using fpGUI. If it h