[fpc-pascal] Test
Test, please ignore . regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Calculating CRC16?
Hi, On 2022-10-25 09:30, Bo Berglund via fpc-pascal wrote: < snip > Anyone able to help with FPC implementation? Take a look here, https://forum.lazarus.freepascal.org/index.php?topic=54791.0 regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPConnect Timeout
Hi, On 2022-06-08 21:07, James Richters via fpc-pascal wrote: I'm not quite following how I could implement that. Here is what I am trying to do: Uses Serial,Sysutils,Sockets,CRT; var Socket_Address: TSockAddr; opt: LongWord; Connect_Result : Integer; TCP_Connect_Socket : Tsocket; begin Modbus.Device[Device_Number].TCP_Socket := fpsocket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if Modbus.Device[Device_Number].TCP_Socket = TSocket(INVALID_SOCKET) then Writeln('Error Creating Socket: ',SocketError); Socket_Address.sin_family := AF_INET; Socket_Address.sin_addr := StrToNetAddr(Modbus.Device[Device_Number].Connection); Socket_Address.sin_port := htons(Modbus.Device[Device_Number].TCP_Port); Connect_Result := fpconnect(Modbus.Device[Device_Number].TCP_Socket, @Socket_Address, sizeof(Socket_Address)); if Connect_Result = SOCKET_ERROR then Writeln('Error Connecting Socket: ',SocketError); // I want to get this error in 2 seconds ... Are you saying to use TInetSocket instead of the Sockets unit? Or do I just figure out how to use set ConnectTimeout and then that's the timeout that will be used, and still use everything else the same? < snip > ( did not test the code ) Assuming that Modbus.Device[xx].TCP_Socket is a TSocket you'll need to change it to TInetSocket, i.e. something like this : Modbus.Device[Device_Number].TCP_Socket := TInetSocket.Create(Modbus.Device[Device_Number].Connection, Modbus.Device[Device_Number].TCP_Port); Modbus.Device[Device_Number].TCP_Socket.ConnectTimeout := 1000; try Modbus.Device[Device_Number].TCP_Socket.Connect; except { handle the seConnectTimeOut, seConnectFailed, seHostNotFound etc errors } end; or try Modbus.Device[Device_Number].TCP_Socket := TInetSocket.Create(Modbus.Device[Device_Number].Connection, Modbus.Device[Device_Number].TCP_Port, 1000); except { handle the seConnectTimeOut, seConnectFailed, seHostNotFound etc errors } end; Modbus.Device[Device_Number].TCP_Socket.Disconnect; Modbus.Device[Device_Number].TCP_Socket.Free; You could check the TInetSocket examples at https://gitlab.com/freepascal.org/fpc/source/-/tree/main/packages/fcl-net/examples ... regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPConnect Timeout
Hi, Στις 8/6/2022 7:27 μ.μ., ο/η James Richters via fpc-pascal έγραψε: Is there any way to specify a shorter timeout for FPConnect? AFAIK, socket connect timeout is implemented in ssockets ( in TSocketStream ) not in sockets unit. You can use the TInetSocket's class from ssockets unit ( this is what fphttpclient uses ) overloaded constructor with the aConnectTimeout parameter or if you want you can use the ConnectTimeout property before connect and you're ready to go ... regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] freepascal.org SSL_ERROR_BAD_CERT_DOMAIN
Hi, On 2022-01-05 12:05, Michael Van Canneyt via fpc-pascal wrote: On Wed, 5 Jan 2022, Dimitrios Chr. Ioannidis via fpc-pascal wrote: < snip > AFAIK, let's encrypt support's wildcard certificates from 2018. I don't know if anything is changed. I have made some changes, hopefully all is fixed... now it works, thank you Michael . FYI, https://www.hardenize.com/report/freepascal.org/1641377302#www_certs . PS: Plz if it is possible resolve the https://gitlab.com/freepascal.org/fpc/source/-/issues/39488 also. regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] freepascal.org SSL_ERROR_BAD_CERT_DOMAIN
Hi, On 2022-01-05 11:09, Dmitry Boyarintsev via fpc-pascal wrote: On Wed, Jan 5, 2022 at 2:49 AM Dimitrios Chr. Ioannidis via fpc-pascal wrote: the certificate issued for www.freepascal.org [1] and not for freepascal.org [2] . It seems that the let's encrypt script was run with -d freepascal.org [2] instead of -d *.freepascal.org [2] . I don't know how it works for Open Source world, but for the commercial world wild-card certificates (*.freepascal.org [2]) are more expensive, than a single name certificate (www.freepascal.org [1]) AFAIK, let's encrypt support's wildcard certificates from 2018. I don't know if anything is changed. See, https://letsencrypt.org/2017/07/06/wildcard-certificates-coming-jan-2018.html . regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] freepascal.org SSL_ERROR_BAD_CERT_DOMAIN
Hi, On 2022-01-05 11:15, Mattias Gaertner via fpc-pascal wrote: On Wed, 5 Jan 2022 09:40:49 +0200 "Dimitrios Chr. Ioannidis via fpc-pascal" wrote: Hi, Στις 5/1/2022 2:00 π.μ., ο/η Rainer Stratmann via fpc-pascal έγραψε: > https://freepascal.org/ the certificate issued for www.freepascal.org and not for freepascal.org . It seems that the let's encrypt script was run with -d freepascal.org instead of -d *.freepascal.org . or -d freepascal.org,www.freepascal.org you're right of cource :) regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] freepascal.org SSL_ERROR_BAD_CERT_DOMAIN
Hi, Στις 5/1/2022 2:00 π.μ., ο/η Rainer Stratmann via fpc-pascal έγραψε: https://freepascal.org/ the certificate issued for www.freepascal.org and not for freepascal.org . It seems that the let's encrypt script was run with -d freepascal.org instead of -d *.freepascal.org . See https://www.hardenize.com/report/freepascal.org/1641368056 . regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Pascal Ardiono (avr) library
Hi, Στις 3/4/2021 8:49 μ.μ., ο/η Joost van der Sluis via fpc-pascal έγραψε: Hi all, During some spare free time I've ported parts of the Arduino AVR library to Free Pascal. So now it is possible to use things like 'DigitalWrite' and 'Delay'. More info here: https://lazarussupport.com/introducing-pasduino-the-pascal-avr-arduino-library/ The library itself is at: https://gitlab.freepascal.org/Joost/pasduino < snip > Nice ! BTW, IMHO, porting Arduino wiring code is not the way to go. Their libraries are written with an ease of use philosophy and they try to optimize them with the use of a lot of linker and preprocessor trickery, which are not easy to port. IMHO, if you want to use library or framework I'll recommend to take a look to Michael Ring's Microcontroller Board Framework MBF ( https://github.com/michael-ring/mbf ). I think that has support for AVR. One question off topic, can anyone register and use the gitlab scm server ( gitlab.freepascal.org ) ? Is it open for Free Pascal / Lazarus projects ? regards, -- Dimitrios chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Best practice porting a Windows service application to Linux?
Hi, Στις 22/4/2020 1:02 π.μ., ο Bo Berglund via fpc-pascal έγραψε: < sip > But what about the general service framework? The existing code uses a class inherited from TService, does this exist on FPC for Windows and Linux? So it can be crosscompiled for both platforms? Attached you'll find a skeleton project that I use for windows / linux services ( incuded an fclel.res file for windows event loggging ). For debugging I use the usual technique. An infinity loop in debug mode : Run Lazarus with administrator rights. Start the service which will hang into the loop. Add a breakpoint inside the loop and attach the service process. Evaluate, modify the boolean variable which used in the loop from true to false, and you're inside the service # {$IFDEF DEBUG_BUILD} {$DEFINE DEBUG_BUILD_SERVICE} {$ENDIF} . TFPSVC = class(TCustomDaemon) private {$IFDEF DEBUG_BUILD_SERVICE} FServiceDebug: boolean; {$ENDIF} . function TFPSVC.Start: boolean; begin {$IFDEF DEBUG_BUILD_SERVICE} FServiceDebug := True; While FServiceDebug do <--- add a breakpoint here Sleep(2000); {$ENDIF} .. ##### -- Dimitrios Chr. Ioannidis <> ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] test plz ignore
test plz ignore ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] USB Human Interface Devices
Hi, On 2019-07-26 13:39, James Richters wrote: < snip > Anyone have any suggestions for an FPC only console application method or demo I could use to access this USB HID device? < snip > As I suggested in my previous mail You can use the fpc-usb-hid library from Alfred. I don't see any dependency for Lazarus in the usbcontroller.pas which is, AFAIU, the main unit. If you're not in a hurry, I could try to make a simple console demo this weekend. regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] USB Human Interface Devices
Hi, Στις 26/7/2019 1:04 π.μ., ο James Richters έγραψε: Does Freepascal have support for USB Human Interface devices? I am attempting to interface to an WHB04B-4 https://www.amazon.com/gp/product/B07M5ZY1P2 I have an example of how to do it that was written in Python, so I’m trying to figure out how to get it to work with my FPC console application. Figuring out how to interface with the device at all is what is holding me up, I don’t have any experience with direct interfacing to any USB devices. Any suggestions? you could try Alfred's HID library ( works in windows and linux ) . https://github.com/LongDirtyAnimAlf/FPC-USB-HID. regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Forum down ?
Hi, I just tried to connect to https://forum.lazarus.freepascal.org/ and I got : "Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later. " Is it under maintenance ? regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] ENC28J60 Ethernet Controller AVR/ARM Driver
Hi, I started to write a driver ( https://github.com/dioannidis/fp_ethernet_enc28j60.git ) for this chip ( ENC28J60 Ethernet Controller ) first for the AVR platform, ( heavily inspired from the UIPEthernet library ( https://github.com/UIPEthernet/UIPEthernet.git )) and I want to ask the community, of course, is there anyone that already done it ? My goal is to made the free pascal users able to use a very low cost solution Arduino Nano / UNO development board with a ENC28J60 module for a little IoT ( and not only ) fun, learning e.t.c. ... I managed to configure the chip and the driver receives packets ( broadcast packets configured to allow only ARP ). Now, because I'm not embedded developer I'm thinking that I would need help / advices to take some decisions so here I am. First and more important, in the new FPC version, will the AVR platform review / resolve the following issues : "AVR - incorrect stack error checking" (https://bugs.freepascal.org/view.php?id=35332) "AVR - Assembler routines for 8, 16 & 32 bit unsigned div (code contribution)" ( https://bugs.freepascal.org/view.php?id=32103 ) "AVR - invalid address used when evaluating a variable in gdb" ( https://bugs.freepascal.org/view.php?id=33914 ) "AVR - Incorrect SPI clock rate bit constant names in some microcontroller units" ( https://bugs.freepascal.org/view.php?id=32339 ) and add support for theavrxmega3 subarch, atmega 3208, 3209, 4808, 4809 ( from Christo Crause's repository https://github.com/ccrause/freepascal.git ) ? Except from Laksen's ethernet stack ( https://github.com/Laksen/fp-ethernet.git ) is there other, more lightweight, ethernet stack library written in Object Pascal ? As I'm not a compiler guy, isthe "volatile" intrinsic supported in AVR platform ( I didn't find it in intrinsics unit ) ? In FPC embedded world/platforms, is the Object approach more SRAM hungry ( my tests are inconclusive ) from the procedure / function approach ? What's more embedded "friendly" ? this : interface type TUART = Object private FBaudRate: DWord; function Divider: Integer; public procedure Init(const ABaudRate: DWord = 57600); procedure SendChar(c: char); function ReadChar: char; procedure SendString(s: ShortString); procedure SendStringLn(s: ShortString = ''); end; or this : interface var FBaudRate: DWord; function Divider: Integer; procedure Init(const ABaudRate: DWord = 57600); procedure SendChar(c: char); function ReadChar: char; procedure SendString(s: ShortString); procedure SendStringLn(s: ShortString = ''); And of course anyone who wants to help is welcome . regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] AVR GetMem/AllocMem
Hi, Στις 26/1/2019 12:40 μ.μ., ο Michael Ring έγραψε: Did you include the HeapMgr unit? This unit enables heap memory allocation for arm+pic cpu's, hopefully it also works for avr. Am 26.01.19 um 10:29 schrieb Dimitrios Chr. Ioannidis via fpc-pascal: Hi, AFAIU dynamic allocation memory does not exist for AVR platform ( tried to use AllocMem, GetMem and the mcu restart it's self. ) . Is there any other way to dynamically allocate memory in AVR ? didn't know that ! ( Also I didn't read anything regarding this in the wiki ) A quick test shows that it's working. Thx a lot. If you've time could you post any other hint / insight you'll think it could be handy and is not in the wiki ? regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] AVR GetMem/AllocMem
Hi, AFAIU dynamic allocation memory does not exist for AVR platform ( tried to use AllocMem, GetMem and the mcu restart it's self. ) . Is there any other way to dynamically allocate memory in AVR ? ( I'm writing a driver for the ENC28J60 and I need to allocate memory on demand for the ethernet packet buffer ). regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Building FPC from sources on Linux Mint 19, make clean errors out
Hi, On 2018-11-05 14:30, Bo Berglund wrote: ~/dev/fpc/3.0.4$ make clean make: -iVSPTPSOTO: Command not found /bin/rm -f build-stamp.* /bin/rm -f base.build-stamp.* What does this mean and what can I do to fix it? Does it need to be fixed? This works for me the last 3 years : make clean FPC=\ppc executable you'll use. PS: AFAIK, you need to use the previous version official compiler to build the sources. Meaning for 3.0.4 sources you'll need 3.0.2 and not 3.0.0. At least this is what I do to avoid to use the override directive. regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fphttclient, no way to specify a connect timeout
Hi, Στις 24/2/2018 2:00 μμ, ο Luca Olivetti έγραψε: < snip > OK. I got it. Point taken. I don't think you did No I really did ;). The only reliable way to enforce a connect timeout is to try to connect in non-blocking mode. Something like this ( sorry again in ssockects.pp ) for windows only, very draft code proof of concept which it works ( windows 10 here ) : Procedure TInetSocket.Connect; Var A : THostAddr; addr: TInetSockAddr; Res : Integer; nb: DWord; fds: WinSock2.TFDSet; opt: LongInt = 1; len: LongInt; tv : timeval; rslt: longint; begin A := StrToHostAddr(FHost); if A.s_bytes[1] = 0 then With THostResolver.Create(Nil) do try If Not NameLookup(FHost) then raise ESocketError.Create(seHostNotFound, [FHost]); A:=HostAddress; finally free; end; addr.sin_family := AF_INET; addr.sin_port := ShortHostToNet(FPort); addr.sin_addr.s_addr := HostToNet(a.s_addr); tv.tv_sec := IOTIMEOUT div 1000; tv.tv_usec := 0; WinSock2.FD_ZERO(fds); WinSock2.FD_SET(Handle, fds); nb := 1; rslt := WinSock2.ioctlsocket(HANDLE, WinSock2.FIONBIO, @nb); writeln(IntToStr(rslt)); {$ifdef unix} Res := ESysEINTR; while (Res = ESysEINTR) do {$endif} Res := fpConnect(Handle, @addr, sizeof(addr)); if WinSock2.select(Handle, nil, @fds, nil, @tv) > 0 then begin len := SizeOf(opt); if WinSock2.FD_ISSET(Handle, FDS) then fpgetsockopt(Handle, SOL_SOCKET, SO_ERROR, @OPT, @LEN); Res := Opt; end; nb := 0; WinSock2.ioctlsocket(HANDLE, WinSock2.FIONBIO, @nb); If Not (Res<0) then if not FHandler.Connect then begin Res:=-1; CloseSocket(Handle); end; If (Res<0) then Raise ESocketError.Create(seConnectFailed, [Format('%s:%d',[FHost, FPort])]); end; regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fphttclient, no way to specify a connect timeout
Hi, On 2018-02-24 03:42, Luca Olivetti wrote: El 23/02/18 a les 22:57, Dimitrios Chr. Ioannidis via fpc-pascal ha escrit: Hi Στις 23/2/2018 11:14 μμ, ο Luca Olivetti έγραψε: The TFPCustomHTTPClient calls TInetSocket.Create constructor which it calls the inherited constructor from TSocketStream. Which, since TFPHttpClient assigns a socket handler in G, it won't call connect. So the timeout set above is really done before the connect call. OK. I got it. Point taken. You don't want to try to see if it works. Instead we exchange unnecessary emails. My bad. Apologies for pushing you. regards, PS: I'm sure Michael at least he'll take a look. -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fphttclient, no way to specify a connect timeout
Hi Στις 23/2/2018 11:14 μμ, ο Luca Olivetti έγραψε: yes, it does (in procedure TFPCustomHTTPClient.ConnectToServer) FSocket:=TInetSocket.Create(AHost,APort,G); try if FIOTimeout<>0 then FSocket.IOTimeout:=FIOTimeout; <- FSocket.Connect; except FreeAndNil(FSocket); Raise; end; please follow the call stack. The TFPCustomHTTPClient calls TInetSocket.Create constructor which it calls the inherited constructor from TSocketStream. So just before the FSocket.Connect, the above code assigns the internal TSocketStream's FIOTimeout field ( as the TInetSocket is a descendant ) the value from the TFPCustomHTTPClient's FIOTimeout field. Now the folowing addition in the procedure TInetSocket.Connect uses the parents (TSocketStream) private procedure SetIOTimeout and FIOTimeout field to setup the socket timeout option. ssockets.pp line 979 addr.sin_family := AF_INET; addr.sin_port := ShortHostToNet(FPort); addr.sin_addr.s_addr := HostToNet(a.s_addr); SetIOTimeout(FIOTimeout); < {$ifdef unix} Res:=ESysEINTR; While (Res=ESysEINTR) do {$endif} Res:=fpConnect(Handle, @addr, sizeof(addr)); It works because the option is set after the socket is created and before the socket connect call. Of course this is a hack/workaround because if you need different timeouts for connect and receive then you need in the onconnect event handler to change the TFPCustomHTTPClient's FIOTimeout field again for the receive timeout . AFAIK I'm sure Michael will solved it in a more elegant way than my 30 min code review Just try it and tell me if it works. regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fphttclient, no way to specify a connect timeout
Hi, Στις 23/2/2018 8:24 μμ, ο Luca Olivetti έγραψε: El 23/02/18 a les 18:51, Dimitrios Chr. Ioannidis via fpc-pascal ha escrit: copy the ssockets.pp from \packages\fcl-net\src dir to your project dir and add the following line SetIOTimeout(FIOTimeout); to Procedure TInetSocket.Connect; like this fphttpclient already does that before calling connect and it doesn't work. emm it doesn't do that ... did you tried it ... ;) regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fphttclient, no way to specify a connect timeout
Hi, Στις 23/2/2018 5:17 μμ, ο Michael Van Canneyt έγραψε: On Fri, 23 Feb 2018, Luca Olivetti wrote: Hello, the TFpHttpClient has an IoTimeout property, which in turn sets the IOTimeout of its FSocket (TInetSocket), however there's no way to set a connection timeout. I see that even overriding the SocketHandler wouldn't change that, since it's connect is only called *after* the fpconnect call succeeds. Also, I see no way to interrupt a pending connect from another thread. < snip > This is on my todo list. Unfortunately, the way sockets work, this means putting the socket in non-blocking mode, call connect, and then use select or some other means to wait till the socket is done with the connect, and then put the socket again in blocking mode. try this : copy the ssockets.pp from \packages\fcl-net\src dir to your project dir and add the following line SetIOTimeout(FIOTimeout); to Procedure TInetSocket.Connect; like this Procedure TInetSocket.Connect; Var A : THostAddr; addr: TInetSockAddr; Res : Integer; begin A := StrToHostAddr(FHost); if A.s_bytes[1] = 0 then With THostResolver.Create(Nil) do try If Not NameLookup(FHost) then raise ESocketError.Create(seHostNotFound, [FHost]); A:=HostAddress; finally free; end; addr.sin_family := AF_INET; addr.sin_port := ShortHostToNet(FPort); addr.sin_addr.s_addr := HostToNet(a.s_addr); SetIOTimeout(FIOTimeout); {$ifdef unix} Res:=ESysEINTR; While (Res=ESysEINTR) do {$endif} Res:=fpConnect(Handle, @addr, sizeof(addr)); If Not (Res<0) then if not FHandler.Connect then begin Res:=-1; CloseSocket(Handle); end; If (Res<0) then Raise ESocketError.Create(seConnectFailed, [Format('%s:%d',[FHost, FPort])]); end; It works for me regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] GDBServer
Hi, Στις 2017-06-01 18:14, Sven Barth via fpc-pascal έγραψε: Am 01.06.2017 16:49 schrieb "Dimitrios Chr. Ioannidis via fpc-pascal" : > > Hi, > > I'm trying to "convince" gdbserver ( not gdb ) to attach to a windows service, but I'm always get the "Attach to process failed (error 5): Access is denied. " . > > Did anyone succeed to use gdbserver ( not gdb ) to attach a window service ? Are you running gdbserver as Administrator or as the same user as the service? I tried runas /user:administrator the gdbserver with no luck. I changed the window service to logon from local system account to a local user with administrator rights and tried to execute the gdbserver with runas with the same user with no luck also . Doesn't work in win10 or winxp . I even try to run gdbserver in multi remote-extended mode, same behavior . Tried with the alternatives gdb and gdbserver 7.7.1 from lazarus It's frustrating . regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] GDBServer
Hi, I'm trying to "convince" gdbserver ( not gdb ) to attach to a windows service, but I'm always get the "Attach to process failed (error 5): Access is denied. " . Did anyone succeed to use gdbserver ( not gdb ) to attach a window service ? regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Network compression
Hi, I need to transfer data which are relative big ( 1,2 GB )using low memory ( 512MB, 1GB RAM ) machines. I was thinking something like load partial the file I ie.e a 64K memory block ) compress it send that compressed block via network and at the other end receive that block decompressed it and write it to disk, "repeat until done" . I've searched but I didn't find any example on how to compress / decompress in blocks . Any hints ? regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Threading vs Parallelism ?
Hi, On 29/3/2017 11:15 μμ, Michael Van Canneyt wrote: < snip > Showing nicely that parallelism in a single process implies threads. I would not pay too much attention to what these developers are saying. besides hardware parallelism, how software parallelism ( in the sense of true simultaneous execution ) in a single process without using ( OS dependent ) threads can be achieved ? regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Threading vs Parallelism ?
Hi, On 29/3/2017 9:57 μμ, fredvs wrote: Hello. Some developers treat me as dinosaur because I use threads in place of doing parallelism. Huh, ok, but why parallelism is better and how to do it with fpc ? a nice article I've found long ago when I was researching the same topic "Threading/Concurrency vs. Parallelism" is the following : http://tutorials.jenkov.com/java-concurrency/concurrency-vs-parallelism.html and I tried the multithreadprocslaz package in Lazarus : http://wiki.freepascal.org/Parallel_procedures Happy coding Regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] CoAP Implementation
Hi all, does anyone know if an implementation of RFC 7252 Constrained Application Protocol a.k.a CoAP exists for object pascal ? I searched but didn't find any . regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Indy bug reporting
Hi, can't find what is the proper way to report a bug and possible a patch reg. indy and fpc . Does anyone know ? regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Vehicle Routing Problem with Time Windows
Hi, does anyone knows any object pascal or c ( not c++, java, lisp ... ) library that can solve the Vehicle Routing Problem with Time Windows, open source or not ? Searched but couldn't find any ... regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Access C++ APIs
On 29/6/2016 6:05 μμ, Gabor Boros wrote: Hi All, I want to play a little with a fresh Qt 5.x. Lazarus access Qt through Qt4Pas. I see "Linking with C++ code" in future plans for FPC. Is there another way? For example I can access OO API of Firebird 3 with the provided pas file. Is it a special Firebird thing or a general solution? Sorry for the dumb question I am a pascal guy and not have C/C++ knowledge. https://github.com/FirebirdSQL/firebird/blob/B3_0_Release/src/include/gen/Firebird.pas AFAIK, the Firebird New API is interface based not a C++ API. Look at http://firebirdsql.org/file/documentation/release_notes/Firebird-3.0.0-ReleaseNotes.pdf#page=37&zoom=auto,54,730.289 regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] which "managed" result types require extra work?
On 27/6/2016 3:55 πμ, David Emerson wrote: Okay, making a new thread here, to ask one question: Which types do we need to initialize to null/nil/zero/'' when they are a function result? - dynamic arrays - ansistring - unicodestring - string, with {$H+} (but not string[length]) - records containing any of them - anything else??? I understand COM-style interfaces are also managed types, do they also need a manual initialization to nil if a function result? As a rule of thumb i follow barry kelly answer, and then specific for fpc if / when the need arise, ask here PS: http://stackoverflow.com/questions/861045/which-variables-are-initialized-when-in-delphi/861178#861178 regards, ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] reference-counted function results not initialized to nil
Hi, On 26/6/2016 7:20 μμ, Jürgen Hestermann wrote: And because it is a manged type I could rely on the documentation which says that managed types are initialized (with zero length/nil). "Result" is used in the same way as a (local) variable. What should make me think that it is different? as Barry Kelly pointed out there http://stackoverflow.com/questions/861045/which-variables-are-initialized-when-in-delphi/861178#861178, initialization differs on what mechanism was used to allocate memory . AFAIU, "initialized" <> "zero-filled" . regards, -- Dimitrios Chr. Ioannidis www.nephelae.eu ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Need help with a backtrace from fpc 2.6.4
Hi all, i have an app, that is running at approx. 300 pc's with os's varying from xp to win 10 ( all windows ). All ( almost ) the pc's are controlled by the company I work for and their installation is a simply img transfer to a new hdd ( preconfigured windows images bundle). Now, I have 2 or 3 installations with win xp ( I know that xp is old but the customer wants what the customer wants ) which the app ( a windows service ), doesn't behave correctly. The support people even reinstalled the os, check with other similar xp installations the settings to be identical etc. So I installed the debug build of the app ( FYI it's a windows service ), transfer gdb to the client pc and took a backtrace to see what is wrong. I don't understand why in one pc with win xp same locale, codepage, etc works and in those machines chokes here : [fpc 2.6.4 fixes branch, lazarus 1.6.1 rev: 52282, windows xp sp 3 greek locale ] #0 DOENCODEDATE (YEAR=64001, MONTH=64176, DAY=1) at ../objpas/sysutils/dati.inc:29 result = 127269377 DOENCODEDATE = 127269377 RESULT = 127269377 D = 42538 #1 0x004302eb in SYSTEMTIMETODATETIME (SYSTEMTIME=...) at ../objpas/sysutils/dati.inc:223 result = 42538 SYSTEMTIMETODATETIME = 42538 RESULT = 42538 #2 0x004303b1 in NOW () at ../objpas/sysutils/dati.inc:263 result = 42538 NOW = 42538 RESULT = 42538 SYSTEMTIME = {WYEAR = 2016, WMONTH = 6, WDAYOFWEEK = 5, WDAY = 17, WHOUR = 13, WMINUTE = 54, WSECOND = 44, WMILLISECONDS = 474, YEAR = 2016, MONTH = 6, DAYOFWEEK = 5, DAY = 17, HOUR = 13, MINUTE = 54, SECOND = 44, MILLISECOND = 474} #3 0x0053bf1f in TIDENTITYHEADERINFO__PROCESSHEADERS ( this=) at C:/Users/dimitris/Programming/Projects/R_1.2.4/3rdparty/indy/Pro tocols/IdHTTPHeaderInfo.pas:452 LSECS = 546620041212591096 LVALUE = 0x0 LCRANGE = 0x0 LILENGTH = 0x0 #4 0x0053df19 in TIDREQUESTHEADERINFO__PROCESSHEADERS ( this=) at C:/Users/dimitris/Programming/Projects/R_1.2.4/3rdparty/indy/Pro tocols/IdHTTPHeaderInfo.pas:935 No locals. #5 0x00518785 in TIDCUSTOMHTTPSERVER__DOEXECUTE (ACONTEXT=0x185365c, this=) at C:/Users/dimitris/Programming/Projects/R_1.2.4/3rdparty/indy/Pro tocols/IdCustomHTTPServer.pas:1291 ACONTEXT = 0x185365c result = false LREQUESTINFO = 0x185c434 LRESPONSEINFO = 0x185c7b4 I = 6 S = 0x185cb64 '1' LINPUTLINE = 0x185cb7c 'GET /' LRAWHTTPCOMMAND = 0x185c3bc 'GET / HTTP/1.1' LCMD = 0x0 LCONTENTTYPE = 0x0 LAUTHTYPE = 0x0 LURI = 0x41a708 LCONTINUEPROCESSING = true LCLOSECONNECTION = true LCONN = 0x1853444 ---Type to continue, or q to quit--- LENCODING = { = {}, } DOEXECUTE = false RESULT = false #6 0x0051d5f5 in TIDCONTEXT__RUN (this=) at C:/Users/dimitris/Programming/Projects/R_1.2.4/3rdparty/indy/Cor e/IdContext.pas:185 result = 224 RUN = 224 RESULT = 224 #7 0x00540104 in TIDTASK__DORUN (this=) at C:/Users/dimitris/Programming/Projects/R_1.2.4/3rdparty/indy/Cor e/IdTask.pas:136 result = 68 DORUN = 68 RESULT = 68 #8 0x00537e94 in TIDTHREADWITHTASK__RUN (this=) at C:/Users/dimitris/Programming/Projects/R_1.2.4/3rdparty/indy/Cor e/IdThread.pas:697 No locals. #9 0x005373b2 in TIDTHREAD__EXECUTE (this=) at C:/Users/dimitris/Programming/Projects/R_1.2.4/3rdparty/indy/Cor e/IdThread.pas:428 No locals. #10 0x0041da48 in THREADPROC (THREADOBJPTR=0x1852934) at ../objpas/classes/classes.inc:97 result = 25502716 THREADPROC = 25502716 RESULT = 25502716 FREETHREAD = 248 THREAD = 0x1852934 #11 0x00410222 in THREADMAIN (PARAM=0x795fa01) at ../win/systhrd.inc:228 result = 127269377 THREADMAIN = 127269377 RESULT = 127269377 TI = {F = {function (POINTER) : LONGINT} 0x795ffa8, P = 0x1852934, STKLEN = 4194304} #12 0x7c80b729 in KERNEL32!GetModuleFileNameA () from C:\WINDOWS\system32\kernel32.dll No symbol table info available. #13 0x in ?? () No symbol table info available. (gdb) Any hint ? regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] firebird UDF
Hi, Στις 2016-06-12 22:06, duilio foschi έγραψε: can somebody point me to some source code ready to be compiled for Ubuntu ? you could check this http://forum.lazarus.freepascal.org/index.php/topic,31100.msg198588.html#msg198588 . It's a UDF to store user's apache's basic authentication passwords in a firebirdsql's table . regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC releases for Win64 - 2.6.2 & 2.6.4 versus 3.0.0
Hi Graeme, Στις 2016-04-07 19:07, Graeme Geldenhuys έγραψε: How do I know if a program (executable) is 32-bit or 64-bit under Windows? Using Unix-like OSes, I can simply use the "file" command. What is the equivalent under Windows? you can use file ;) http://gnuwin32.sourceforge.net/packages/file.htm http://superuser.com/questions/103071/quick-way-to-tell-if-an-installed-application-is-64-bit-or-32-bit regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] RTLeventWaitFor Timeout
On 19-05-2015 12:31, Michael Van Canneyt wrote: On Tue, 19 May 2015, Dimitrios Chr. Ioannidis wrote: Hi all, As I read that the TEvent is using obsolete functions I switched to RTLEvent. Now the RTLeventWaitFor has a TimeOut parameter declared as longint but in synobjs the INFINITE is Cardinal. There is no reason to abandon TEvent ? Why did you do that ? As you know, in TEventObject.WaitFor it uses basiceventWaitFor in line Result := TWaitResult(basiceventWaitFor(Timeout, Handle)); and the basiceventWaitFor is marked as 'Obsolete. Don't use' even in 2.6. Should I revert to use TEvent ? Did I missed something ? Regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] RTLeventWaitFor Timeout
Hi all, As I read that the TEvent is using obsolete functions I switched to RTLEvent. Now the RTLeventWaitFor has a TimeOut parameter declared as longint but in synobjs the INFINITE is Cardinal. Is there a definition of INFINITE constant somewhere else defined as Cardinal ? Regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Re Raise Exception
Hi all, I'm having problems with an application on a client with random A/V's. In order to understand what is going on, I wrote a simple web service client for my mantis tracker using wst, which works well and with the use of the information's from the wiki ( http://wiki.freepascal.org/Logging_exceptions ) I managed to send the exception stack trace to my mantis tracker when it happens. The problem is that I need to reraise the exception from inside the Application.OnException after I send it's stack trace back to me. I couldn't find any solution so I'm asking here if anyone have a clue on how can I reraise an exception after I handled it. Is it possible ? PS: If you think that it will be usefull the simple class that I wrote to create a ticket in mantis using mantisconnect I can post it here or I can upload it anywhere. PS2: I'm using fpc 2.6.5 ( from fixes_2_6 ) and 3.0.1 ( from fixes_3.0 ) with Lazarus 1.2.7 ( fixes_1_2 ) and 14RC3 ( fixes_1.4 ), so I can use any solution with any fpc/lazarus combination except trunk. Regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] FPHTTPClient DNS Round Robin
Hi all, i tried unsuccesfully to use the fphttpclient to connect to a site which has two A Records with different ip's AKA DNS Round Robin. Before i diggin to the code, does anyone know if the fphttpclient works more or less like a browser ? Meaning that does it gets all the ip's and try to connect one by one until the end of the list before return error ? regards, -- Dimitrios Chr. Ioannidis smime.p7s Description: Κρυπτογραφημένη υπογραφή S/MIME ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FCGI TRequest URI
Hi, Στις 30/5/2014 1:09 μμ, ο/η Michael Van Canneyt έγραψε: Normally, it should be read from the REQUEST_URI environment variable. AFAIU, the URI property of the TRequest in the HTTPDefs unit, get's it's value from the command value when the fcgi app is started from web server . My problem is that, i'm using my fcgi app as an external cgi server, and in this case the URI property is empty string. Investigating the fcgi protocol i see the REQUEST_URI param and i can confirm that it exists in the FCGIParams list. Do i miss something ? regards, -- Dimitrios Chr. Ioannidis smime.p7s Description: Κρυπτογραφημένη υπογραφή S/MIME ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] (no subject)
Hi, Στις 3/6/2014 1:20 μμ, ο/η Reinier Olislagers έγραψε: On 03/06/2014 12:17, Dimitrios Chr. Ioannidis wrote: FYI, in a wst soap client talking to a .net web service i find out, that for SOAP calls, if the CONTENT-TYPE http header ( i'm using fpc-http-protocol ) doesn't have the 'text/xml' plus the 'charset=UTF-8' like this 'text/xml; charset=UTF-8', the server chocks. So, i changed the const sSOAP_CONTENT_TYPE in base_soap_formatter.pas to sSOAP_CONTENT_TYPE = 'text/xml; charset=UTF-8', and all is working fine. I don't know if this is a bug or not. No idea, but Isn't there a specific wst mailing list/group mentioned on the WST wiki page? Maybe it's a better idea to post there. i already done that. I posted here also because i wanted to share it with users who doesn't keep track that list while using the wst framework. BTW: if the content is indeed UTF8, IIRC, it's not a bug to explicitly specify charset=UTF-8; a similar fix was needed for exporting XML files to Microsoft .Net dataset XML format IIRC. AFAIU, in the SOAP HTTP Binding the character encoding in the Content-Type header is optional. Regards, -- Dimitrios Chr. Ioannidis smime.p7s Description: Κρυπτογραφημένη υπογραφή S/MIME ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] WST SOAP HTTP CONTENT TYPE
Hi, FYI, in a wst soap client talking to a .net web service i find out, that for SOAP calls, if the CONTENT-TYPE http header ( i'm using fpc-http-protocol ) doesn't have the 'text/xml' plus the 'charset=UTF-8' like this 'text/xml; charset=UTF-8', the server chocks. So, i changed the const sSOAP_CONTENT_TYPE in base_soap_formatter.pas to sSOAP_CONTENT_TYPE = 'text/xml; charset=UTF-8', and all is working fine. I don't know if this is a bug or not. -- Dimitrios Chr. Ioannidis smime.p7s Description: Κρυπτογραφημένη υπογραφή S/MIME ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] WST ERangeError RunError(201)
Hi, when i'm trying to switch to debug an app which uses wst i always get a FPC_ANSISTR_RANGECHECK ( ERangeError ). Without debug enabled all is working fine. I'm using fpc 2.6.5 ( fixes branch ) and lazarus 1.2.3 at debian wheezy x86_64, and I made the following change all is working and i can debug my app. Index: server_service_intf.pas === --- server_service_intf.pas(revision 3031) +++ server_service_intf.pas(working copy) @@ -485,7 +485,7 @@ end; //Extract the base ContentType : type "/" subtype *( ";" parameter ) j := Length(s); - for i := 0 to Pred(Length(s)) do begin + for i := 1 to Pred(Length(s)) do begin if ( s[i] = ';' ) then begin j := ( i - 1 ); Break; FYI, this is the backtrace #0 HANDLEERRORADDRFRAME(201, 0x7fffd630, 0x439bd0) at ../inc/system.inc:962 #1 HANDLEERRORFRAME(201, 0x7fffd630) at ../inc/system.inc:992 #2 fpc_ansistr_checkrange(0x77f4a3d0, 0) at ../inc/astrings.inc:559 #3 HANDLEREQUEST(0x77f68240, 0x77fefd88) at ../../3rdparty/wst/server_service_intf.pas:489 #4 HANDLESERVICEREQUEST(0x77fefd88, 0x0) at ../../3rdparty/wst/server_service_intf.pas:259 #5 PROCESSSERVICEREQUEST(0x77f6a2c0, 0x77f9a730, 0x77f6a0c0, 0x77f69e10 'SOAP') at ../../3rdparty/wst/ide/lazarus/wstmodule/wstmodule.pas:230 #6 HANDLEREQUEST(0x77f6a2c0, 0x77f9a730, 0x77f6a0c0) at ../../3rdparty/wst/ide/lazarus/wstmodule/wstmodule.pas:273 #7 HANDLEREQUEST(0x77f820c0, 0x77f9a730, 0x77f6a0c0) at src/base/custweb.pp:374 #8 DOHANDLEREQUEST(0x77f820c0, 0x77f9a730, 0x77f6a0c0) at src/base/custweb.pp:474 #9 RUN(0x77f820c0) at src/base/custweb.pp:263 #10 DORUN(0x77f8a0c0) at src/base/custweb.pp:646 #11 RUN(0x77f8a0c0) at src/custapp.pp:286 #12 main at prjLoyaltyfcgi.lpr:13 regards, -- Dimitrios Chr. Ioannidis smime.p7s Description: Κρυπτογραφημένη υπογραφή S/MIME ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FCGI TRequest URI
Hi, Στις 30/5/2014 12:57 μμ, ο/η Michael Van Canneyt έγραψε: On Fri, 30 May 2014, Dimitrios Chr. Ioannidis wrote: and when i'm trying to get the uri with something like ARequest.URI it's always empty. The BaseURL, Host etc are ok. Any hints ? Nope. Seems like something that needs to be debugged :( your answer implies that the apache configuration is correct so there must be a problem in the cgi params assignement code. I'll take a look cause i want to use your wstmodule for web service toolkit, and you use the ARequest.URI as a parameter to construct the wsdl. regards, -- Dimitrios Chr. Ioannidis smime.p7s Description: Κρυπτογραφημένη υπογραφή S/MIME ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] FCGI TRequest URI
Hi, i'm trying to find out why the TRequest.URI property always return empty string in my setup. I have configured the web server apache like this SetHandler fcgid-script Order allow,deny Allow from all ScriptAlias /test /path/cgi/dir/fpc-fcgi-app.fcgi and when i'm trying to get the uri with something like ARequest.URI it's always empty. The BaseURL, Host etc are ok. Any hints ? I'm using fpc 2.6.5 ( latest fixes branch ) and apache from debian wheezy ( 2.2.2 i think ). regards, -- Dimitrios Chr. Ioannidis smime.p7s Description: Κρυπτογραφημένη υπογραφή S/MIME ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Web Service Toolkit (WST) release 0.6
Hi, Στις 9/5/2014 3:02 πμ, ο/η Inoussa OUEDRAOGO έγραψε: Hello, I am glad to announce the 0.6 release of the Web Service Toolkit. thank you very much for sucha great tool kit. PS: Could you plz create a 0.6 tag in the subversion repo ? regards, -- Dimitrios Chr. Ioannidis smime.p7s Description: Κρυπτογραφημένη υπογραφή S/MIME ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FCGI MultiThreaded
Ηι, Στις 2/5/2014 12:05 μμ, ο/η Michael Van Canneyt έγραψε:. On Fri, 2 May 2014, Dimitrios Chr. Ioannidis wrote: Hi, does anyone know if the TCustomFCgiApplication is multithreaded ? No, it is not. It's on my todo list, but has low priority. I'll try to see if i can help, do you have any hints or tips reg. the source ? regards, -- Dimitrios Chr. Ioannidis smime.p7s Description: Κρυπτογραφημένη υπογραφή S/MIME ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] FCGI MultiThreaded
Hi, does anyone know if the TCustomFCgiApplication is multithreaded ? Regards, -- Dimitrios Chr. Ioannidis smime.p7s Description: Κρυπτογραφημένη υπογραφή S/MIME ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] https support; call for testers
Hi, Στις 11/4/2014 4:00 μμ, ο/η Michael Van Canneyt έγραψε: I've just committed support for SSL in the ssockets unit of FPC. I also made the OpenSSL unit more thread-safe. I would like to invite people to test and report if they find problems or missing features. the "Writeln(pchar(@buffer));" at line 417 in sslsockets i assume is a leftover from debugging ? regards, -- Dimitrios Chr. Ioannidis smime.p7s Description: Κρυπτογραφημένη υπογραφή S/MIME ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] cthreads and cSemaphoreTimedWait
Hi, the TThreadManager class has only the SemaphoreWait procedure and it lacks the SemaphoreTimedWait function. But in the cthreads unit exists a cSemaphoreTimedWait implementation. Is there a problem with that function and didn't included in the TThreadManager class ? I have some existed code to port and it uses semaphores. I would like to avoid change it too much. regards, -- Dimitrios Chr. Ioannidis http://www.nephelae.eu signature.asc Description: This is a digitally signed message part ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] TSQLQuery UniDirectional and SaveToStream
Hi, Στις 6/2/2014 9:10 πμ, ο/η LacaK έγραψε: Dimitrios Chr. Ioannidis wrote / napísal(a): Hi all, i will appreciate a little help / advice / anything for the following problem i'm having. I need to use the xmldatapacketreader to transfer datasets between free pascal and delphi. The problem i'm having is that i can't use UniDirectional and SaveToStream at the same time ( getting DataBaseError(SUniDirectional) ) and for big datasets the memory goes . So, does anyone have any idea how to use xmldatapacketreader ( which implies SaveToStream ) and UniDirectional ? As you can see there is CheckBiDirectional in the begining of SaveToStream ... I am not sure, why is there such check (may be that bookmarks are used and bookmarks are not supported by unidirectional datasets?) by the way, one of the uses of a unidirectional dataset, is the sequential manipulation of big datasets. One of those manipulation is to transform the data while exporting them. So IMHO it will be nice to undone the invalidation of the SaveToStream method for the UniDirectional datasets. May be a feature request ? regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] TSQLQuery UniDirectional and SaveToStream
Hi, Στις 6/2/2014 9:10 πμ, ο/η LacaK έγραψε: Dimitrios Chr. Ioannidis wrote / napísal(a): The problem i'm having is that i can't use UniDirectional and SaveToStream at the same time ( getting DataBaseError(SUniDirectional) ) and for big datasets the memory goes . So, does anyone have any idea how to use xmldatapacketreader ( which implies SaveToStream ) and UniDirectional ? As you can see there is CheckBiDirectional in the begining of SaveToStream ... I am not sure, why is there such check (may be that bookmarks are used and bookmarks are not supported by unidirectional datasets?) AFAIU saving is performed in sequential order from first record to last ... and update buffer is evaluated, but unidirectional dataset can not have update buffer ... so at first look it seems, that saving can be performed also on unidirectional dataset (as it supports First and Next methods) May be that CheckBiDirectional is there only for symmetricity with LoadFromStream ... and LoadFromStream can not be performed on UniDirectional datasets. (because they are not updateable and do not handle cached updates) What you can do is remove check: CheckBiDirectional in the begining of SaveToStream ant try what happens ;-) Thx for the hint. I already tried that with no success. There is a lot more involved reg. the ScrollResult of the UniDirectional instance of the BufDataset. So i just used the TXMLXSDExporter from the DataExport. At least for the simple dataset i want to transfer it's ClientDataSet export format is working fine. thx, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] DefaultFormatSettings usage
Hi, Στις 4/2/2014 3:54 μμ, ο/η silvioprog έγραψε: Hello, I'm using this configuration: initialization DefaultFormatSettings.DateSeparator := '-'; DefaultFormatSettings.TimeSeparator := ':'; DefaultFormatSettings.ShortDateFormat := '-mm-dd'; DefaultFormatSettings.ShortTimeFormat := 'hh:nn:ss'; but, when i try: var t: TDateTime; begin t := StrToDate('2013-02-04 11:39:54'); // to format -mm-dd hh:nn:ss end; result: "2013-02-04 11:39:54" is not a valid date format. Try the overload StrToDate(S, DefaultFormatSettings), or better declare a FFormatSettings: TFormatSettings setup it as you like pass that to the StrToDate leaving the DefaultFormatSettings. Regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] TSQLQuery UniDirectional and SaveToStream
Hi all, i will appreciate a little help / advice / anything for the following problem i'm having. I need to use the xmldatapacketreader to transfer datasets between free pascal and delphi. The problem i'm having is that i can't use UniDirectional and SaveToStream at the same time ( getting DataBaseError(SUniDirectional) ) and for big datasets the memory goes . So, does anyone have any idea how to use xmldatapacketreader ( which implies SaveToStream ) and UniDirectional ? Best Regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] OpenStack Bindings
Hi all, i searched a little and i didn't find anything, so does anyone know if there is openstack bindings for fpc ? regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] UPnP Component
Hi all, at work, i have a project which needs very limited UPnP capabilities. All it needs, is to open a port and do a port forwarding for a limited period of time closing it afterwards. Nowdays almost every Residential Gateway(Router) / ( Customer Premises Equipment ) support that via uPnP. I searched, if a portable ( i need it for windows, linux, ios and android ) component exists for free pascal and i didn't find anything. As i think that the UPnP functionality is very useful for various purposes, i decided to write a full implementation of UPnP for free pascal. But before i start, does anyone know any previous components / libraries that i didn't find so i don't do duplicate work ? regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] For Dimitrios Chr. Ioannidis: no fpc 2.6.1 seg fault loading dblib
Hi, first your pasql worked like a charm. Second, now my app is working again. I didn't find the reason why. The solution was to delete the lazarus lpi and lpr and recreate them. Wasn't fpc fault. This was a first for me. That is a project written in a previous lazarus version to behave like this in a newer version. I frequently recompile ( 1 - 2 times a month ) fpc fixes_2_6 and lazarus fixes_1_0 and didn't had any problem earlier. Anyway, thx for the help. regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] For Dimitrios Chr. Ioannidis: no fpc 2.6.1 seg fault loading dblib
> Responding to > [fpc-devel] fpc 2.6.1 seg fault loading dblib > http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg27157.html > as I think the subject is more appropriate to the fpc list (and I > haven't subscribed to fpc-devel): > >> when my app try to load the dblib dll i get a segmentation fault. >> Previously the app worked like a charm. The only change is the >> recompilation of fpc. > > Works on Vista x64 with FPC with FPC fixes r22595 x86 and my pasql test > program > (commit c250ca8) > https://bitbucket.org/reiniero/fpc_laz_patch_playground/src > directory sql > > x86 dlls downloaded from contrib site; md5s: > 1e2159d07b938524a4a27661b7aead51 *dblib.dll > fd1dc6c680299a2ed1eedcc3eabda601 *libiconv2.dll > Perhaps you can run pasql against your server and see what happens? Ok, I'll do that today and get reply here. Thx, for the response. -- Dimitrios Chr. Ioannidis Nephelae - http://www.nephelae.eu ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] [OT] GPL Lisence help
Hi all, first let me express my apologies for the off topic question. I'm having trouble to choose the correct gpl lisence for a new open source project that i'm starting. I want the project to be open source gpl'ed so it can be accepted in distro's like Debian. But, at the same time, because the structure is modular, i want the possibility, to be used by anyone in commercial applications. Can anyone give a hint and/or a suggestion ? Regards, -- Dimitrios Chr. Ioannidis Nephelae - http://www.nephelae.eu ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] [OFF-TOPIC] Nephelae open source small business software
Hi all, for some reasons i started an open source small business software named Nephelae. I setup the source code repository, mailing lists, trackers etc at http://gna.org/projects/nephelae, and yesterday i purchaced the domain nephelae.eu and installed the GetSimple CMS. Of cource it will be written in free pascal and lazarus, and one of the reasons behind this move is to stress those tools as far as we can. If you want to participate you are more than welcome, send me a personal email. Plz, do not reply to the list. regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Why is Random(255) some 529x slower compared to Delphi7?
Hi, On 8/12/2011 8:50 μμ, Graeme Geldenhuys wrote: On 8 December 2011 18:41, Florian Klaempfl wrote: And? The conclusion is what we concluded years ago: be as delphi compatible as possible else people start to cry soon or later. The funny thing is only that this time the people cry who didn't draw this conclusion yet. I'll be the first to admit, I think most of this "delphi compatibility" is crap. But there is a BIG difference between being compatible, and being totally unusable. Clearly many here have listed that they use Random in a recursion function, and in such a case the HUGE speed penalty makes the current Random() implementation unsuitable and unusable. it's unusable by you. I can live currently with the current implementation or with any implementation you or someone else do. IMHO, "Much adoe about nothing" regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Why is Random(255) some 529x slower compared to Delphi 7?
Hi, On 8/12/2011 9:48 πμ, Graeme Geldenhuys wrote: [like what was told to me numerous times before] They (FPC users) should speak up now, or forever hold your peace. And those that have spoken so far, all seem to be fine with a less statistically strong default Random(), and have the statistically strong one available in the Maths unit. IMO, there is two separate subjects in this discussion. The first obviously is the implementation and the Delphi compatibility of the Random function but for me the hidden and most valuable subject is the fpc's lack of documentation. If the algorithm used to implement the Random function was documented then it wouldn't be any reason for this discussion . The user will be warned, informed and acted accordingly to suit his needs. And plz don't use the UTS ( Use The Source) on me. There is situations that you don't have the time and the state of mind to read and study all the fpc sources. In the end IMO don't change the Random implementation just documented it. regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] CGI JSON RPC
Hi all, i surely need some help regarding the use of cgi with json rpc. I looked at the demo1 example and tested it with testcgi app from the command line. All was fine. Then i tried to run the demo1 cgi app from apache with a php json rpc client. It seems that i can't find the right uri to put into the php call. All calls goes to the default action named 'manual'. I renamed the handler name from echo to myecho to resolve a conflict with the php's function echo. The following code for calling the cgi working fine : http://localhost/cgi-bin/demo.exe'); print $api->myecho("Hello from JSON RPC"); ?> Now, how do i call the dispatcher handler ? I tried to change the uri like this $api = new JsonRpcClient('http://localhost/cgi-bin/demo.exe/dispatch'); $api = new JsonRpcClient('http://localhost/cgi-bin/demo.exe?action=dispatch'); Nothing worked ... Can someone give me a hint ? PS: I attached the JsonRpcClient.php ... regards, -- Dimitrios Chr. Ioannidis uri = $uri; } private function generateId() { $chars = array_merge(range('A', 'Z'), range('a', 'z'), range(0, 9)); $id = ''; for($c = 0; $c < 16; ++$c) $id .= $chars[mt_rand(0, count($chars) - 1)]; return $id; } public function __call($name, $arguments) { $id = $this->generateId(); $request = array( 'jsonrpc' => '2.0', 'method' => $name, 'params' => $arguments, 'id' => $id ); $jsonRequest = json_encode($request); $ctx = stream_context_create(array( 'http' => array( 'method' => 'POST', 'header' => 'Content-Type: application/json\r\n', 'content' => $jsonRequest ) )); $jsonResponse = file_get_contents($this->uri, false, $ctx); if ($jsonResponse === false) throw new JsonRpcFault('file_get_contents failed', -32603); $response = json_decode($jsonResponse); if ($response === null) throw new JsonRpcFault('JSON cannot be decoded', -32603); if ($response->id != $id) throw new JsonRpcFault('Mismatched JSON-RPC IDs', -32603); if (property_exists($response, 'error')) throw new JsonRpcFault($response->error->message, $response->error->code); else if (property_exists($response, 'result')) return $response->result; else throw new JsonRpcFault('Invalid JSON-RPC response', -32603); } } ?>___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FCL Web Combined Demo
Hi, On 21/11/2011 2:32 μμ, Felipe Monteiro de Carvalho wrote: Hello, How did you generate that grid? You wrote your own html+javascript or are you using a ready made javascript library or something else? i just used the js from the example " source>\packages\fcl-web\examples\combined ". It uses the ExtJs 3.x version series not the 4.x . regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FCL Web Combined Demo
On 21/11/2011 2:37 μμ, michael.vancann...@wisa.be wrote: On Mon, 21 Nov 2011, Dimitrios Chr. Ioannidis wrote: On 21/11/2011 1:28 μμ, michael.vancann...@wisa.be wrote: IE has a bug that causes it to report an error if the last element in an array or object is empty. (it is explicitly mentioned in the standard that it is allowed). So you should search for a , in front of } and ] and remove it. Thx. I fixed the script and it worked. Did you need to do additional fixes beyond the ones I did ? For the users.js file no i didn't. The changes for the demo to work was, a modification of the combined.cgi path in users.js and login.js and in the Database the addition of the BU Trigger to protect the demo user. CREATE GENERATOR GEN_USERS; CREATE TABLE USERS ( U_ID Bigint NOT NULL, U_LOGIN Varchar(40) NOT NULL, U_NAME Varchar(30) NOT NULL, U_EMAIL Varchar(100), U_PASSWORD Varchar(100) NOT NULL, CONSTRAINT PK_FPCUSERS PRIMARY KEY (U_ID), CONSTRAINT U_USERNAME UNIQUE (U_LOGIN) ); CREATE EXCEPTION DEMOUSER 'Demo user deletion or update Prohibited !'; / TRIGGERS / SET TERM ^ ; CREATE TRIGGER USERS_BD_BU FOR USERS ACTIVE BEFORE UPDATE OR DELETE POSITION 0 AS BEGIN IF (OLD.U_ID = 1) THEN EXCEPTION DEMOUSER; END^ SET TERM ; ^ SET TERM ^ ; CREATE TRIGGER USERS_BI FOR USERS ACTIVE BEFORE INSERT POSITION 0 AS DECLARE VARIABLE tmp DECIMAL(18,0); BEGIN IF (NEW.U_ID IS NULL) THEN NEW.U_ID = GEN_ID(GEN_USERS, 1); ELSE BEGIN tmp = GEN_ID(GEN_USERS, 0); if (tmp < new.U_ID) then tmp = GEN_ID(GEN_USERS, new.U_ID-tmp); END END^ SET TERM ; ^ GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE ON USERS TO SYSDBA WITH GRANT OPTION; regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FCL Web Combined Demo
Hi again, in one hour that page had 56 hits !!! I'm thinking that there is a need the fcl-web examples to be live. The next days i'll setup as much of the examples as i can. Mean while you can test ( insert/delete/update ) as much as you want. regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FCL Web Combined Demo
On 21/11/2011 1:28 μμ, michael.vancann...@wisa.be wrote: IE has a bug that causes it to report an error if the last element in an array or object is empty. (it is explicitly mentioned in the standard that it is allowed). So you should search for a , in front of } and ] and remove it. Thx. I fixed the script and it worked. regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] FCL Web Combined Demo
Hi all, i wanted to check the combined demo so i set it up to my server at http://demo.artesoft.gr/combined . As i'm newbie to javascript can someone check to see why doesn't work with IE ? With Firefox, Chrome, Safari worked. regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] GDB for 64 bit Windows ?
Hi, i have build a native ppcx64 in windows 7 64 bit. But i can't find a 64 bit version of GDB in http://svn.freepascal.org/svn/fpcbuild/trunk/install/binw64. Is the 32 bit gdb in http://svn.freepascal.org/svn/fpcbuild/trunk/install/binw32 able to debug reliably a 64 bit process ? Or i must use the windows debugging tools ? regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Info for building FPC ...
Hi all, i already downloaded, printed and read marcov's pdf reg. building fpc. I have the need, to build / compile fpc, using only the fpc executable ( ppc386 or ppcx64 ), the sources from subversion and the needed tools/utils. But where can i find the tools/utils needed for windows ? The binutils and make packages from mingw32 site on sourceforge doesn't work.The make, coreutils and shutils from gnuwin32 project also on sourceforge doesn't work either. The url's in the above pdf doesn't exists. Is it possible someone to post where can i find the tools/utils needed for build / compile fpc from sources in windows ? PS: I don't want just to use the tools / utils from the fpc packages. I want to know how to produce / find them. regards, -- Dimitrios Chr. Ioannidis No virus found in this outgoing message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.10.15/1922 - Release Date: 28/1/2009 7:24 ìì ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] OnGuard WinCE
Hi, i can't compile TPOnGuard for WinCE ... Does anyone succeded to use TPOnGuard in WinCE ? regards, -- Dimitrios Chr. Ioannidis No virus found in this outgoing message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.9.18/1850 - Release Date: 15/12/2008 5:04 ìì ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Embarcadero/CodeGear officialy interested in Firebird and on native versions of Delphi for other operating systems ...
Hi all, something i just read at http://www.firebirdnews.org and in Marco Cantu's blog ( http://blog.marcocantu.com/blog/coderage_2008_closing.html ) regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] ibase60.inc
On Sep 4, 2008, at 5:03 PM, Marco van de Voort wrote:In our previous episode, Dimitrios Chr. Ioannidis said: is it possible someone to add support for OS X in ibase60.inc ? Firebird for OS X is working fine for quite some time now.This can be done. Are you sure that gds and fbembed really arelibfbclient.dylib, and not the ones from the $ELSE clause?I added a ticket in the free pascal tracker ( #0012062 ) and uploaded a patch tested in CentOS 5.2 x86_64 and in OS X 10.5.2 with FirebirdCS-2.1.1-17910-RC1 and it's working.BTW, the Firebird Installer for OS X, doesn't make the libfbclient.dylib available in one of the dynamic loader search paths, i added a ticket also in Firebird's tracker ( http://tracker.firebirdsql.org/browse/CORE-2065 ) so until it's fixed, you should add a symlink to one of them i.e. ln -s /Library/Frameworks/Firebird.framework/Libraries/libfbclient.dylib /usr/local/lib/libfbclient.dylibregards,-- Dimitrios Chr. Ioannidis ibase_osx.diff Description: Binary data ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] ibase60.inc
On Sep 4, 2008, at 5:03 PM, Marco van de Voort wrote: In our previous episode, Dimitrios Chr. Ioannidis said: is it possible someone to add support for OS X in ibase60.inc ? Firebird for OS X is working fine for quite some time now. This can be done. Are you sure that gds and fbembed really are libfbclient.dylib, and not the ones from the $ELSE clause? Well, let me do some tests and prepare patch, patch. But you're right, the gdslib and fbembedlib is wrong. Copy/paste error. regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] ibase60.inc
Hi, is it possible someone to add support for OS X in ibase60.inc ? Firebird for OS X is working fine for quite some time now. Something like ( didn't test it ) {$IFDEF Unix} {$DEFINE extdecl:=cdecl} {$IFDEF Darwin} const gdslib = 'libfbclient.dylib'; fbclib = 'libfbclient.dylib'; fbembedlib = 'libfbclient.dylib'; {$ELSE} const gdslib = 'libgds.so'; fbclib = 'libfbclient.so'; fbembedlib = 'libfbembed.so'; {$ENDIF} {$ENDIF} Comments ? Regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal