[stunnel-users] stunnel 4.36 compilation problems with Sun Studio compiler

Ross Richardson Ross.Richardson at utas.edu.au
Wed May 4 07:12:55 CEST 2011


There are several minor problems using the Sun Studion 12 compiler
(on Solaris 10 SPARC)...

- in str.c, use of STR causes errors because /usr/include/sys/stropts.h
  contains:
	#define      STR             ('S'<<8)
  The this just requires replacing "STR" with something safer, such
  as "XSTR".

- things fail horribly because SIZEOF_UNSIGNED_CHAR and friends get
  defined to 0.  AFAICT, this happens because configure erroneously
  decides that cc suports -pendantic (which it appears to, but
  which causes linking to fail with the symbol "mcount" undefined).
  The following patch works around this:

Index: configure
--- configure.orig	2011-05-03 08:14:28.000000000 +1000
+++ configure	2011-05-04 13:51:53.785750000 +1000
@@ -4210,7 +4210,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
 /* end confdefs.h.  */
 int main() {return 0;}
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 else

- the compiler also gives warnings for the '\r' characters in version.h


Hope this helps,
	rlr
-- 
Ross L Richardson               <URL:mailto:Ross.Richardson at utas.edu.au>
Senior Systems Administrator                  Phone : +61 (0)3 6226 6233
Information Technology Resources                Fax : +61 (0)3 6226 7171
University of Tasmania, AUSTRALIA



More information about the stunnel-users mailing list