[fpc-pascal] linker apache linux

2009-10-07 Thread Alexey Voychehovich
Hello all if i try compile free pascal http22 examples in ubuntu - i get this error. -- a...@ubuntu:/usr/share/fpcsrc/2.2.2/packages/httpd22/examples$ sudo make /bin/mkdir -p units/i386-linux /usr/bin/ppc386 -Fu../../../rtl -Fu../../../packages/httpd22/units/i386-linux -FE. -FUunits/i386-linux -Fl

[fpc-pascal] FIONREAD FPC FpIOCtl for Cross platform Sockets

2009-10-07 Thread Andrew Brunner
Sockets programming often requires a poll for how much data is available on a particular socket descriptor. I'm porting an inhouse library for a sockets implementation and I realize that while I have a FpIOCtl call in the baseUnix unit I have no such animal in the Sockets implement which would be

Re: [fpc-pascal] Case in Record

2009-10-07 Thread Jürgen Hestermann
IIRC, there is a difference. With the second declaration the compiler can add a run-time check that the correct memebrs are accessed based on the value of X. Unfortunately, I cannot find the compiler switch. FPC has no support for this. And I don't know any other Pascal Compiler who does any

Re: [fpc-pascal] X, Y co-ordinate system under OS/2

2009-10-07 Thread Tomas Hajny
On Wed, October 7, 2009 16:31, Graeme Geldenhuys wrote: Hi, > I'm porting an OS/2 application to Linux & Windows. From what I can > see in the code, it looks like co-ordinates (0,0) is in the bottom > left corner of the screen. Whereas Windows and Linux, co-ordinates > (0,0) is in the Top Left

[fpc-pascal] X, Y co-ordinate system under OS/2

2009-10-07 Thread Graeme Geldenhuys
Hi, I'm porting an OS/2 application to Linux & Windows. From what I can see in the code, it looks like co-ordinates (0,0) is in the bottom left corner of the screen. Whereas Windows and Linux, co-ordinates (0,0) is in the Top Left of the screen. Is my assumption correct? If so, DAMN! This is go

Re: [fpc-pascal] freepascal and apache

2009-10-07 Thread Alexey Voytsehovich
Hello Michael, Wednesday, October 7, 2009, 1:58:50 PM, you wrote: >> >> >>> Correct, because the function is called apr_table_get (note the r), >>> and is located in unit apr, not in httpd. >> >> >> and please help also >> function ap_hard_timeout. not found in httpd22 directory. then i find >>

Re: [fpc-pascal] freepascal and apache

2009-10-07 Thread Michael Van Canneyt
On Wed, 7 Oct 2009, Alexey Voytsehovich wrote: Hello Michael, Wednesday, October 7, 2009, 10:31:26 AM, you wrote: Correct, because the function is called apr_table_get (note the r), and is located in unit apr, not in httpd. and please help also function ap_hard_timeout. not found in ht

Re: [fpc-pascal] freepascal and apache

2009-10-07 Thread Alexey Voytsehovich
Hello Michael, Wednesday, October 7, 2009, 10:31:26 AM, you wrote: > Correct, because the function is called apr_table_get (note the r), > and is located in unit apr, not in httpd. and please help also function ap_hard_timeout. not found in httpd22 directory. then i find this function or rep

Re: [fpc-pascal] Case in Record

2009-10-07 Thread Jonas Maebe
On 07 Oct 2009, at 10:18, Florian Klaempfl wrote: Vincent Snijders schrieb: Jonas Maebe schreef: On 07 Oct 2009, at 09:19, Vincent Snijders wrote: IIRC, there is a difference. With the second declaration the compiler can add a run-time check that the correct memebrs are accessed based

Re: [fpc-pascal] Case in Record

2009-10-07 Thread Florian Klaempfl
Vincent Snijders schrieb: > Jonas Maebe schreef: >> >> On 07 Oct 2009, at 09:19, Vincent Snijders wrote: >> >>> IIRC, there is a difference. With the second declaration the compiler >>> can add a run-time check that the correct memebrs are accessed based >>> on the value of X. >>> >>> Unfortunately

Re: [fpc-pascal] TUN/TAP

