Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Feb 2000 04:27:52 +0100
From:      "Marco van de Voort" <marcov@stack.nl>
To:        freebsd-hackers@freebsd.org
Subject:   porting linux app. Syscalls
Message-ID:  <20000203033030.099E62E803@hermes.tue.nl>
In-Reply-To: <200002030019.QAA94322@bubba.whistle.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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)
<http://www.stack.nl/~marcov/xtdlib.htm>;


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000203033030.099E62E803>