Re: Trouble in compiling Wine 0.9.57 and 0.9.58 on Solaris 10 08/07

2008-04-18 Thread Petr Sumbera
Alexandre Julliard wrote:
 Petr Sumbera [EMAIL PROTECTED] writes:
 
 Well, we have only one isinf call in Wine so I think it isn't worst of
 creating Wine special isinf implementation. Instead I propose emulate
 isinf via finite() and isnand() (both coming from ieeefp.h).
 
 You should still put that in libwine_port, it keeps the #ifdef ugliness
 out of the code.
 

What about defining isinf as macro?

diff --git a/include/wine/port.h b/include/wine/port.h
index 6727891..59c12aa 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -146,6 +146,11 @@ struct statvfs
  #define strtoull _strtoui64
  #endif

+#if !defined(HAVE_ISINF)  defined(HAVE_IEEEFP_H)
+#include ieeefp.h
+#define isinf(x) (!(finite(x) || isnand(x)))
+#endif
+
  #ifndef S_ISLNK
  # define S_ISLNK(mod) (0)
  #endif


---

BTW, I would maybe question also existence of float_32_to_16() in header 
  file too.

Petr




RE: Trouble in compiling Wine 0.9.57 and 0.9.58 on Solaris 10 08/07

2008-04-18 Thread Rolf Kalbermatter
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] wrote:

 What about defining isinf as macro?
 
 diff --git a/include/wine/port.h b/include/wine/port.h index 
 6727891..59c12aa 100644
 --- a/include/wine/port.h
 +++ b/include/wine/port.h
 @@ -146,6 +146,11 @@ struct statvfs
   #define strtoull _strtoui64
   #endif
 
 +#if !defined(HAVE_ISINF)  defined(HAVE_IEEEFP_H) #include ieeefp.h 
 +#define isinf(x) (!(finite(x) || isnand(x))) #endif
 +
   #ifndef S_ISLNK
   # define S_ISLNK(mod) (0)
   #endif

With the exception of the somewhat weird line wrapping (or better lack
thereof)
this looks like what I had in mind. I don't see the benefit of adding
something
simple like this into libwine_port.

But of course it's Alexandre's call.

Rolf Kalbermatter





Re: Trouble in compiling Wine 0.9.57 and 0.9.58 on Solaris 10 08/07

2008-04-17 Thread Alexandre Julliard
Petr Sumbera [EMAIL PROTECTED] writes:

 Well, we have only one isinf call in Wine so I think it isn't worst of
 creating Wine special isinf implementation. Instead I propose emulate
 isinf via finite() and isnand() (both coming from ieeefp.h).

You should still put that in libwine_port, it keeps the #ifdef ugliness
out of the code.

-- 
Alexandre Julliard
[EMAIL PROTECTED]




Re: Trouble in compiling Wine 0.9.57 and 0.9.58 on Solaris 10 08/07

2008-04-16 Thread Petr Sumbera

Stefan Dösinger wrote:

Am Sonntag, 13. April 2008 22:28:16 schrieb Rolf Kalbermatter:

Following link might give some details about Sun Solaris support of
infinintes
and also ideas how to solve that problem.
Yes, that would work. Any build system guru who could implement that? I think 
it is not a good idea to put that into wined3d


Well, we have only one isinf call in Wine so I think it isn't worst of 
creating Wine special isinf implementation. Instead I propose emulate 
isinf via finite() and isnand() (both coming from ieeefp.h).


Petr
diff --git a/configure b/configure
index 01fdf19..23d8891 100755
--- a/configure
+++ b/configure
@@ -16977,6 +16977,154 @@ fi
 done
 
 
