Hi John,

Below we have a question regarding AC_F77_NAME_MANGLING, which, I
think, you wrote.

        Akim



Topics:
    AC_F77_NAME_MANGLING question
   Re: AC_F77_NAME_MANGLING question
   Re: AC_F77_NAME_MANGLING question


----------------------------------------------------------------------

Date: Fri, 30 Jun 2000 18:25:28 +0200 (CEST)
From: Martin Wilck <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject:  AC_F77_NAME_MANGLING question
Message-ID: <[EMAIL PROTECTED]>
Content-Type: TEXT/PLAIN; charset=US-ASCII


Looking at the following code in AC_F77_NAME_MANGLING:

  AC_TRY_LINK_FUNC(foobar,
    f77_case=lower
    f77_underscore=no
    ac_foo_bar=foo_bar_,

         [ other alternatives  ... ]

  )

  AC_TRY_LINK_FUNC(${ac_foo_bar}, f77_underscore=double)

I have the following question: To my understanding, if linking 
"foobar" succeeds, $f77_underscore=no, and $ac_foo_bar=foo_bar_.
Now, if linking foo_bar_ succeeds as well in the second AC_LINK_FUNC
statement, f77_underscore will be overwritten with "double".

Thus, if a compiler normally adds no underscore, but adds one underscore
to symbol names containing one already, f77_underscore will have the 
wrong value "double" and AC_F77_WRAPPERS will produce incorrect code.

Please correct me if I'm wrong!

- - 
Martin Wilck <[EMAIL PROTECTED]>
Institute for Tropospheric Research, Permoserstr. 15, D-04318 Leipzig, Germany
Tel. +49-341-2352151 / Fax +49-341-2352361



------------------------------

Date: 03 Jul 2000 10:41:10 +0200
From: Akim Demaille <[EMAIL PROTECTED]>
To: Martin Wilck <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: Re: AC_F77_NAME_MANGLING question
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii


|   AC_TRY_LINK_FUNC(${ac_foo_bar}, f77_underscore=double)
| 
| I have the following question: To my understanding, if linking 
| "foobar" succeeds, $f77_underscore=no, and $ac_foo_bar=foo_bar_.
| Now, if linking foo_bar_ succeeds as well in the second AC_LINK_FUNC
| statement, f77_underscore will be overwritten with "double".
| 
| Thus, if a compiler normally adds no underscore, but adds one underscore
| to symbol names containing one already, f77_underscore will have the 
| wrong value "double" and AC_F77_WRAPPERS will produce incorrect code.
| 
| Please correct me if I'm wrong!

I think you are right.  Maybe the author meant

   AC_TRY_LINK_FUNC($ac_foo_bar, [], [f77_underscore=double])

Patches are welcome :)


------------------------------

Date: Mon, 3 Jul 2000 11:22:23 +0200 (CEST)
From: Martin Wilck <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: AC_F77_NAME_MANGLING question
Message-ID: <[EMAIL PROTECTED]>
Content-Type: TEXT/PLAIN; charset=US-ASCII

Akim Demaille wrote:

> I think you are right.  Maybe the author meant
> 
>    AC_TRY_LINK_FUNC($ac_foo_bar, [], [f77_underscore=double])

> Patches are welcome :)

I don't like to mess with this macro until I understand the original
author's intention. So far the macro didn't produce errors on any system
I've tried it on, so it may be ok for practical purposes. 

Is the orignal author present on this list?

Regards, Martin

- - 
Martin Wilck <[EMAIL PROTECTED]>
Institute for Tropospheric Research, Permoserstr. 15, D-04318 Leipzig, Germany
Tel. +49-341-2352151 / Fax +49-341-2352361




------------------------------

End of forwardojHvuh Digest
***************************


Reply via email to