From owner-freebsd-ports Sun Mar 17 11:54:37 1996 Return-Path: owner-ports Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id LAA01653 for ports-outgoing; Sun, 17 Mar 1996 11:54:37 -0800 (PST) Received: from iworks.InterWorks.org (deischen@iworks.interworks.org [128.255.18.10]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id LAA01648 for ; Sun, 17 Mar 1996 11:54:33 -0800 (PST) Received: by iworks.InterWorks.org (1.37.109.8/16.2) id AA01814; Sun, 17 Mar 1996 13:51:54 -0600 Message-Id: <9603171951.AA01814@iworks.InterWorks.org> Date: Sun, 17 Mar 1996 13:51:54 -0600 From: "Daniel M. Eischen" To: freebsd-ports@FreeBSD.org Subject: Port questions Sender: owner-ports@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk Hi, I'm attempting a port of xmcd, since it seems it's not a standard port any longer. If there is a reason for not having it as a port or someone else is working on it, please let me know. This is my first attempt at a port, and I have a couple of questions. First, what is the general rule for including libraries libcurses vs. libncurses? What is the preferred method of making the port aware to use -lncurses as opposed to -lcurses? Xmcd currently uses the following in its Imakefile: /* * Add needed libraries */ #if (defined(SunArchitecture) && OSMajorVersion == 4) LOCAL_LIBRARIES=-L/usr/5lib -lcurses #else #if defined(LinuxArchitecture) LOCAL_LIBRARIES=-lncurses #else #if defined(FreeBSDArchitecture) LOCAL_LIBRARIES=-lncurses -lmytinfo #else #if defined(ultrix) || defined(__ultrix) LOCAL_LIBRARIES=-lcursesX #else LOCAL_LIBRARIES=-lcurses #endif /* ultrix */ #endif /* FreeBsdArchitecture */ #endif /* LinuxArchitecture */ #endif /* SunArchitecture */ It looks as if -lncurses should be used, but it's not because FreeBSDArchitecture never ends up getting defined. The Imake.cf in /usr/X11R6/lib/X11/config has: #ifdef __FreeBSD__ #define MacroIncludeFile #define MacroFile FreeBSD.cf #undef __FreeBSD__ #ifdef __i386__ #define FreeBSDArchitecture #define i386BsdArchitecture #define i386Architecture #endif #endif /* __FreeBSD__ */ If I define FreeBSDArchitecture in "#ifdef __FreeBSD__ ..." before the "#ifdef __i386__ ...", everything works and -lncurses and -lmytinfo are correctly brought in. My next question is regarding 4 malloc warnings that I get when I first start xmcd. I get: Malloc warning: free(): junk pointer (too high) Malloc warning: free(): junk pointer (too high) Malloc warning: free(): junk pointer (too high) Malloc warning: free(): junk pointer (too high) which is, I assume, a free being called for an object that may not be (is not?) allocated. I am running XFree86312, with -current built just a few days ago. I've tracked this down to an XFreePixmap() call in xmcd, but can't figure out how it wouldn't work. I've looked at the code and it seems like there should be a valid pixmap created whenever the XFreePixmap is called. My only guess is that it is a problem with XFree86. Until today I was running XFree311 with the same messages. I installed 3.12 and rebuilt - still the same. Anyone else have any problems like this? Will this warning message be a problem for submitting the port? TIA, Dan Eischen deischen@iworks.InterWorks.org