Print this page
remove support for non-ANSI compilation

@@ -17,10 +17,12 @@
  * information: Portions Copyright [yyyy] [name of copyright owner]
  *
  * CDDL HEADER END
  */
 /*
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ *
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
  * Database-specific definitions for the getXXXbyYYY routines
  * (e.g getpwuid_r(), ether_ntohost()) that use the name-service switch.

@@ -232,21 +234,16 @@
  * return processing for a getXbyY interface.
  *
  * The nss_groupstr_t routine does the real work for any backend
  * that can supply a netgroup entry as a string in /etc/group format
  */
-#if defined(__STDC__)
 typedef int             (*nss_str2ent_t)(const char *in, int inlen,
                                 void *ent, char *buf, int buflen);
 
 struct nss_groupsbymem;         /* forward definition */
 typedef nss_status_t    (*nss_groupstr_t)(const char *instr, int inlen,
                                 struct nss_groupsbymem *);
-#else
-typedef int             (*nss_str2ent_t)();
-typedef nss_status_t    (*nss_groupstr_t)();
-#endif
 
 /*
  * The initgroups() function [see initgroups(3c)] needs to find all the
  *   groups to which a given user belongs.  To do this it calls
  *   _getgroupsbymember(), which is part of the frontend for the "group"

@@ -374,17 +371,12 @@
         void            *result;        /* "result" parameter to getXbyY_r() */
         char            *buffer;        /* "buffer"     "             "      */
         int             buflen;         /* "buflen"     "             "      */
 } nss_XbyY_buf_t;
 
-#if defined(__STDC__)
 extern nss_XbyY_buf_t   *_nss_XbyY_buf_alloc(int struct_size, int buffer_size);
 extern void              _nss_XbyY_buf_free(nss_XbyY_buf_t *);
-#else
-extern nss_XbyY_buf_t   *_nss_XbyY_buf_alloc();
-extern void              _nss_XbyY_buf_free();
-#endif
 
 #define NSS_XbyY_ALLOC(bufpp, str_size, buf_size)               (\
         (*bufpp) == 0                                           \
         ? (*bufpp) = _nss_XbyY_buf_alloc(str_size, buf_size)    \
         : (*bufpp))

@@ -451,16 +443,12 @@
         }       ipnode;
         void *attrp;    /* for the new attr databases */
 } nss_XbyY_key_t;
 
 
-#if defined(__STDC__)
 typedef int             (*nss_key2str_t)(void *buffer, size_t buflen,
                                 nss_XbyY_key_t *key, size_t *len);
-#else
-typedef int             (*nss_key2str_t)();
-#endif
 
 
 typedef struct nss_XbyY_args {
 
 /* IN */

@@ -687,11 +675,10 @@
 
 #define NSS_PACKED_CRED_CHECK(buf, ruid, euid)          (\
         ((nss_pheader_t *)(buf))->p_ruid == (ruid) && \
         ((nss_pheader_t *)(buf))->p_euid == (euid))
 
-#if defined(__STDC__)
 extern char             **_nss_netdb_aliases(const char *, int, char *, int);
 extern nss_status_t     nss_default_key2str(void *, size_t, nss_XbyY_args_t *,
                                         const char *, int, size_t *);
 extern nss_status_t     nss_packed_arg_init(void *, size_t, nss_db_root_t *,
                                         nss_db_initf_t *, int *,

@@ -701,18 +688,10 @@
                                         nss_XbyY_args_t *);
 extern void             nss_packed_set_status(void *, size_t, nss_status_t,
                                         nss_XbyY_args_t *);
 extern nss_status_t     nss_packed_getkey(void *, size_t, char **, int *,
                                         nss_XbyY_args_t *);
-#else
-extern char             **_nss_netdb_aliases();
-extern int              nss_default_key2str();
-extern nss_status_t     nss_packed_arg_init();
-extern nss_status_t     nss_packed_context_init();
-extern void             nss_packed_set_status();
-extern nss_status_t     nss_packed_getkey();
-#endif
 
 /*
  * nss_dbop_t values for searches with various keys;  values for
  * destructor/endent/setent/getent are defined in <nss_common.h>
  */