From owner-freebsd-hackers Sun Jul 23 11:46:30 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id LAA09040 for hackers-outgoing; Sun, 23 Jul 1995 11:46:30 -0700 Received: from wdl1.wdl.loral.com (wdl1.wdl.loral.com [137.249.32.1]) by freefall.cdrom.com (8.6.11/8.6.6) with SMTP id LAA09034 for ; Sun, 23 Jul 1995 11:46:28 -0700 Received: from miles.sso.loral.com (miles.wdl.loral.com) by wdl1.wdl.loral.com (5.x/WDL-2.4-1.0) id AA16639; Sun, 23 Jul 1995 11:45:56 -0700 Received: by miles.sso.loral.com (4.1/SSO-SUN-2.04) id AA06980; Sun, 23 Jul 95 14:46:15 EDT Date: Sun, 23 Jul 1995 14:46:14 -0400 (EDT) From: Richard Toren X-Sender: rpt@miles To: hackers@freebsd.org Subject: xdr getpos() compile failure Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: hackers-owner@freebsd.org Precedence: bulk I added the two functions that treat the float as a long. This worked between FreeBSD and SunOS 4.1.4. (no surprise). Then I tried the: s = xdr_getpos( &xdrs ); function, which failed to compile. The first time was under CC, then under cc. Both times the error was too many args to function. In the xdr.h is a 'getpos' macro that expands to a function call within the XDR structure. u_int (*x_getpostn)();/* returns bytes off from beginning */ Unfortunately, the function definition is defined to take no parameters! This is probably a left over K&R definition. Trying to downshift to K&R, I tried the -traditional switch, but that caused other errors. My solution is to modify /usr/include/rpt/xdr.h. But that only lasts until I install 2.0.5 . Maybe fixed in 2.1? ==================================================== Rip Toren | The bad news is that C++ is not an object-oriented | rpt@miles.sso.loral.com | programming language. .... The good news is that | | C++ supports object-oriented programming. | | C++ Programming & Fundamental Concepts | | by Anderson & Heinze | ====================================================