Subject: FVWM: Error compiling 2.0pl37 on DEC-Station 5000

From: Kees de Bruin <[email-masked]>
Date: 31 Oct 1995 11:50:06 +0100

Hello,

the source code of Fvwm 2.0pl37 does not compile on a DEC Station 5000 with
the 3.0 version of the DEC C compiler. The linker complains that it cannot
resolve the function  strdup() which is used in envvar.c in the libs
directory. I don't know if the source of Fvwm should be ANSI compatible,
but if yes, it is not as the strdup() function is not part of ANSI.

If this problem is solved in a more recent version of Fvwm, please ignore
this mail. Otherwise, please give some suggestions (apart from implementing
the function strdup() myself, or using GCC and associates) on how to solve
this.

Kind regards,

Kees.

-- 
| | __   .-. .-.    Kees de Bruin        Tasking Software BV   B  O S T O  N
| |/ /  _| | | |_                                              -------------
|   <  / _ | | _ \  [email-masked]       +31-33-4 55 85 84   S Y S T E M S
|_|\_\ \___| |___/                    fax: +31-33-4 55 00 33   -------------
                                                               O  F F I C  E
He was so narrow minded he could see through a keyhole with    -----###-----
both eyes...                                                   T A S K I N G
--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked]
Date: Tue, 31 Oct 1995 22:27:49 +0900

bruin> The linker complains that it cannot resolve the function
bruin> strdup() which is used in envvar.c in the libs directory.

That's right. Current FVWM (and modules) source assumes the existence
of following function related to string operation:

	strdup(), strncmp(), strstr(), strtol(), putenv()

My using-GNU-configure approach solves this problem, by adding
supplemental source to libs/ directory (which library sources come
from FreeBSD-2.0.5-RELEASE). Well, here is a patch of my poor work. If
you interested, check it and give me back some comments. I made this
patch (attached below) against to vanilla fvwm-2.0.38, then gzipped
and uuencoded.

This patch contains:

	+ files to make 'configure' script.
		configure.in
	+ files to make 'configure.h.in'.
		configure.h.{top,bot}
	+ 'configure' script which is made by autoconf
	+ 'configure.h.in' file which is made by autoheader
	+ additional files for libfvwm
		libs/{strdup,strstr,strtol,putenv}.c
	+ rename libs/strncmp.c to libs/mystrcasecmp.c and
	  additional libs/strncmp.c which supports strncmp()
	+ diffs for files which is already exists.
		fvwm/misc.h, libs/Imakefile,
		libs/{hostname,mygetostype,sleep}.c
		modules/FvwmBacker/FvwmBacker.c
		modules/FvwmConfig/WinBase.cc
		modules/FvwmDebug/FvwmDebug.c
		modules/FvwmWinList/FvwmWinList.c

Once you do a 'patch' to fvwm-2.0.38,

	+ If you ONLY wanna do configure and how it works, first
	  remove following bogus files.
		configure.h.{top,bot} configure.in
	+ do 'chmod +x configure'
	+ execute 'configure', and see what's done.
	  configure script makes 'configure.h' file.
	+ do edit configure.h as usual
	+ do xmkmf or so, as usual

If you cannot run configure script, copy configure.h.in simply to
configure.h, and modify GNU autoconf stuff.

- -
Makoto 'MAR_kun' MATSUSHITA