Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jul 1996 18:01:41 +0200
From:      toni@devsoft.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   misc/1372: RPC include cannot be compiled with cc -ansi
Message-ID:  <199607061601.SAA02091@devsoft.devsoft.com>
Resent-Message-ID: <199607061600.JAA21051@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         1372
>Category:       misc
>Synopsis:       compile time error with cc -ansi and RPC headers
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul  6 09:00:01 PDT 1996
>Last-Modified:
>Originator:     Anton Hartl
>Organization:
/dev Software GmbH
>Release:        FreeBSD 2.1-STABLE i386
>Environment:
	
	/usr/include/rpc/auth.h

>Description:

	If <rpc/rpc.h> is included in a source it cannot be compiled
	with cc -ansi anymore. The following error messages are generated

In file included from /usr/include/rpc/rpc.h:50,
		 from procs.c:5:
/usr/include/rpc/auth.h:77: parse error before `u_int32'
/usr/include/rpc/auth.h:77: warning: no semicolon at end of struct or union
/usr/include/rpc/auth.h:77: warning: no semicolon at end of struct or union
/usr/include/rpc/auth.h:78: warning: data definition has no type or storage class
/usr/include/rpc/auth.h:79: warning: data definition has no type or storage class
/usr/include/rpc/auth.h:81: parse error before `}'
/usr/include/rpc/auth.h:103: field `ah_key' has incomplete type


>How-To-Repeat:

	Create a C source file xx.c that has a line

	    #include <rpc/rpc.h>

	Run
	    cc -ansi xx.c

>Fix:
	
	There is a line <rpc/auth.h>

	    #if (mc68000 || sparc || vax || i386 || tahoe || hp300)
	    typedef u_long u_int32; /* 32-bit unsigned integers */
	    #endif

	This should probably be changed to

	    #if (mc68000 || sparc || vax || __i386__ || tahoe || hp300)    
	    typedef u_long u_int32; /* 32-bit unsigned integers */
	    #endif


>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607061601.SAA02091>