+
+for ac_func in isinf
+do
+as_ac_var=`echo ac_cv_func_$ac_func | $as_tr_sh`
+{ echo $as_me:$LINENO: checking for $ac_func 5
+echo $ECHO_N checking for $ac_func... $ECHO_C 6; }
+if { as_var=$as_ac_var; eval test \\${$as_var+set}\ = set; }; then
+  echo $ECHO_N (cached) $ECHO_C 6
+else
+  cat conftest.$ac_ext _ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h conftest.$ac_ext
+cat conftest.$ac_ext _ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case limits.h declares $ac_func.
+   For example, HP-UX 11i limits.h declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+which can conflict with char $ac_func (); below.
+Prefer limits.h to assert.h if __STDC__ is defined, since
+limits.h exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include limits.h
+#else
+# include assert.h
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern C
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+to always fail with ENOSYS.  Some functions are actually named
+something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try=$ac_link
+case (($ac_try in
+  *\* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval echo \\$as_me:$LINENO: $ac_try_echo\) 5
+  (eval $ac_link) 2conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 conftest.err
+  rm -f conftest.er1
+  cat conftest.err 5
+  echo $as_me:$LINENO: \$? = $ac_status 5
+  (exit $ac_status); }  {
+	 test -z $ac_c_werror_flag ||
+	 test ! -s conftest.err
+   }  test -s conftest$ac_exeext 
+   $as_test_x conftest$ac_exeext; then
+  eval $as_ac_var=yes
+else
+  echo $as_me: failed program was: 5
+sed 's/^/| /' conftest.$ac_ext 5
+
+	eval $as_ac_var=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+  conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+	   { echo $as_me:$LINENO: result: $ac_res 5
+echo ${ECHO_T}$ac_res 6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat confdefs.h _ACEOF
+#define `echo HAVE_$ac_func | $as_tr_cpp` 1
+_ACEOF
+
+else
+  { echo $as_me:$LINENO: checking for isinf with math.h 5
+echo $ECHO_N checking for isinf with math.h... $ECHO_C 6; }
+cat conftest.$ac_ext _ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h conftest.$ac_ext
+cat conftest.$ac_ext _ACEOF
+/* end confdefs.h.  */
+#include math.h
+int
+main ()
+{
+float f = 0.0; isinf(f)
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try=$ac_link
+case (($ac_try in
+  *\* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval echo \\$as_me:$LINENO: $ac_try_echo\) 5
+  (eval $ac_link) 2conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 conftest.err
+  rm -f conftest.er1
+  cat conftest.err 5
+  echo $as_me:$LINENO: \$? = $ac_status 5
+  (exit $ac_status); }  {
+	 test -z $ac_c_werror_flag ||
+	 test ! -s conftest.err
+   }  test -s conftest$ac_exeext 
+   $as_test_x conftest$ac_exeext; then
+  { echo $as_me:$LINENO: result: yes 5
+echo ${ECHO_T}yes 6; }
+
+cat confdefs.h \_ACEOF
+#define HAVE_ISINF 1
+_ACEOF
+
+else
+  echo $as_me: failed program was: 5
+sed 's/^/| /' conftest.$ac_ext 5
+
+	{ echo $as_me:$LINENO: result: no 5
+echo ${ECHO_T}no 6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+  conftest$ac_exeext conftest.$ac_ext
+fi
+done
+
+
 if test $ac_cv_func_dlopen = no
 then
 { echo $as_me:$LINENO: checking for dlopen in -ldl 5
diff --git a/configure.ac b/configure.ac
index b5c4bf2..2d932d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1406,6 +1406,12 @@ AC_CHECK_FUNCS(\
 	waitpid \
 )
 
+dnl Check for isinf
+AC_CHECK_FUNCS(isinf, ,
+  [AC_MSG_CHECKING(for isinf with math.h)
+

RE: Trouble in compiling Wine 0.9.57 and 0.9.58 on Solaris 10 08/07

2008-04-13 Thread Rolf Kalbermatter
Petr Sumbera [mailto:[EMAIL PROTECTED] 

  isinf is a function / macro which returns wether or not a 
 float is positive  infinite or negative infinite. I think it 
 is a standard C function. Maybe  solaris declares it in some 
 header that needs to be included, like math.h?
 
 I have logged for this bug: 
 http://bugs.winehq.org/show_bug.cgi?id=12008
 
 Not sure where to find it exactly. But isinf seems to be 
 defined by ISO
 99 (not by standard C).

Following link might give some details about Sun Solaris support of
infinintes
and also ideas how to solve that problem.

http://www.google.nl/codesearch?q=isinfie=UTF-8oe=utf-8rls=org.mozilla:en
-US:officialclient=firefox-aum=1sa=Xoi=codesearch_groupresnum=4ct=titl
e

Rolf Kalbermatter





Re: Trouble in compiling Wine 0.9.57 and 0.9.58 on Solaris 10 08/07

2008-04-13 Thread Stefan Dösinger
Am Sonntag, 13. April 2008 22:28:16 schrieb Rolf Kalbermatter:
 Following link might give some details about Sun Solaris support of
 infinintes
 and also ideas how to solve that problem.
Yes, that would work. Any build system guru who could implement that? I think 
it is not a good idea to put that into wined3d




Re: Trouble in compiling Wine 0.9.57 and 0.9.58 on Solaris 10 08/07

2008-04-11 Thread Petr Sumbera
 isinf is a function / macro which returns wether or not a float is 
positive
 infinite or negative infinite. I think it is a standard C function. Maybe
 solaris declares it in some header that needs to be included, like math.h?

I have logged for this bug: http://bugs.winehq.org/show_bug.cgi?id=12008

Not sure where to find it exactly. But isinf seems to be defined by ISO 
99 (not by standard C).

Regards,

Petr




Re: Trouble in compiling Wine 0.9.57 and 0.9.58 on Solaris 10 08/07

2008-03-26 Thread Stefan Dösinger
Am Mittwoch, 26. März 2008 10:57:56 schrieb Новиков Роман Константинович:
 After 40 minutes of the compilation the process halted with messages:
 wined3d_private.h: In function `float_32_to_16':
 wined3d_private.h:159: warning: implicit declaration of function `isinf'
 wined3d_main.c: At top level:
 wined3d_main.c:271: warning: visibility attribute not supported in this
 configuration; ignored
 (the last string repeated for many times)
 I suppose the situation is connected with Solaris 'isinf' but I am too
 far from programming under UNIX...
isinf is a function / macro which returns wether or not a float is positive 
infinite or negative infinite. I think it is a standard C function. Maybe 
solaris declares it in some header that needs to be included, like math.h?