|
From: <rr...@sc...> - 2000-09-01 18:53:18
|
Greetings Blockheads [:>
I've recently compiled Blocks V0.16 for UnixWare 7.
I don't believe any of the fairly trivial mods will
affect compilation on any other platform.
I found i needed to modify the Makefiles and libsock/sock.h.
I made the following modifications (diff -c output):
All Makefiles (add -lnsl -lsocket to LIB):
*** Makefile.00 Wed Aug 9 10:16:56 2000
--- Makefile Fri Sep 1 11:44:54 2000
***************
*** 27,35 ****
FLAGS=-fpic
AR=ar
! # fix standard libs for Solaris
ARCH:=$(shell arch)
ifeq ($(ARCH),sun4)
LIB:=$(LIB) -lnsl -lsocket
endif
--- 27,39 ----
FLAGS=-fpic
AR=ar
! # fix standard libs for Solaris and UnixWare
ARCH:=$(shell arch)
ifeq ($(ARCH),sun4)
+ LIB:=$(LIB) -lnsl -lsocket
+ endif
+ SYST:=$(shell uname -s)
+ ifeq ($(SYST),UnixWare)
LIB:=$(LIB) -lnsl -lsocket
endif
libsock/sock.h (define socklen_t to be size_t):
*** sock.h.00 Thu Aug 3 10:08:22 2000
--- sock.h Thu Aug 31 15:39:34 2000
***************
*** 44,49 ****
--- 44,53 ----
#include <errno.h>
#endif
+ #if defined(__USLC__)
+ #define socklen_t size_t
+ #endif
+
long NET_initiate();
long NET_terminate();
long NET_service_to_port(const char *service);
I also needed to modify fltk-1.0.9/fluid/factory.cxx slightly
(pull in strings.h to get strcasecmp defined and redefine index
so it doesn't clash with what fltk does):
*** factory.cxx.00 Mon Jun 5 14:20:42 2000
--- factory.cxx Thu Aug 31 15:21:59 2000
***************
*** 35,40 ****
--- 35,44 ----
#include <FL/Fl_Group.H>
#include <FL/Fl_Menu_Item.H>
#include <string.h>
+ #if defined(__USLC__)
+ #include <strings.h>
+ #define index foo
+ #endif
#include <stdio.h>
#if defined(WIN32) || defined(__EMX__)
|