
Frank, Juergen,
Additional patch for win/makefile in the attempt to build with msdev cl compiler/linker.
Please note:
1. This makefile relies on ../winmissing subdir with strtof.c file in it.
2. The patch for lib/smi.h.in by Andrew Hood ajhood@fl.net.au also needed.
Thank you,

Yigal Hochberg wrote:
Frank, Juergen,
Additional patch for win/makefile in the attempt to build with msdev cl compiler/linker.
Please note:
- This makefile relies on ../winmissing subdir with strtof.c file in it.
strtof must exist in more recent MSVC versions than the one Yigal is using. It has not caused me any issues with Visual Studio 8.
So the build process needs to selectively compile strtof.c
- The patch for lib/smi.h.in by Andrew Hood also needed.
Thank you,

On Tue, Mar 04, 2008 at 05:12:42PM +1100, Andrew Hood wrote:
strtof must exist in more recent MSVC versions than the one Yigal is using. It has not caused me any issues with Visual Studio 8.
I really like to avoid adding strtof() and similar functions. Is that possible - Yigal, can you switch to a compiler version that solves this issue or deal with it locally? Is there anybody else who is lacking strtof()?
/js

#define strtof(f) ((float)strtod((double)f))
On Tue, Mar 4, 2008 at 1:56 PM, Juergen Schoenwaelder j.schoenwaelder@jacobs-university.de wrote:
On Tue, Mar 04, 2008 at 05:12:42PM +1100, Andrew Hood wrote:
strtof must exist in more recent MSVC versions than the one Yigal is using. It has not caused me any issues with Visual Studio 8.
I really like to avoid adding strtof() and similar functions. Is that possible - Yigal, can you switch to a compiler version that solves this issue or deal with it locally? Is there anybody else who is lacking strtof()?
/js
-- Juergen Schoenwaelder Jacobs University Bremen gGmbH Phone: +49 421 200 3587 Campus Ring 1, 28759 Bremen, Germany Fax: +49 421 200 3103 http://www.jacobs-university.de/
-- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to libsmi-request@ibr.cs.tu-bs.de !! or look at https://mail.ibr.cs.tu-bs.de/mailman/listinfo/libsmi.

On Tue, Mar 04, 2008 at 02:56:09PM +0100, Luis EG Ontanon wrote:
#define strtof(f) ((float)strtod((double)f))
The question is under which conditions to do this hack since some Windows compilers seem to have strtof()...
/js

Juergen,
Thanks for the reply. Upgrading the Microsoft C compiler is a pain. Both in money and technical issues (they take the freedom to not being compatible with earlier releases).
I am not even sure that it will solve the problem of strtof(). If it does, we sort of impose this upgrade on others. Something I would like to avoid. Welcome to MS windoz world.
strtof() seems to be the remaining problem. I will verify it this week and get back to you. Dealing with it locally is fine. I can add some instructions in the win/makefile and the read-me file.
Regards,
Yigal
---- Juergen Schoenwaelder j.schoenwaelder@jacobs-university.de wrote:
On Tue, Mar 04, 2008 at 05:12:42PM +1100, Andrew Hood wrote:
strtof must exist in more recent MSVC versions than the one Yigal is using. It has not caused me any issues with Visual Studio 8.
I really like to avoid adding strtof() and similar functions. Is that possible - Yigal, can you switch to a compiler version that solves this issue or deal with it locally? Is there anybody else who is lacking strtof()?
/js
-- Juergen Schoenwaelder Jacobs University Bremen gGmbH Phone: +49 421 200 3587 Campus Ring 1, 28759 Bremen, Germany Fax: +49 421 200 3103 http://www.jacobs-university.de/ -- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to libsmi-request@ibr.cs.tu-bs.de !! or look at https://mail.ibr.cs.tu-bs.de/mailman/listinfo/libsmi.

Juergen
The compile-time _MS_VER (or something like this), holds the cl release number. I think that it can be used for this.
#if _MS_VER < ms-cl-release#
I don't know which number to use. Anyone?
Thanks,
Yigal ---- Juergen Schoenwaelder j.schoenwaelder@jacobs-university.de wrote:
On Tue, Mar 04, 2008 at 02:56:09PM +0100, Luis EG Ontanon wrote:
#define strtof(f) ((float)strtod((double)f))
The question is under which conditions to do this hack since some Windows compilers seem to have strtof()...
/js
-- Juergen Schoenwaelder Jacobs University Bremen gGmbH Phone: +49 421 200 3587 Campus Ring 1, 28759 Bremen, Germany Fax: +49 421 200 3103 http://www.jacobs-university.de/ -- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to libsmi-request@ibr.cs.tu-bs.de !! or look at https://mail.ibr.cs.tu-bs.de/mailman/listinfo/libsmi.

Yigal Hochberg wrote:
Juergen
The compile-time _MS_VER (or something like this), holds the cl release number. I think that it can be used for this.
#if _MS_VER < ms-cl-release#
I don't know which number to use. Anyone?
My compiler says:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86
and the magic number is 1400.
In another mail you said:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
So I suspect your magic number would be 1200
Hence the appropriate wrapper to go in lib\parser-sming.y (the only place it appears to be used) would be:
#ifdef _MS_VER #if _MS_VER <= 1200 #define strtof(f1,f2) ((float)strtod(f1,f2)) #endif #endif
FYI, it would appear to be C99, quoting from the strtof man page:
CONFORMING TO ANSI C describes strtod, C99 describes the other two func- tions.
participants (4)
-
Andrew Hood
-
Juergen Schoenwaelder
-
Luis EG Ontanon
-
Yigal Hochberg