DragonFly submit List (threaded) for 2004-02
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
patch to modernify src/include/rpcsvc/nis*.h
As subject. DragonFlyBSD isn't catering to K&R-only compilers, so the
backwards-compatible prototypes can be removed (and the extern "C" thing
can be done in a more standard way, with __BEGIN_DECLS/__END_DECLS.)
buildworld in progress.
-Chris
Index: /usr/src/include/rpcsvc/nis_db.h
===================================================================
RCS file: /home/dcvs/src/include/rpcsvc/nis_db.h,v
retrieving revision 1.2
diff -u -r1.2 nis_db.h
--- /usr/src/include/rpcsvc/nis_db.h 17 Jun 2003 04:25:58 -0000 1.2
+++ /usr/src/include/rpcsvc/nis_db.h 22 Feb 2004 23:35:36 -0000
@@ -27,7 +27,7 @@
* Mountain View, California 94043
*
* $FreeBSD: src/include/rpcsvc/nis_db.h,v 1.5 1999/08/27 23:45:09 peter Exp $
- * $DragonFly: src/include/rpcsvc/nis_db.h,v 1.2 2003/06/17 04:25:58 dillon Exp $
+ * $DragonFly: src/include/rpcsvc/nis_db.h,v 1.1 2003/06/16 04:16:05 dillon Exp $
*/
/*
@@ -57,10 +57,6 @@
#include <rpc/rpc.h>
#include <rpcsvc/nis.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
enum db_status {
DB_SUCCESS = 0,
DB_NOTFOUND = 1,
@@ -107,8 +103,7 @@
* Prototypes for the database functions.
*/
-#if (__STDC__)
-
+__BEGIN_DECLS
extern bool_t db_initialize(char *);
#ifdef ORIGINAL_DECLS
extern bool_t db_create_table(char *, table_obj *);
@@ -130,34 +125,6 @@
extern db_status db_unload_table(char *);
extern void db_free_result(db_result *);
#endif
-
-#else /* Non-prototype definitions */
-
-extern bool_t db_initialize();
-#ifdef ORIGINAL_DECLS
-extern bool_t db_create_table();
-extern bool_t db_destroy_table();
-#else
-extern db_status db_create_table();
-extern db_status db_destroy_table();
-#endif
-extern db_result *db_first_entry();
-extern db_result *db_next_entry();
-extern db_result *db_reset_next_entry();
-extern db_result *db_list_entries();
-extern db_result *db_add_entry();
-extern db_result *db_remove_entry();
-extern db_status db_checkpoint();
-extern db_status db_standby();
-#ifndef ORIGINAL_DECLS
-extern db_status db_table_exists();
-extern db_status db_unload_table();
-extern void db_free_result();
-#endif
-#endif /* __STDC__ */
-
-#ifdef __cplusplus
-}
-#endif
+__END_DECLS
#endif /* _RPCSVC_NIS_DB_H */
Index: /usr/src/include/rpcsvc/nis_tags.h
===================================================================
RCS file: /home/dcvs/src/include/rpcsvc/nis_tags.h,v
retrieving revision 1.1
diff -u -r1.1 nis_tags.h
--- /usr/src/include/rpcsvc/nis_tags.h 17 Jun 2003 02:50:27 -0000 1.1
+++ /usr/src/include/rpcsvc/nis_tags.h 22 Feb 2004 23:36:44 -0000
@@ -44,10 +44,6 @@
/* From: #pragma ident "@(#)nis_tags.h 1.10 94/05/03 SMI" */
/* from file: zns_tags.h 1.7 Copyright (c) 1990 Sun Microsystems */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#ifndef ORIGINAL_DECLS
#define NIS_DIR "data"
#endif
@@ -130,8 +126,4 @@
#define RECURS_GROUPS 2 /* Recursive Groups allowed */
#define NEGMEM_GROUPS 4 /* Negative Groups allowed */
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _RPCSVC_NIS_TAGS_H */
Index: /usr/src/include/rpcsvc/nislib.h
===================================================================
RCS file: /home/dcvs/src/include/rpcsvc/nislib.h,v
retrieving revision 1.1
diff -u -r1.1 nislib.h
--- /usr/src/include/rpcsvc/nislib.h 17 Jun 2003 02:50:27 -0000 1.1
+++ /usr/src/include/rpcsvc/nislib.h 22 Feb 2004 23:38:34 -0000
@@ -42,16 +42,12 @@
/* From: #pragma ident "@(#)nislib.h 1.16 94/05/03 SMI" */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct signature {
int signature_len;
char *signature_val;
};
-#ifdef __STDC__
+__BEGIN_DECLS
extern void nis_freeresult(nis_result *);
extern nis_result * nis_lookup(nis_name, u_long);
extern nis_result * nis_list(nis_name, u_long,
@@ -178,140 +174,8 @@
*/
extern struct signature *__nis_calculate_encrypted_cksum(unsigned char *, unsigned int, char *, int);
-
-#else
-
-/* Non-prototype definitions (old fashioned C) */
-
-extern void nis_freeresult();
-extern nis_result * nis_lookup();
-extern nis_result * nis_list();
-extern nis_result * nis_add();
-extern nis_result * nis_remove();
-extern nis_result * nis_modify();
-
-extern nis_result * nis_add_entry();
-extern nis_result * nis_remove_entry();
-extern nis_result * nis_modify_entry();
-extern nis_result * nis_first_entry();
-extern nis_result * nis_next_entry();
-
-extern nis_error nis_mkdir();
-extern nis_error nis_rmdir();
-extern name_pos nis_dir_cmp();
-
-extern nis_name *nis_getnames();
-extern void nis_freenames();
-extern nis_name nis_domain_of();
-extern nis_name nis_leaf_of();
-extern nis_name nis_leaf_of_r();
-extern nis_name nis_name_of();
-extern nis_name nis_local_group();
-extern nis_name nis_local_directory();
-extern nis_name nis_local_principal();
-extern nis_name nis_local_host();
-
-extern void nis_destroy_object();
-extern nis_object * nis_clone_object();
-extern void nis_print_object();
-
-extern char * nis_sperrno();
-extern void nis_perror();
-extern char * nis_sperror();
-extern void nis_lerror();
-
-extern void nis_print_group_entry();
-extern bool_t nis_ismember();
-extern nis_error nis_creategroup();
-extern nis_error nis_destroygroup();
-extern nis_error nis_addmember();
-extern nis_error nis_removemember();
-extern nis_error nis_verifygroup();
-
-extern void nis_freeservlist();
-extern nis_server ** nis_getservlist();
-extern nis_error nis_stats();
-extern nis_error nis_servstate();
-extern void nis_freetags();
-
-extern nis_result * nis_checkpoint();
-extern void nis_ping();
-
-/*
- * XXX: PLEASE NOTE THAT THE FOLLOWING FUNCTIONS ARE INTERNAL
- * TO NIS+ AND SHOULD NOT BE USED BY ANY APPLICATION PROGRAM.
- * THEIR SEMANTICS AND/OR SIGNATURE CAN CHANGE WITHOUT NOTICE.
- * SO, PLEASE DO NOT USE THEM. YOU ARE WARNED!!!!
- */
-extern char ** __break_name();
-extern int __name_distance();
-extern nis_result * nis_make_error();
-extern nis_attr * __cvt2attr();
-extern void nis_free_request();
-extern nis_error nis_get_request();
-extern nis_object * nis_read_obj();
-extern int nis_write_obj();
-extern int nis_in_table();
-extern int nis_insert_item();
-extern NIS_HASH_ITEM * nis_find_item();
-extern NIS_HASH_ITEM * nis_remove_item();
-extern void nis_insert_name();
-extern void nis_remove_name();
-extern CLIENT * nis_make_rpchandle();
-extern void * nis_get_static_storage();
-extern char * nis_data();
-
-extern void nis_print_rights();
-extern void nis_print_directory();
-extern void nis_print_group();
-extern void nis_print_table();
-extern void nis_print_link();
-extern void nis_print_entry();
-extern nis_object * nis_get_object();
-
-extern nis_server * __nis_init_callback();
-extern int nis_getdtblsize();
-extern int __nis_run_callback();
-
-extern log_result * nis_dump();
-extern log_result * nis_dumplog();
-
-extern bool_t __do_ismember();
-extern nis_name __nis_map_group();
-extern nis_name __nis_map_group_r();
-
-
-extern nis_error __nis_CacheBind();
-extern directory_obj * __nis_CacheSearch();
-extern bool_t __nis_CacheRemoveEntry();
-extern void __nis_CacheRestart();
-extern void __nis_CachePrint();
-extern void __nis_CacheDumpStatistics();
-extern bool_t writeColdStartFile();
-
-extern CLIENT * __get_ti_clnt();
-extern int __strcmp_case_insens();
-extern int __strncmp_case_insens();
-
-extern fd_result * nis_finddirectory();
-extern int __start_clock();
-extern u_long __stop_clock();
-
-/*
- * This particular function is part of the FreeBSD NIS+ implementation
- * only. Ideally it should be somewhere else, but it is used by both
- * rpc.nisd and nis_cachemgr, and there aren't that many headers common
- * to both programs.
- */
-
-extern struct signature *__nis_calculate_encrypted_cksum();
-
-#endif
+__END_DECLS
#define NUL '\0'
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _RPCSVC_NISLIB_H */
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]