Re: [fpc-devel] Portability Standards
Michael Van Canneyt wrote: POSIX says nothing about pascal, it's basically a C interface. To me POSIX means primarily the very different file handling, with regards to devices, path separators, owner/group/world access rights etc. This is what bites not only me when porting GNU software to Windows. The FPC baseunix/unix units mimic more or less the POSIX standard As already mentioned, I couldn't find these units :-( No. TStream. An archive stream does not have a handle. It was so in my first approach. But you are right, an archive or decompressor stream should use an input stream, as provided by the calling application. That's why I choose the well defined C names for now, like size_t, off_t. 1. They are not well-defined, but this is another story :-) Hmm, I refer to the GNU libc documentation, so I thought that some types and procedures are well specified there. 2. I absolutely HATE underscores in types/variables/whatever for documentation purposes it is a horror (I use TeX) I also don't like underscores, but for porting IMO it's a *must* to retain these names. How else should somebody know which Pascal names to use for these types? Apropos optimization, in many FPC units I found constructs like: if x = 0 then f(0) else f(x) In these cases the IF is superfluous. You can send a list of such things to any core member. Okay. DWORD often is used for exactly 32 bits, so that Cardinal is not an appropriate replacement. Cardinal = 32 bits _always_. Also on 64 bit. As I understand the Delphi documentation, Integer and Cardinal have an unspecified size. In a 16 bit environment they have 16 bits, in 32 bit environment 32 bits. Of course one could say that even on a 64 bit machine the most frequently used numbers will have 32 bits as well... Perhaps we should discuss the (new and old) data types explicitly, for a precise description of the intended use, naming, and general properties (signedness, fixed or minimum bit size...). The old are not subject to discussion. It would make life easier, with regards to 64 bit machines, 64 bit file sizes etc. I definitely see no problems when the file-size types (off_t) would be retyped from LongInt into e.g. TFileSize in the TStream class(es). This is one of the rare cases where one can learn from Windows and C ;-) DoDi ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Portability Standards
Tomas Hajny wrote: I only don't know how to implement or check the other branches - is the Windows version of FPC equipped for crosscompilation? The compiler itself can compile for all platforms listed in help pages The problem is that the installed FPC doesn't show any help - no files installed. There's something wrong with that FPC version :-( I only could install an older verion, but AFAIR that one cannot cross compile at all. The new version is out of reach to me, unless I get it on a CD. Alternatively, you can compile with -s parameter, which gives you the generated assembler code for your source files and scripts necessary to assemblelink somewhere That would be sufficient, I mainly need an syntax check. Best in Lazarus, so that I can browse through the related source files... DoDi ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] FPC 1.9.6 (a.k.a. 2.0.0-RC1) is out
Peter Vreman wrote: If no major bugs are found, version 2.0 will be released in a short timeframe. Only one major problem so far. Congratulations! :-) So let me list the problems I encountered with a preceding version: - Mouse buttons inoperative (W2K, no menu selection...) - \\ contained in all stored pathes, IMO due to input of the FPC directory ending with an \. Please only report bugs on the latest version. The above bugs still apply :-( Here the bugs with W2K: - The mouse buttons don't work. The clicked character is highlighted, but that's all. Applies to installer and IDE. - The colors in the install dialog make the (inactive) text almost unreadable. - When text is entered for the path, the previous text is entirely erased. - This is why I entered the path with a trailing backslash, whereupon the fpc.cfg contained \/ in all pathes. When the installer suggests to use backslashes, and then adds further parts with forward slashes, then it should check for both. The display of the path to enter, for using fpc, shows all forward slashes, i.e. // instead of the stored \/. Now for Win98, same machine: - In the dialog directory already exists the buttons are empty, no graphics, no text. (a common problem?) - Same problem with pathes in fpc.cfg. + The mouse works, so far. + The colors make the text better readable. + The path text is not erased, can be edited. Let me know when the installer is updated, then I will check this again. Somebody else should check with WinXP! Some more instructions were nice for the Win32/separate distribution. The readme.txt refers to the full archive, no hints about the separated files. It should be noted that the download of install.exe and (what?) more is required. The units-* are almost self descriptive, but what about the other archives? Some tool (Netscape?) changed the dots in the filenames into underscores, so that nothing but the docs were installed in my first try. I also got an empty install.dat, due to unreported connection problems with the ftp server. If I hadn't compared the file sizes, I had no idea what has gone wrong. These problems IMO also are worth a note in the readme. Windows users are a bit stupid, you know? ;-) I still have to download the IDE, until now everything seems to work :-) Is make and asld required as well? DoDi ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel