Print this page
5910 libnisdb won't build with modern GCC
@@ -18,10 +18,11 @@
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
+ * Copyright 2015 Gary Mills
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdio.h>
@@ -32,17 +33,18 @@
#include <errno.h>
#include <syslog.h>
#include "ldap_parse.h"
#include "nis_parse_ldap_conf.h"
-#include "nis_parse_ldap_err.h"
+#include "nis_parse_ldap_util.h"
#include "ldap_util.h"
-extern __nis_mapping_rule_t **dup_mapping_rules(
- __nis_mapping_rule_t **rules, int n_rules);
-extern __nis_mapping_rule_t *dup_mapping_rule(
- __nis_mapping_rule_t *in);
+/* Forward declarations */
+int getfullmapname(char **, const char *);
+int checkfullmapname(const char *, const char *, __nis_table_mapping_t **,
+ __nis_table_mapping_t **);
+int append_domainContext(__nis_table_mapping_t **, char *, char *);
static int merge_table_mapping(__nis_table_mapping_t *in,
__nis_table_mapping_t *out);
__nis_table_mapping_t *new_merged_mapping(const char *,
__nis_table_mapping_t *intbl);
@@ -136,11 +138,10 @@
merge_table_mapping(
__nis_table_mapping_t *in,
__nis_table_mapping_t *out)
{
int i;
- int len;
int orig_num_rules;
int append;
if (in == NULL)
return (1);
@@ -432,19 +433,16 @@
second_parser_pass(__nis_table_mapping_t **table_mapping)
{
__nis_table_mapping_t *t, *t2;
__nis_table_mapping_t *t_new = NULL, *tg;
__nis_table_mapping_t *prev = NULL;
- __nis_object_dn_t *objectDN;
char *objs, *dom;
char *objName = NULL;
char *lasts;
char *tobj, *alias, *dupalias, *tmp;
char *myself = "second_parser_pass";
int i = 0, len;
- int remove_t = 0;
- int add_t = 0;
prev = NULL;
for (t = *table_mapping; t != NULL; ) {
/*
* Temporarily using this field to flag deletion.