[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: put slist in ltdl namespace
From: |
Ralf Wildenhues |
Subject: |
Re: put slist in ltdl namespace |
Date: |
Sat, 18 Dec 2004 23:05:22 +0100 |
User-agent: |
Mutt/1.5.6+20040907i |
* Bob Friesenhahn wrote on Sat, Dec 18, 2004 at 10:18:13PM CET:
> On Sat, 18 Dec 2004, Ralf Wildenhues wrote:
> >
> >>Any non-public symbol from
> >>libltdl should be lt__ scoped. This should include any replacement
> >>code for glibc functions. Without the scoping, libltdl may conflict
> >>with other libraries which also provide glibc replacement functions.
> >
> >I cannot see any code except for slist which has the problem.
>
> The problem also exists for closedir, opendir, readdir, rewinddir, and
> seekdir. These are not prefixed at all so that under MinGW they will
> interfere with the MSYS POSIX porting library (when it is used), or
> with other programs which include their own portability wrapper
> functions.
I don't see how you come to this conclusion.
branch-1-5 has all replacement functions as statics, so it's ok.
branch-2-0 and HEAD have replacements for
opendir readdir closedir
but not rewinddir and seekdir. But both have this:
,-- libltdl/libltdl/lt__dirent.h:
| #if defined(HAVE_CLOSEDIR) && defined(HAVE_OPENDIR) && defined(HAVE_READDIR)
&& defined(HAVE_DIRENT_H)
| /* We have a fully operational dirent subsystem. */
[...]
| #elif !defined(__WINDOWS__)
| /* We are not on windows, so we can get the same functionality from the
| `direct' API. */
[...]
| #else /* __WINDOWS__ */
| /* Use some wrapper code to emulate dirent on windows.. */
| # define WINDOWS_DIRENT_EMULATION 1
|
| # include <windows.h>
|
| # define D_NAMLEN(dirent) (strlen((dirent)->d_name))
| # define dirent lt__dirent
| # define DIR lt__DIR
| # define opendir lt__opendir
| # define readdir lt__readdir
| # define closedir lt__closedir
|
[...]
| #endif /*!defined(__WINDOWS__)*/
This header is used internally only.
> >Are you talking about "no prefix" vs. "prefix" or "lt_ prefix" vs.
> >"lt__
> >prefix"?
> >
> >My question was merely regarding the latter (and maybe the location of
> >the replacement #defines).
>
> It seems that "lt__" is the preferred prefix for private globals. The
> replacement defines shouldn't appear in libltdl public headers since
> they may interfer with dependent applications.
My proposed slist patch doesn't do that either.
Regards,
Ralf