2009-10-07 Thread Jorge Aldo G. de F. Junior
thats h2pas result of compilling this structure into pascal. But thanks for the tip. 2009/10/7 Jürgen Hestermann > > > > Jorge Aldo G. de F. Junior schrieb: > >> type ifreq = record >> ifr_ifrn : record >> case longint of >> 0 : ( ifrn_name : array[0..15] of

Re: [fpc-pascal] Case in Record

2009-10-07 Thread Vincent Snijders
Jonas Maebe schreef: On 07 Oct 2009, at 09:19, Vincent Snijders wrote: IIRC, there is a difference. With the second declaration the compiler can add a run-time check that the correct memebrs are accessed based on the value of X. Unfortunately, I cannot find the compiler switch. FPC has no

Re: [fpc-pascal] Case in Record

2009-10-07 Thread Jonas Maebe
On 07 Oct 2009, at 09:19, Vincent Snijders wrote: IIRC, there is a difference. With the second declaration the compiler can add a run-time check that the correct memebrs are accessed based on the value of X. Unfortunately, I cannot find the compiler switch. FPC has no support for this.

Re: [fpc-pascal] freepascal and apache

2009-10-07 Thread Alexey Voytsehovich
Hello Michael, Wednesday, October 7, 2009, 10:31:26 AM, you wrote: > Correct, because the function is called apr_table_get (note the r), > and is located in unit apr, not in httpd. nice. it`s working. thanks -- Best regards, Alexey Voytsehovichmailto:iron...@gma

Re: [fpc-pascal] freepascal and apache

2009-10-07 Thread Michael Van Canneyt
On Wed, 7 Oct 2009, Alexey Voytsehovich wrote: Hello Michael, Wednesday, October 7, 2009, 10:13:08 AM, you wrote: On the command-line, define one of FPCAPACHE_2_0 or FPCAPACHE_2_2 (as in -dFPCAPACHE_2_0) (or delete the units in units/httpd-1.3) build string fpc -dFPCAPACHE_2_2 mod_hello

Re: [fpc-pascal] CIL as a target machine for FP binaries

2009-10-07 Thread Jonas Maebe
On 07 Oct 2009, at 08:50, Gilles MARCOU wrote: But, I have read on the web site posted by Jonas, that the GCC sees the CIL as a target platform of the compiler. If the GCC can do it, isn't it possible to do it also for FPC? Of course. It's simply that someone has to do it (just like for L

Re: [fpc-pascal] Case in Record

2009-10-07 Thread Vincent Snijders
Jürgen Hestermann schreef: Therefore, there is absolutly no difference between TFigure = record X : TShapeList; case TShapeList of Rectangle: (Height, Width: Real); Triangle: (Side1, Side2, Angle: Real); Circle: (Radius: Real);

Re: [fpc-pascal] freepascal and apache

2009-10-07 Thread Alexey Voytsehovich
Hello Michael, Wednesday, October 7, 2009, 10:13:08 AM, you wrote: > On the command-line, define one of FPCAPACHE_2_0 or FPCAPACHE_2_2 (as in > -dFPCAPACHE_2_0) > (or delete the units in units/httpd-1.3) build string fpc -dFPCAPACHE_2_2 mod_hello.pp all unit code -- library mod_hello; {$ifdef

Re: [fpc-pascal] freepascal and apache

2009-10-07 Thread Michael Van Canneyt
On Wed, 7 Oct 2009, Alexey Voytsehovich wrote: hi. this code -- uses SysUtils, httpd; function read_Post(r: Prequest_rec; data: string): boolean; var types: string; begin Result := True; if (r^.method_number <> M_POST) then Exit; ap_set_content_type(r, 'text/html'); types := ap_tabl

[fpc-pascal] freepascal and apache

2009-10-07 Thread Alexey Voytsehovich
hi. this code -- uses SysUtils, httpd; function read_Post(r: Prequest_rec; data: string): boolean; var types: string; begin Result := True; if (r^.method_number <> M_POST) then Exit; ap_set_content_type(r, 'text/html'); types := ap_table_get(r^.headers_in, 'Content-Type'); end; --