Subject: Fix to libs/System.c getostype()

From: Tim Cutts <[email-masked]>
Date: Fri, 18 Jun 1999 14:17:32 +0100 (BST)

Attached is a tiny context diff to libs/System.c for a patch to
getostype(), fixing a bug when compiled with gcc on Solaris (and
possibly other platforms as well) 

Also attached is the Changelog diff.

The patch was made to 2.2.2

Regards,

Tim.

-- 
Tim Cutts                                          Tel: +44 1223 454918
Incyte Genetics (Bioinformatics)
Botanic House, 100 Hills Road, Cambridge, CB2 1FF, UK
*** ChangeLog~	Fri May 28 16:07:14 1999
--- ChangeLog	Fri Jun 18 14:09:54 1999
***************
*** 1,3 ****
--- 1,11 ----
+ 1999-06-18  Tim Cutts  <[email-masked]>
+ 
+ 	* libs/System.c (getostype): Code was assuming that buf had been
+ 	initialised to nulls.  Under Solaris 2.5.1/gcc, this is not the
+ 	case and OSTYPE in FvwmM4 was being set to garbage and SunOS stuck
+ 	on the end.  Set the initial byte of buf to \0 to fix this.  There
+ 	may be other bugs of this type elsewhere.
+ 
  Thu May 27 07:38:11 1999  DanEspen  <dje@blue>
  
  	* fvwm/fvwm2.1 (EdgeThickness): Updated man pages, EdgeThickness
*** System.c.orig	Fri Jun 18 14:04:25 1999
--- System.c	Fri Jun 18 14:09:56 1999
***************
*** 35,40 ****
--- 35,41 ----
      struct utsname sysname;
  
      if ( uname( &sysname ) >= 0 ) {
+         buf[0] = '\0';
  	strncat( buf, sysname.sysname, max );
  	return 0;
      }