This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove spurious LINT: directives
[metaconfig.git] / U / threads / d_endgrent_r.U
index de30edd..fb0fd68 100644 (file)
@@ -1,46 +1,80 @@
-?MAKE:d_endgrent_r endgrent_r_proto: Inlibc Protochk i_systypes i_dirent
-?MAKE:  -pick add $@ %<
+?RCS: $Id: d_endgrent_r.U,v 0RCS:
+?RCS: Copyright (c) 2002,2003 Jarkko Hietaniemi
+?RCS:
+?RCS: You may distribute under the terms of either the GNU General Public
+?RCS: License or the Artistic License, as specified in the README file.
+?RCS:
+?RCS: Generated by the reentr.pl from the Perl 5.8 distribution.
+?RCS:
+?MAKE:d_endgrent_r endgrent_r_proto: Inlibc Protochk Hasproto i_systypes usethreads i_grp
+?MAKE: -pick add $@ %<
 ?S:d_endgrent_r:
-?S:     This variable conditionally defines the HAS_ENDGRENT_R symbol,
-?S:     which indicates to the C program that the endgrent_r()
-?S:     routine is available.
+?S:    This variable conditionally defines the HAS_ENDGRENT_R symbol,
+?S:    which indicates to the C program that the endgrent_r()
+?S:    routine is available.
 ?S:.
 ?S:endgrent_r_proto:
-?S:     This variable encodes the prototype of endgrent_r.
+?S:    This variable encodes the prototype of endgrent_r.
+?S:    It is zero if d_endgrent_r is undef, and one of the
+?S:    REENTRANT_PROTO_T_ABC macros of reentr.h if d_endgrent_r
+?S:    is defined.
 ?S:.
 ?C:HAS_ENDGRENT_R:
-?C:     This symbol, if defined, indicates that the endgrent_r routine
-?C:     is available to endgrent re-entrantly.
+?C:    This symbol, if defined, indicates that the endgrent_r routine
+?C:    is available to endgrent re-entrantly.
 ?C:.
 ?C:ENDGRENT_R_PROTO:
-?C:     This symbol encodes the prototype of endgrent_r.
+?C:    This symbol encodes the prototype of endgrent_r.
+?C:    It is zero if d_endgrent_r is undef, and one of the
+?C:    REENTRANT_PROTO_T_ABC macros of reentr.h if d_endgrent_r
+?C:    is defined.
 ?C:.
-?H:#$d_endgrent_r HAS_ENDGRENT_R          /**/
-?H:#define ENDGRENT_R_PROTO $endgrent_r_proto     /**/
+?H:#$d_endgrent_r HAS_ENDGRENT_R          /**/
+?H:#define ENDGRENT_R_PROTO $endgrent_r_proto     /**/
 ?H:.
-?T:try hdrs
-?LINT:set d_endgrent_r
-?LINT:set endgrent_r_proto
+?T:try hdrs d_endgrent_r_proto
 : see if endgrent_r exists
 set endgrent_r d_endgrent_r
 eval $inlibc
 case "$d_endgrent_r" in
 "$define")
-       hdrs="$i_systypes sys/types.h ${i}_grp grp.h"
+       hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h"
+       case "$d_endgrent_r_proto:$usethreads" in
+       ":define")      d_endgrent_r_proto=define
+               set d_endgrent_r_proto endgrent_r $hdrs
+               eval $hasproto ;;
+       *)      ;;
+       esac
+       case "$d_endgrent_r_proto" in
+       define)
        case "$endgrent_r_proto" in
-       '')     try='extern int endgrent_r(FILE**);'
-               ./protochk "$try" $hdrs && endgrent_r_proto=I_H;
-       ;;
+       ''|0) try='int endgrent_r(FILE**);'
+       ./protochk "extern $try" $hdrs && endgrent_r_proto=I_H ;;
        esac
        case "$endgrent_r_proto" in
-       '')     try='extern void endgrent_r(FILE**);'
-               ./protochk "$try" $hdrs && endgrent_r_proto=V_H;
-       ;;
+       ''|0) try='void endgrent_r(FILE**);'
+       ./protochk "extern $try" $hdrs && endgrent_r_proto=V_H ;;
        esac
        case "$endgrent_r_proto" in
-       '') d_endgrent_r=undef ; echo "Disabling endgrent_r, cannot find prototype." ;;
-       * ) endgrent_r_proto="REENTRANT_$endgrent_r_proto" ; echo "$try" ;;
+       ''|0)   d_endgrent_r=undef
+               endgrent_r_proto=0
+               echo "Disabling endgrent_r, cannot determine prototype." >&4 ;;
+       * )     case "$endgrent_r_proto" in
+               REENTRANT_PROTO*) ;;
+               *) endgrent_r_proto="REENTRANT_PROTO_$endgrent_r_proto" ;;
+               esac
+               echo "Prototype: $try" ;;
        esac
        ;;
+       *)      case "$usethreads" in
+               define) echo "endgrent_r has no prototype, not using it." >&4 ;;
+               esac
+               d_endgrent_r=undef
+               endgrent_r_proto=0
+               ;;
+       esac
+       ;;
+*)     endgrent_r_proto=0
+       ;;
 esac