|
From: Jim S. <ja...@ne...> - 2005-12-25 18:58:17
|
Adriano dos Santos Fernandes wrote:
>
> As a library, FB need to work with applications written in any language.
> So the use of the official OS API (GetEnvironmentVariable) is the way
> to go.
>
Here is a synopsis of the problem:
1. Geoff Worboys wishes to override the name of the message file at
runtime.
2. Overriding the name of the message file is a supported Firebird
features
3. The message file name is overridden by the environmental variable
FIREBIRD_MSG
4. Environmental variables can be set at runtime on all platforms
with the "putenv" call.
5. A variable set by "putenv" is an executable is accessable by
"getenv" in a library.
6. Geoff has decided that "putenv" is a C runtime call, he is using
Delphi, and refuses to call it.
There is a simple solution. We declare, retroactively, that "putenv" is
an official part of the Firebird API. It has always been available on
all platforms going back to the earliest version of Windows supported by
Firebird. If Geoff wants a solution, he can use "putenv". Since it is
now part of the official API, whoever maintains the Delphi wrapper for
Firebird has one more function to wrap, and Geoff doesn't have to worry
about tarnishing his Delphi soul by calling a C function.
This works,solves Geoff's problem, is backward compatible, is forwards
compatible with Vulcan and FB3, doesn't require code, and won't impact
the Firebird 2 schedule that is already coming up on a year late.
|