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 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 /*

@@ -32,12 +34,10 @@
  */
 
 #ifndef _NSS_COMMON_H
 #define _NSS_COMMON_H
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 #include <synch.h>
 
 #ifdef  __cplusplus
 extern "C" {
 #endif

@@ -246,15 +246,11 @@
         NSS_NSCD_PRIV = 9
 } nss_status_t;
 
 struct nss_backend;
 
-#if defined(__STDC__)
 typedef nss_status_t (*nss_backend_op_t)(struct nss_backend *, void *args);
-#else
-typedef nss_status_t (*nss_backend_op_t)();
-#endif
 
 struct nss_backend {
         nss_backend_op_t        *ops;
         int                     n_ops;
 };

@@ -293,28 +289,19 @@
  * function pointers;  when it needs to perform step (b), it calls the
  * constructor function, which returns a pointer to a new instance of the
  * backend, properly initialized (or returns NULL).
  */
 
-#if defined(__STDC__)
 typedef nss_backend_t           *(*nss_backend_constr_t)(const char *db_name,
                                                         const char *src_name,
 /* Hook for (unimplemented) args in nsswitch.conf */    const char *cfg_args);
-#else
-typedef nss_backend_t           *(*nss_backend_constr_t)();
-#endif
 
 struct nss_backend_finder {
-#if defined(__STDC__)
         nss_backend_constr_t    (*lookup)
                 (void *lkp_priv, const char *, const char *, void **del_privp);
         void                    (*delete)
                 (void *del_priv, nss_backend_constr_t);
-#else
-        nss_backend_constr_t    (*lookup)();
-        void                    (*delete)();
-#endif
         struct nss_backend_finder *next;
         void                    *lookup_priv;
 };
 
 typedef struct nss_backend_finder nss_backend_finder_t;

@@ -373,15 +360,11 @@
         void                    (*cleanup)(struct nss_db_params *);
 };
 
 typedef struct nss_db_params nss_db_params_t;
 
-#if defined(__STDC__)
 typedef void (*nss_db_initf_t)(nss_db_params_t *);
-#else
-typedef void (*nss_db_initf_t)();
-#endif
 
 /*
  * DBD param offsets in NSS2 nscd header.
  * Offsets are relative to beginning of dbd section.
  * 32 bit offsets should be sufficient, forever.

@@ -449,11 +432,10 @@
         size_t          length;
 };
 typedef struct nss_config nss_config_t;
 
 
-#if defined(__STDC__)
 extern nss_status_t nss_config(nss_config_t **, int);
 
 extern nss_status_t nss_search(nss_db_root_t *, nss_db_initf_t,
                         int search_fnum, void *search_args);
 extern nss_status_t nss_getent(nss_db_root_t *, nss_db_initf_t, nss_getent_t *,

@@ -478,30 +460,11 @@
 extern nss_status_t _nsc_setent_u(nss_db_root_t *, nss_db_initf_t,
                         nss_getent_t *);
 extern nss_status_t _nsc_endent_u(nss_db_root_t *, nss_db_initf_t,
                         nss_getent_t *);
 
-#else
-extern nss_status_t nss_config();
 
-extern nss_status_t nss_search();
-extern nss_status_t nss_getent();
-extern void nss_setent();
-extern void nss_endent();
-extern void nss_delete();
-
-extern int nss_pack();
-extern int nss_pack_ent();
-extern int nss_unpack();
-extern int nss_unpack_ent();
-
-extern nss_status_t _nsc_search();
-extern nss_status_t _nsc_getent_u();
-extern nss_status_t _nsc_setent_u();
-extern nss_status_t _nsc_endent_u();
-#endif
-
 #ifdef  __cplusplus
 }
 #endif
 
 #endif /* _NSS_COMMON_H */