Subject: Re: Modifications of standard headers for PECOFF
To: None <email@example.com>
From: Christos Zoulas <firstname.lastname@example.org>
Date: 05/16/2002 13:15:38
In article <20020516061929.5DA943C110@gabi-n.hauN.org>,
TAMURA Kent <email@example.com> wrote:
I don't have a problem with that. But is that limited to libc?
Perhaps a better name than LIBC_EXTERN would be __export?
>I'd like to modify some standard headers as follows to support
>PECOFF format, on which the PEACE project  bases.
>- Add /usr/include/sys/cdefs_pe.h
>- Add LIBC_EXTERN definitions to cdefs_elf.h, cdefs_aout.h and cdefs_pe.h like:
> cdefs_elf.h cdefs_aout.h:
> #define LIBC_EXTERN extern
> #ifdef LIBC
> #define LIBC_EXTERN __declspec(dllexport) extern
> #define LIBC_EXTERN __declspec(dllimport) extern
>- Modify cdefs.h so that it includes cdefs_pe.h if __PECOFF__ is defined.
>- For global variables defined in libc and exposed to the outside of libc,
> add LIBC_EXTERN to their declaration. For example,
> extern FILE __sF;
> LIBC_EXTERN FILE __sF;
>The modifications are required because of the special treatment
>for global variables exported/imported over DLLs. In the PEACE
>project, we provide PECOFF versions of some standard libraries
>such as libc.dll. If the standard headers in /usr/include
>supports PECOFF, we don't have to copy the headers and patch
>TAMURA Kent <kent2002@hauN.org> <firstname.lastname@example.org>