[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ITS#578: prototype macros




"Kurt D. Zeilenga" wrote:

> Steve,
>
> I think we also need a LIBLBER_FD macro without the extern...
>
> For NT:
> #define LIBLBER_F(type)  extern __declspec(LIBLBER_DECL) type LIBCALL
> #define LIBLBER_F(type)  __declspec(LIBLBER_DECL) type LIBCALL
> #define LIBLBER_V(type)  extern __declspec(LIBLBER_DECL) type
> #define LIBLBER_VD(type) __declspec(LIBLBER_DECL) type
>
> Otherwise:
> #define LIBLBER_F(type)  extern type LIBCALL /* func */
> #define LIBLBER_F(type)  type LIBCALL /* declar func in c file */
> #define LIBLBER_V(type)  extern type /* variable */
> #define LIBLBER_VD(type) type    /* declare var in c file */
>

I agree, that makes the compilation more robust and system independent.
I have not
yet seen a compiler that omplains about an extern on the function
declaration,
but that doesn't mean there won't be one.

Should extern also have a define, i.e. #define LDAP_LIB_E extern     ??

>
> Also, s/LIBCALL/LDAP_LIBCALL/g

LIBCALL = LDAP_LIBCALL - Yes

>
> and we should separately s/LIBL(BER|DAP)_/\1_/g
>

Are you saying you want to change LIBLBER_F to BER_F or LIBLDAP_F to
DAP_F?
What is the motivation?

>
> Comments?
>
>         Kurt

Where do we go from here?

-Steve