>Number:         188247
>Category:       kern
>Synopsis:       [PATCH] include/rpcsvc/yp_prot.h: remove typedef of bool.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 04 01:20:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Yasuhiro KIMURA
>Release:        FreeBSD 10.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD eastasia.home.utahime.org 10.0-RELEASE FreeBSD 10.0-RELEASE #0 
r260673: Thu Jan 23 22:36:39 JST 2014 
r...@eastasia.home.utahime.org:/usr0/freebsd/src/obj/usr0/freebsd/src/releng_10_0/src/sys/EASTASIA
 amd64


        
>Description:
        
        There have been typedef of bool in rpcsvc/yp_prot.h since it
        is added to source tree in August 1994. But there is also
        definition of bool in stdbool.h, and they conflict when both
        headers are used. An acutual example of conflict is building
        Zsh on NIS client of 10.x or later. It is already repoted as
        following PR.

        ports/183253: [PATCH] shells/zsh: fail to build on 10.0-BETA1
        http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/183253

        While stdbool.h and bool definition in it are requirement of
        C99 standard, it seems bool typedef in ryp_prot.h is not
        necessarily required. So removing the latter is a solution.

        There are some reasons that removing bool typedef from
        yp_prot.h doesn't seems to cause problem.

        * Building and installing FreeBSD seems to work fine without
          it. I applied attached patch to 8.4-RELEASE, 9.2-RELEASE and
          10.0-RELEASE source tree and tried regular rebuilding steps
          described in /usr/src/Makefile. All rebuild succeeded
          without error, and all of reinstalled systems seems to work
          fine.
        * NetBSD have already removed it in October 2007, and since
          then they have been done well.

>How-To-Repeat:
        
>Fix:

        

--- patch-src_include_rpcsvc_yp_prot.h begins here ---
Index: include/rpcsvc/yp_prot.h
===================================================================
--- include/rpcsvc/yp_prot.h    (revision 260673)
+++ include/rpcsvc/yp_prot.h    (working copy)
@@ -67,11 +67,6 @@
  * YPPROC_MAPLIST      takes (char *), returns (struct ypmaplist *).
  */
 
-#ifndef BOOL_DEFINED
-typedef u_int bool;
-#define BOOL_DEFINED
-#endif
-
 /* Program and version symbols, magic numbers */
 
 #define YPPROG         ((u_long)100004)
--- patch-src_include_rpcsvc_yp_prot.h ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to