From owner-freebsd-hackers Wed Feb 2 19:30:51 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from kweetal.tue.nl (kweetal.tue.nl [131.155.2.7]) by builder.freebsd.org (Postfix) with ESMTP id 4E9814267 for ; Wed, 2 Feb 2000 19:30:47 -0800 (PST) Received: from hermes.tue.nl [131.155.2.46] by kweetal.tue.nl (8.9.3) for id EAA24946 (ESMTP); Thu, 3 Feb 2000 04:30:31 +0100 (MET) Received: from deathstar (n189.dial.tue.nl [131.155.209.188]) by hermes.tue.nl (Postfix) with ESMTP id 099E62E803 for ; Thu, 3 Feb 2000 04:30:30 +0100 (CET) From: "Marco van de Voort" To: freebsd-hackers@freebsd.org Date: Thu, 3 Feb 2000 04:27:52 +0100 Subject: porting linux app. Syscalls In-reply-to: <200002030019.QAA94322@bubba.whistle.com> X-mailer: Pegasus Mail for Win32 (v3.12b) Message-Id: <20000203033030.099E62E803@hermes.tue.nl> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm new to the list (and to BSD development in general), and I'm developper of the FreePascal project (www.freepascal.org) which is a bootstrapping compiler, completely written in Pascal. Currently I started preparations for a port of the linux version to FreeBSD. FreePascal (FPC) doesn't default link to libc for some reasons, and therefore directly calls syscalls, about 60 of them. I started translating the syscalls this week (peeking at the linux "emulator" code), and now I arrived at the "getdents" and readdir calls. (I want to create a native port, the emulator already runs fine) These are supported by the emulator, but actually are emulated (they don't simply change parameters and do a FBSD syscall) However when I looked into sys/syscall.h, I found out that the getdents call seems to exist? So I have a few questions:-) 1. Is there documentation for the syscalls other than the code? I know there are some manpages, but these seem to be outdated (e.g. the named getdents call) 2. Can I use the getdents call to emulate the linux getdents? I use the base functionality, not all details have to be fully the same, just the principle. And why does the emulator not use this call? 3. If I can't use the call, the emulator code seems to call VOP_ functions. Can I access these functions from the application? --- not related to the other 3 4. In the rare event that I get it finished this week; The ports howto doesn't seems to apply to bootstrapping stuff. (It assumes the apps are gcc based or created by a gcc compiled app (like perl). Where does such an app fit into the BSD project? - several megs of Pascal source (entire project + sideprojects + texdocs is 25 MB source) - gmake makefiles. - binary required to start the compile(either native FBSD or linux) . (compiling the bsd version with the linux compiler is also possible I think, if a linux binary can create an ordinary FBSD binary) Marco van de Voort (MarcoV@Stack.nl) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message