Subject: Re: Modifications of standard headers for PECOFF
To: TAMURA Kent <kent@netbsd.org>
From: Bang Jun-Young <junyoung@mogua.com>
List: tech-userlevel
Date: 05/24/2002 14:31:57
On Thu, May 16, 2002 at 03:19:29PM +0900, TAMURA Kent wrote:
> - 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
> cdefs_pe.h:
> #ifdef LIBC
> #define LIBC_EXTERN __declspec(dllexport) extern
> #else
> #define LIBC_EXTERN __declspec(dllimport) extern
> #endif
> - 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,
> stdio.h:
> extern FILE __sF[];
> ->
> LIBC_EXTERN FILE __sF[];
These changes don't even look reasonable to me. Why don't you use
--enable-auto-export and --enable-auto-import features of recent
binutils (the former is default now, AFAIK)?
Jun-Young
--
Bang Jun-Young <junyoung@mogua.com>