From owner-freebsd-bugs Thu Apr 29 6:10: 5 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 9B14315820 for ; Thu, 29 Apr 1999 06:10:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id GAA56958; Thu, 29 Apr 1999 06:10:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from mailgate.spa.is.uec.ac.jp (ns.spa.is.uec.ac.jp [130.153.67.2]) by hub.freebsd.org (Postfix) with ESMTP id 445F71586F for ; Thu, 29 Apr 1999 06:08:11 -0700 (PDT) (envelope-from tate@spa.is.uec.ac.jp) Received: from unzen.spa.is.uec.ac.jp (unzen.spa.is.uec.ac.jp [192.168.166.34]) by mailgate.spa.is.uec.ac.jp (8.8.8+2.7Wbeta7/3.6W+spa-2.0a) with ESMTP id WAA11330 for ; Thu, 29 Apr 1999 22:08:10 +0900 (JST) Received: by unzen.spa.is.uec.ac.jp (8.9.2/3.6W+spa-null-2.0b) id WAA02138; Thu, 29 Apr 1999 22:08:10 +0900 (JST) Message-Id: <199904291308.WAA02138@unzen.spa.is.uec.ac.jp> Date: Thu, 29 Apr 1999 22:08:10 +0900 (JST) From: tate@spa.is.uec.ac.jp Reply-To: tate@spa.is.uec.ac.jp To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/11382: generated code using rpcgen with -b option cannot be compiled Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 11382 >Category: bin >Synopsis: generated code using rpcgen with -b option cannot be compiled >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 29 06:10:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Takamichi Tateoka >Release: FreeBSD 3.1-RELEASE i386 >Organization: University of Electro-Communications, Tokyo, JAPAN >Environment: FreeBSD 3.1-RELEASE i386 and rpcgen which included in the release. However it happen in FreeBSD 2.2.8-RELEASE i386 and seems not fixed yet even in current CVS repository. >Description: Generated server side code using rpcgen with -b (Backward compatible) option can not be compiled. The code includes and , they are not exist on FreeBSD system. This option is not useful in FreeBSD since current rpcgen on FreeBSD is not support TI-RPC features and this option is turned on by default. However, to compile old programs for ONC RPC, we should compile them with -b option (existence of this option will be detected automatically by configure script) for portability. On current FreeBSD, configure script estimates -b options is available and generates a Makefile to use rpcgen with -b option, then the compilation will be failed. >How-To-Repeat: Here is a simple sample rpc source (sample.c): program SAMPLEPROG { version SAMPLEVERS { void sample_proc(void) = 0; } = 1; } = 10000; Compile it using rpcgen with -b option: % rpcgen -b sample.x Then, compile generated server side code: % cc -c sample_svc.c It makes an error: sample_svc.c:12: stropts.h: No such file or directory sample_svc.c:13: netconfig.h: No such file or directory >Fix: It is came from turning tirpcflag on when -b options is specified. As described in man page, current rpcgen on FreeBSD can not handle TI-RPC features and this options should simply be ignored. The patch should be following: *** usr.bin/rpcgen/rpc_main.c.orig Fri Sep 25 20:43:48 1998 --- usr.bin/rpcgen/rpc_main.c Thu Apr 29 21:46:26 1999 *************** *** 1175,1185 **** * generating backward compatible * code */ - #if defined(__FreeBSD__) || defined(__NetBSD__) - tirpcflag = 1; - #else tirpcflag = 0; - #endif break; case 'I': --- 1175,1181 ---- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message