public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Brian Gladman <brg@gladman.plus.com>
To: "gsl-discuss@sourceware.org" <gsl-discuss@sourceware.org>
Subject: Small Changes Needed for Windows Build with Visual Studio
Date: Thu, 29 Aug 2013 18:34:00 -0000	[thread overview]
Message-ID: <521F9439.6090103@gladman.plus.com> (raw)

Dear Rhys, Patrick and colleagues,

As you may know, I provide build files that allow GSL to be built with
the Microsoft and the Intel compilers on Windows.   To do this requires
only a small number of changes to the GSL source code as follows:

In ieee-utils/env.c:

void
gsl_ieee_env_setup (void)
{
  const char * p = getenv("GSL_IEEE_MODE") ;

  int precision = 0, rounding = 0, exception_mask = 0 ;

  int comma = 0 ;

#if defined( _MSC_VER )    /* BRG */

    extern const char *fp_env_string;
    p = fp_env_string;

#else

  if (p == 0)  /* GSL_IEEE_MODE environment variable is not set */
    return ;

  if (*p == '\0') /* GSL_IEEE_MODE environment variable is empty */
    return ;

#endif
  ...

and early in matrix/test.c and vector/test.c:

#if defined( _MSC_VER ) && defined( GSL_DLL )    /* BRG */
#undef inline
#define inline __forceinline
#endif

With these changes it is possible to build GSL on Windows using the
Microsoft and Intel compilers with no
further source code changes (I do also add one file to read the floating
point control word). 

Although I recognise that GSL on WIndows is not a priority, there is
nevertheless a substantial user community on this platform, some of whom
do make ongoing contributions to GSL. 

Whilst writing I would like to thank Rhys for helping me get bzr on
windows working.  The effort has paid off since it is now working very well.
 
   with my regards,

        Brian Gladman

             reply	other threads:[~2013-08-29 18:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 18:34 Brian Gladman [this message]
2013-08-29 18:38 ` Brian Gladman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=521F9439.6090103@gladman.plus.com \
    --to=brg@gladman.plus.com \
    --cc=gsl-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).