[fpc-pascal] Compiler option '-l' (write FPC logo)
Hi, What does the compiler option -l "Write a FPC logo" actually do? What logo? How does the logo look like? Where do I see that logo? Does it work on all platforms? For example, I use Linux. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Compiler option '-l' (write FPC logo)
2009/5/22 Graeme Geldenhuys : > Hi, > > What does the compiler option -l "Write a FPC logo" actually do? What > logo? How does the logo look like? Where do I see that logo? Does it > work on all platforms? For example, I use Linux. -l writes something like this: Free Pascal Compiler version 2.2.5 [2009/05/01] for i386 Copyright (c) 1993-2008 by Florian Klaempfl -l seems to be the default in my fpc.cfg henry p.s. hmm, the copyright date probably needs to be updated ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] test
just test, ignore it ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Compiler option '-l' (write FPC logo)
2009/5/22 Henry Vermaak : > > -l writes something like this: > > Free Pascal Compiler version 2.2.5 [2009/05/01] for i386 > Copyright (c) 1993-2008 by Florian Klaempfl Ah, so it's not actually a logo (resource) compiled into the executable. Thanks Henry. > p.s. hmm, the copyright date probably needs to be updated I noticed the same thing earlier today. :-) Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] How to add new function related to MAC OS X
Hello fpc-pas...@lists.freepascal.org! 1. I want to add new function for Mac OS X which calls FCNTL with F_FULLSYNC to the existing source tree, but I am really confused from the files to be changed/added. I see that there are many include files which declare functions for Mac OS X, but they come from *BSD directories. I know, that it is because of compatibility with *BSD, but the interface comes from BSD dir and implementation from FreeBSD dir. How is it with directory tree among plaftforms? 2. I want to use SysCall unit which is located in /rtl/unix, but it cannot find it. When I use Unix unit I have not problem. But they are in the same directory?! Thanks in advance for any reply. -- Best regards, TRoland http://www.rotursoft.sk http://exekutor.rotursoft.sk ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to add new function related to MAC OS X
In our previous episode, Roland Turcan said: > I want to add new function for Mac OS X which calls FCNTL with > F_FULLSYNC to the existing source tree, but I am really confused from > the files to be changed/added. I see that there are many include files which > declare functions for Mac OS X, but they come from *BSD directories. I > know, that it is because of compatibility with *BSD, but the interface > comes from BSD dir and implementation from FreeBSD dir. The BSD dir contains the common part of the *BSD rtls + OS X. The Unix dir contains all stuff common to all unices. The inc and objpas dirs contain files common to all platforms. Directories with an OS name (Darwin,FreeBSD) are for that specific target. OS X stuff is in Darwin. Maybe some of the confusion comes from the fact that Darwin is a strictly libc port, while FreeBSD and Linux are dual ports (syscalls or libc, with syscall as default) > I want to use SysCall unit which is located in /rtl/unix, but it > cannot find it. When I use Unix unit I have not problem. But they are > in the same directory?! It does not exist for OS X. The Mac OS X maintainer only supports the libc interface, the headers of which are mostly the "c" and "cdecl" inc files in unix/. As far as I know the OS X syscall interface is nearly the same as FreeBSD's for the base set. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to add new function related to MAC OS X
On 22 May 2009, at 13:45, Marco van de Voort wrote: The Mac OS X maintainer only supports the libc interface, It is Apple that only supports the libc interface (and yes, you probably expected this reaction). There is no syscall interface for direct use by applications on Mac OS X (well, no more than there is a kernel API on Linux for use by closed source kernel modules anyway: nothing suported, and guaranteed by their developers to break every now and then). As far as I know the OS X syscall interface is nearly the same as FreeBSD's for the base set. And it slightly changes from time to time. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Strange issue with threads
While I was testing an unrelated issue, I discovered this: under windows, with fpc 2.2.4, I try to start 1 thread (I know it's absurd but it's just a test) and have all of them linger around for 10 seconds. The thread actually started are 121. The problem is that no exception is raised, so how can I be sure that a thread is really started in a more normal scenario? Is there a hard limit on the number of threads under windows? If so, why no exception when I try to create more? If I run the same program under Linux, an "EThread: failed to create new thread" exception is raised after around 300 threads. This is the test program ---8<---8<-8<-- program project1; {$mode objfpc}{$H+} uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} Classes, Sysutils, SyncObjs { you can add units after this }; var Started:integer; AccessStarted:TCriticalSection; type { TMyThread } TMyThread = class(TThread) procedure Execute;override; end; procedure TMyThread.Execute; begin AccessStarted.Acquire; Started:=Started+1; AccessStarted.Release; Sleep(1); end; var i:integer; {$IFDEF WINDOWS}{$R project1.rc}{$ENDIF} begin AccessStarted:=TCriticalSection.Create; Started:=0; for i:=1 to 1 do begin TMyThread.Create(false); writeln(i); end; while true do begin AccessStarted.Acquire; writeln('Threads started:',started); AccessStarted.Release; Sleep(1000); end; end. ---8<---8<-8<-- If I remove the sleep(1) (the writeln(i) should also be removed), the number of threads started is a random number, normally less than the 1 expected, hence my deduction that there's a hard limit on the number of threads (i.e. less threads hanging around so more can be actually started). Bye -- Luca ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal