[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] missing dlfcn.h but defined in tcclib.h, also missing
Re: [Tinycc-devel] missing dlfcn.h but defined in tcclib.h, also missing RTLD_LOCAL
Wed, 15 Jul 2020 15:39:55 +0200 (CEST)
Alpine 2.21 (LSU 202 2017-01-01)
On Tue, 14 Jul 2020, UnknownGamer40464 wrote:
I see. I had assumed it was for unix compatibility but I guess not.
Is it supposed to show up in the win32 tcclib.h file then?
tcclib.h is a small convenience header that exists merely to show how a
minimal installation on unix-like systems could look like, i.e. it's a
replacement for a subset of standard headers. As such it declares a
couple functions and macros that are useful for simple standard C
programs. It might or might not declare more facilities than are actually
available on the system at hand, and noone bothered to add the #ifdef-ery
to make it declare only available things. Similarly it also doesn't
declare all facilities that are available on the system (for that you have
to use the standard headers).
I.e. that it declares also dlfcn facilities is not an issue, though it
might lead to the expectation that those are available on Windows, and
hence confusion. The best way to avoid this is actually to simply not use
that header at all.
It seems to be placed there by the win32 batch script,
but indeed using dlfcn functions cause undefined symbol errors.
Either way, sounds like a minor thing to me now.
Thanks a lot.
On Tue, Jul 14, 2020 at 1:02 AM Christian JULLIEN <firstname.lastname@example.org> wrote:
dlfcn provides declarations for functions dlopen/dlsym/dlclose that
allow to dynamically load a shared lib at runtime on unix systems.
Windows uses a similar but different interface to load DLL (which are
different from .so shared libs).
Hence, you don't need dlfcn.h on Windows.
Systems like mingw/cygnwin add some unix compatibiliy on Windows. This
is not the case with tcc which supports only C standard and most
Windows API on Windows.
Le : 14 juillet 2020 à 05:27 (GMT +02:00)
De : "UnknownGamer40464"
À : "email@example.com" <firstname.lastname@example.org>
Objet : [Tinycc-devel] missing dlfcn.h but defined in
tcclib.h, also missing RTLD_LOCAL
Is there any reason dlfcn.h is missing (at least on
windows) and yet its functions and macros
are defined in tcclib.h, and that tcclib.h references it in a
comment as if it were a file?
I also noticed RTLD_LOCAL was missing but it seems like
it should just be 0x000 since, according to oracle man pages,
local is the default option.
I see this on a windows build of 50abaae, which I'm using, and
in windows mob.
Tinycc-devel mailing list
Tinycc-devel mailing list