Subject: FVWM: PATCH: fvwm-2.0.43

From: Larry Schwimmer <[email-masked]>
Date: Fri, 26 Jul 1996 00:19:55 -0700 (PDT)

1) Ultrix still lacks strdup.  This should ensure that it is
   only used on Ultrix.  [libs/Imakefile]

2) I don't like adding any default include and lib path for
   linking (in this case for Audio), but at least only add it if you
   are using that feature. [Imakefile]

3) As with 2.0.42, fvwm does not link properly on Solaris, at least
   under R6.  [Imakefile]

4) strdup implementation to make Ultrix happy. [libs/strdup.c]

			yours,
				Larry Schwimmer
				[email-masked]
				Distributed Computing Operations

--- libs/Imakefile.orig	Fri Feb 16 17:17:27 1996
+++ libs/Imakefile	Fri Jul 26 00:01:34 1996
@@ -4,6 +4,11 @@
 
 #include "../Fvwm.tmpl"
 
+#if defined(UltrixArchitecture)
+PORTSRC = strdup.c
+PORTOBJ = strdup.o
+#endif
+
 SRCS = \
 	CatString3.c \
 	CopyString.c \
@@ -23,7 +28,8 @@
 	safemalloc.c \
 	sleep.c \
 	strncmp.c \
-	wild.c
+	wild.c \
+	$(PORTSRC)
 
 OBJS = \
 	CatString3.o \
@@ -44,7 +50,8 @@
 	safemalloc.o \
 	sleep.o \
 	strncmp.o \
-	wild.o
+	wild.o \
+	$(PORTOBJ)
 
 NormalLibraryTarget($(LIB), $(OBJS))
 
--- Fvwm.tmpl.orig	Thu Jun 27 07:57:21 1996
+++ Fvwm.tmpl	Thu Jul 18 15:22:20 1996
@@ -77,8 +77,10 @@
  * This currently only effects the FvwmAudio module.
  ***************************************************************************/
 #define HasRPlay NO     /* YES */
+#if HasRPlay
 #define AudioLibs -L/usr/local/lib
 #define AudioIncs -I/usr/local/include
+#endif

 /**************************************************************************
@@ -359,7 +361,7 @@
 									@@\
 program: $(OBJS) $(DEPLIBS)						@@\
 	RemoveTargetProgram($@)						@@\
-	$(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) @@\
+	$(CCENVSETUP) $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) @@\
 									@@\
 InstallProgram(program,$(FVWMDIR))					@@\
 InstallManPage(program,$(MANDIR))					@@\
@@ -384,7 +386,7 @@
 									@@\
 program: $(OBJS) $(DEPLIBS)						@@\
 	RemoveTargetProgram($@)						@@\
-	$(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) @@\
+	$(CCENVSETUP) $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) @@\
 									@@\
 InstallProgram(program,$(FVWMBINDIR))					@@\
 InstallManPage(program,$(MANDIR))					@@\
--- /dev/null	Thu Jul 25 23:57:15 1996
+++ libs/strdup.c	Thu Jul 25 12:30:45 1996
@@ -0,0 +1,22 @@
+#include <string.h>
+
+/* strdup
+ *
+ * Make a duplicate of a string.
+ * For systems which lack this function.
+ *
+ * Larry Schwimmer ([email-masked])
+ */
+char *
+strdup (const char *input)
+{
+  register char *cp, *retval = NULL;
+
+  if (input == NULL)
+    return NULL;
+  if ((retval = cp = (char *)malloc((strlen(input)+1)*sizeof(char))) == NULL)
+    return NULL;
+  while ((*cp++ = *input++) != '\0')
+    ;
+  return retval;
+}
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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].