Le 04/04/2016 21:39, Peyton, Jonathan L a écrit :
>
> Hello everyone,
>
>  
>
> I’ve been working on a build using both MSVC and the Intel Windows
> compiler (ICL).  These three patches allow building of hwloc + utils.
>
>  
>
> 1) add-ifndef-guard-around-gnu-source.patch – this minor change only
> adds #ifndef _/GNU/_SOURCE inside the hwloc.m4 tests because it seems
> to be defined on Linux systems beforehand causing a warning in these
> autoconf tests.
>

Hello

I am pushing this one thanks.

> 2) use-ac-check-decl.patch – this change removes the
> _/HWLOC_CHECK_DECL() macro with the autoconf AC_CHECK/_DECLS() macro. 
> The problem I was having concerned how _/HWLOC_CHECK/_DECL() worked. 
> It has an expected failure structure where if say, sched_setaffinity,
> is already defined, then the AC_COMPILE_IFELSE() macro will fail and
> say it **is** declared (the AC_MSG_RESULT([yes]) is in the “if-false”
> part of the check).  This is problematic when using MSVC because it
> will say that sched_setaffinity is declared when it really isn’t.  The
> comment for _/HWLOC_CHECK/_DECL is also outdated so I think this can
> be safely removed.
>

I am not very confident about this one because this is really something
that was needed in the past. Unfortunately the very old commit
075eff1d1dd64292ff421a95f06d0151f1c246b5 doesn't give any detail.
Looking the hwloc-devel archives in early 2009/11, it's likely related
to some PGCC issues.

What problem did you actually see?

>
> 3) windows-compatibility-changes.patch – this change adds necessary
> autoconf checks that I needed to get MSVC/ICL to compile hwloc.  For
> instance, ssize_t wasn’t declared and is defined from SSIZE_T instead,
> S_ISREG isn’t defined in the windows headers so it is defined
> correctly when it doesn’t exist, etc.  This also introduced
> hwloc_strcasecmp() which is modeled after hwloc_strncasecmp().  If
> strcasecmp() isn’t defined, then hwloc_strcasecmp() is used instead. 
> These MSVC/ICL auxiliary defines are put in include/private/misc.h and
> this header was added to some source files that needed it.
>
>  
>

There are some easy pieces that I will commit soon.
There are some harder ones like changing the strtoull() stuff, I need to
spend some time making sure it doesn't break anything.
By the way, hwloc-ps uses dirent for readding /proc, I think we should
just always disable that program on Windows.

Brice

Reply via email to