Print this page
3188 ignore the comment in limits.h and define NAME_MAX
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Reviewed by: Sam Zaydel <szaydel@racktopsystems.com>


  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
  27 /*        All Rights Reserved   */
  28 
  29 /*
  30  * Portions of this source code were derived from Berkeley 4.3 BSD
  31  * under license from the Regents of the University of California.
  32  */
  33 
  34 #ifndef __YPSYM_H
  35 #define __YPSYM_H
  36 
  37 #pragma ident   "%Z%%M% %I%     %E% SMI"
  38 
  39 #ifdef  __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 /*
  44  * This contains symbol and structure definitions for modules in the YP server
  45  */
  46 
  47 #include <ndbm.h>                 /* Pull this in first */
  48 #define DATUM
  49 #include <stdio.h>
  50 #include <errno.h>
  51 #include <signal.h>
  52 #include <rpc/rpc.h>
  53 #include <dirent.h>
  54 #include <sys/stat.h>
  55 #include <sys/wait.h>
  56 #include <rpcsvc/yp_prot.h>
  57 #include "ypv1_prot.h"
  58 #include <rpcsvc/ypclnt.h>


 148 
 149 extern bool _xdr_ypreqeust(XDR *xdrs, struct yprequest *ps);
 150 extern bool _xdr_ypresponse(XDR *xdrs, struct ypresponse *ps);
 151 
 152 extern void setup_resolv(bool *fwding, int *child, CLIENT **client,
 153                     char *tp_type, long prognum);
 154 extern int resolv_req(bool *fwding, CLIENT **client, int *pid,
 155                     char *tp, SVCXPRT *xprt, struct ypreq_key *req,
 156                     char *map);
 157 
 158 
 159 /* definitions for reading files of lists */
 160 
 161 struct listofnames
 162 {
 163         struct listofnames *nextname;
 164         char *name;
 165 };
 166 typedef struct listofnames listofnames;
 167 
 168 /*
 169  * XXX- NAME_MAX can't be defined in <limits.h> in a POSIX conformant system
 170  *      (under conditions which apply to Sun systems). Removal of this define
 171  *      caused yp to break (and only yp!). Hence, NAME_MAX is defined here
 172  *      *exactly* as it was in <limits.h>. I suspect this may not be the
 173  *      desired value. I suspect the desired value is either:
 174  *              - the maxumum name length for any file system type, or
 175  *              - should be _POSIX_NAME_MAX which is the minimum-maximum name
 176  *                length in a POSIX conformant system (which just happens to
 177  *                be 14), or
 178  *              - should be gotten by pathconf() or fpathconf().
 179  * XXX- I leave this to the owners of yp!
 180  */
 181 #define NAME_MAX        14      /* s5 file system maximum name length */
 182 
 183 #ifdef  __cplusplus
 184 }
 185 #endif
 186 
 187 #endif  /* __YPSYM_H */


  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
  27 /*        All Rights Reserved   */
  28 
  29 /*
  30  * Portions of this source code were derived from Berkeley 4.3 BSD
  31  * under license from the Regents of the University of California.
  32  */
  33 
  34 #ifndef __YPSYM_H
  35 #define __YPSYM_H
  36 


  37 #ifdef  __cplusplus
  38 extern "C" {
  39 #endif
  40 
  41 /*
  42  * This contains symbol and structure definitions for modules in the YP server
  43  */
  44 
  45 #include <ndbm.h>                 /* Pull this in first */
  46 #define DATUM
  47 #include <stdio.h>
  48 #include <errno.h>
  49 #include <signal.h>
  50 #include <rpc/rpc.h>
  51 #include <dirent.h>
  52 #include <sys/stat.h>
  53 #include <sys/wait.h>
  54 #include <rpcsvc/yp_prot.h>
  55 #include "ypv1_prot.h"
  56 #include <rpcsvc/ypclnt.h>


 146 
 147 extern bool _xdr_ypreqeust(XDR *xdrs, struct yprequest *ps);
 148 extern bool _xdr_ypresponse(XDR *xdrs, struct ypresponse *ps);
 149 
 150 extern void setup_resolv(bool *fwding, int *child, CLIENT **client,
 151                     char *tp_type, long prognum);
 152 extern int resolv_req(bool *fwding, CLIENT **client, int *pid,
 153                     char *tp, SVCXPRT *xprt, struct ypreq_key *req,
 154                     char *map);
 155 
 156 
 157 /* definitions for reading files of lists */
 158 
 159 struct listofnames
 160 {
 161         struct listofnames *nextname;
 162         char *name;
 163 };
 164 typedef struct listofnames listofnames;
 165 















 166 #ifdef  __cplusplus
 167 }
 168 #endif
 169 
 170 #endif  /* __YPSYM_H */