Dynamic modules and standard naming practice

From: "Thomas Hallgren" <thhal(at)mailblocks(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Dynamic modules and standard naming practice
Date: 2004-01-22 12:55:53
Message-ID: buoh8e$m68$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Unix, the general rule for a shared library is to prepend "lib" and
append ".so". On Windows, nothing is prepended and you add ".dll". Thus for
a module named "pljava" you'd get:

libpljava.so on Unix and:
pljava.dll on Windows.

This is in fact so common that the Java Native Interface (JNI) uses it as
the default way of finding things. When loading a library from Java, you
would say System.loadLibrary("pljava") and it would autmatically resolve to
libpljava.so and pljava.dll on the respective systems.

PostgreSQL, while substituting the postfix correctly, never seems to prepend
"lib" on a Unix system. Consequently, I have to use "libpljava" to reference
the module in SQL while I use "pljava" for the same module in Java. It would
be very nice if PostgreSQL could make an attempt to first prepend the "lib"
and if that doesn't work, try without the prefix on a Unix system.

Regards,

Thomas Hallgren

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2004-01-22 13:34:35 Re: Singnals code (not just win32 specific)
Previous Message Simon Riggs 2004-01-22 11:03:45 Re: cache control?