From 1272d38f722df8a415e2bdbeac908b2e461f666b Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Fri, 19 Feb 1999 09:54:18 +0000 Subject: [PATCH] Replace all __BEGIN_DELCS with LIBGTOP_BEGIN_DECLS and all __END_DECLS 1999-02-19 Martin Baulig * Replace all __BEGIN_DELCS with LIBGTOP_BEGIN_DECLS and all __END_DECLS with LIBGTOP_END_DECLS; remove all __P macros and use real function prototypes. --- ChangeLog | 4 +++ glibtop.h | 15 +++++++--- include/glibtop/close.h | 4 +-- include/glibtop/command.h | 4 +-- include/glibtop/cpu.h | 6 ++-- include/glibtop/error.h | 4 +-- include/glibtop/fsusage.h | 4 +-- include/glibtop/global.h | 43 ++++++++++------------------- include/glibtop/inodedb.h | 4 +-- include/glibtop/loadavg.h | 4 +-- include/glibtop/mem.h | 4 +-- include/glibtop/mountlist.h | 4 +-- include/glibtop/msg_limits.h | 4 +-- include/glibtop/netload.h | 4 +-- include/glibtop/open.h | 4 +-- include/glibtop/parameter.h | 4 +-- include/glibtop/ppp.h | 4 +-- include/glibtop/procargs.h | 4 +-- include/glibtop/prockernel.h | 4 +-- include/glibtop/proclist.h | 4 +-- include/glibtop/procmap.h | 4 +-- include/glibtop/procmem.h | 4 +-- include/glibtop/procsegment.h | 4 +-- include/glibtop/procsignal.h | 4 +-- include/glibtop/procstate.h | 4 +-- include/glibtop/proctime.h | 4 +-- include/glibtop/procuid.h | 4 +-- include/glibtop/read.h | 4 +-- include/glibtop/read_data.h | 4 +-- include/glibtop/sem_limits.h | 4 +-- include/glibtop/shm_limits.h | 4 +-- include/glibtop/signal.h | 4 +-- include/glibtop/swap.h | 4 +-- include/glibtop/sysdeps.h | 4 +-- include/glibtop/sysinfo.h | 4 +-- include/glibtop/types.h | 4 +-- include/glibtop/union.h | 4 +-- include/glibtop/uptime.h | 4 +-- include/glibtop/version.h | 4 +-- include/glibtop/write.h | 4 +-- include/glibtop/xmalloc.h | 4 +-- po/de.po | 2 +- po/es.po | 2 +- po/es_DO.po | 2 +- po/es_GT.po | 2 +- po/es_HN.po | 2 +- po/es_MX.po | 2 +- po/es_PA.po | 2 +- po/es_PE.po | 2 +- po/es_SV.po | 2 +- po/fr.po | 2 +- po/ja.po | 2 +- po/ko.po | 2 +- po/no.po | 2 +- src/daemon/daemon.h | 20 ++++++++------ sysdeps/freebsd/glibtop_machine.h | 4 +-- sysdeps/freebsd/glibtop_server.h | 4 +-- sysdeps/freebsd/glibtop_suid.h | 14 ++++++---- sysdeps/kernel/glibtop_server.h | 4 +-- sysdeps/kernel/kernel.h | 4 +-- sysdeps/linux/glibtop_machine.h | 4 +-- sysdeps/linux/glibtop_server.h | 4 +-- sysdeps/osf1/glibtop_machine.h | 6 ++-- sysdeps/osf1/glibtop_server.h | 4 +-- sysdeps/osf1/glibtop_suid.h | 14 ++++++---- sysdeps/stub/glibtop_server.h | 4 +-- sysdeps/stub_suid/glibtop_machine.h | 4 +-- sysdeps/stub_suid/glibtop_server.h | 4 +-- sysdeps/stub_suid/glibtop_suid.h | 14 ++++++---- sysdeps/sun4/glibtop_machine.h | 16 +++++------ sysdeps/sun4/glibtop_server.h | 4 +-- sysdeps/sun4/glibtop_suid.h | 14 ++++++---- 72 files changed, 198 insertions(+), 186 deletions(-) diff --git a/ChangeLog b/ChangeLog index fd145052..9dfa9858 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 1999-02-19 Martin Baulig + * Replace all __BEGIN_DELCS with LIBGTOP_BEGIN_DECLS and all + __END_DECLS with LIBGTOP_END_DECLS; remove all __P macros and + use real function prototypes. + * LIBGTOP-VERSION: Set version number to 0.99.9 binary age 0, interface age 0. diff --git a/glibtop.h b/glibtop.h index fa823375..0c8ddb3c 100644 --- a/glibtop.h +++ b/glibtop.h @@ -72,14 +72,21 @@ extern const unsigned long glibtop_server_features; #define glibtop_close() glibtop_close_r(glibtop_global_server); -extern glibtop *glibtop_init_r __P((glibtop **, unsigned long, unsigned)); -extern glibtop *glibtop_init_s __P((glibtop **, unsigned long, unsigned)); +glibtop * +glibtop_init_r (glibtop **server_ptr, + unsigned long features, + unsigned flags); + +glibtop * +glibtop_init_s (glibtop **server_ptr, + unsigned long features, + unsigned flags); #ifdef GLIBTOP_GUILE /* You need to link with -lgtop_guile to get this stuff here. */ -extern void glibtop_boot_guile __P((void)); +void glibtop_boot_guile (void); #endif @@ -87,7 +94,7 @@ extern void glibtop_boot_guile __P((void)); /* You need to link with -lgtop_guile_names to get this stuff here. */ -extern void glibtop_boot_guile_names __P((void)); +void glibtop_boot_guile_names (void); #ifndef GLIBTOP_NAMES #define GLIBTOP_NAMES diff --git a/include/glibtop/close.h b/include/glibtop/close.h index ee701dab..8eed1c27 100644 --- a/include/glibtop/close.h +++ b/include/glibtop/close.h @@ -24,13 +24,13 @@ #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS void glibtop_close_r (glibtop *server); void glibtop_close_s (glibtop *server); void glibtop_close_p (glibtop *server); -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/command.h b/include/glibtop/command.h index b888cdfa..69506dfe 100644 --- a/include/glibtop/command.h +++ b/include/glibtop/command.h @@ -26,7 +26,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_CMND_QUIT 0 #define GLIBTOP_CMND_SYSDEPS 1 @@ -95,6 +95,6 @@ void * glibtop_call_s (glibtop *server, unsigned command, size_t send_size, const void *send_buf, size_t recv_size, void *recv_buf); -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/cpu.h b/include/glibtop/cpu.h index 602c1985..6c3b8495 100644 --- a/include/glibtop/cpu.h +++ b/include/glibtop/cpu.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_CPU_TOTAL 0 #define GLIBTOP_CPU_USER 1 @@ -71,7 +71,7 @@ struct _glibtop_cpu #define glibtop_get_cpu_r glibtop_get_cpu_s #endif -void glibtop_get_cpu_l __P((glibtop *, glibtop_cpu *)); +void glibtop_get_cpu_l (glibtop *server, glibtop_cpu *buf); #if GLIBTOP_SUID_CPU void glibtop_init_cpu_p (glibtop *server); @@ -92,6 +92,6 @@ extern const char *glibtop_descriptions_cpu []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/error.h b/include/glibtop/error.h index 1b7e7932..724b07bf 100644 --- a/include/glibtop/error.h +++ b/include/glibtop/error.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS void glibtop_error_vr (glibtop *server, char *format, va_list args); void glibtop_warn_vr (glibtop *server, char *format, va_list args); @@ -121,6 +121,6 @@ glibtop_warn_io (char *format, ...) #endif /* no __GNUC__ */ -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/fsusage.h b/include/glibtop/fsusage.h index 017cd03c..3de56336 100644 --- a/include/glibtop/fsusage.h +++ b/include/glibtop/fsusage.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_FSUSAGE_BLOCKS 0 #define GLIBTOP_FSUSAGE_BFREE 1 @@ -65,6 +65,6 @@ extern const char *glibtop_descriptions_fsusage []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/global.h b/include/glibtop/global.h index 1181d642..7ebf135a 100644 --- a/include/glibtop/global.h +++ b/include/glibtop/global.h @@ -26,37 +26,22 @@ #include #endif -#ifdef WITHOUT_GNOME - -/* __BEGIN_DECLS should be used at the beginning of your declarations, - so that C++ compilers don't mangle their names. Use __END_DECLS at - the end of C declarations. */ +/* + * All declarations are enclosed in BEGIN_LIBGTOP_DECLS and + * END_LIBGTOP_DECLS so that C++ compilers don't mangle their names. + * + */ -#undef __BEGIN_DECLS -#undef __END_DECLS +#undef BEGIN_LIBGTOP_DECLS +#undef END_LIBGTOP_DECLS #ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } +# define BEGIN_LIBGTOP_DECLS extern "C" { +# define END_LIBGTOP_DECLS } #else -# define __BEGIN_DECLS /* empty */ -# define __END_DECLS /* empty */ +# define BEGIN_LIBGTOP_DECLS /* empty */ +# define END_LIBGTOP_DECLS /* empty */ #endif -/* __P is a macro used to wrap function prototypes, so that compilers - that don't understand ANSI C prototypes still work, and ANSI C - compilers can issue warnings about type mismatches. */ - -#undef __P -#if defined (__STDC__) || defined (_AIX) \ -|| (defined (__mips) && defined (_SYSTYPE_SVR4)) \ - || defined(WIN32) || defined(__cplusplus) -# define __P(protos) protos -#else -# define __P(protos) () -#endif - -#endif /* WITHOUT_GNOME */ - #ifdef _IN_LIBGTOP /* Provide macros to feature the GCC function attribute. @@ -137,7 +122,7 @@ #ifdef _IN_LIBGTOP -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #ifndef _ #define _(String) dgettext (PACKAGE, String) @@ -145,10 +130,10 @@ __BEGIN_DECLS #endif #ifndef HAVE_STRERROR -extern char *strerror __P((int)); +char *strerror (int errno); #endif -__END_DECLS +END_LIBGTOP_DECLS #endif /* _IN_LIBGTOP */ diff --git a/include/glibtop/inodedb.h b/include/glibtop/inodedb.h index 6408c8f8..ef394b45 100644 --- a/include/glibtop/inodedb.h +++ b/include/glibtop/inodedb.h @@ -29,7 +29,7 @@ #define GLIBTOP_INODEDB_ALL 7 -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS typedef struct _glibtop_inodedb glibtop_inodedb; @@ -60,6 +60,6 @@ glibtop_inodedb_lookup_s (glibtop *server, void glibtop_inodedb_close_s (glibtop *server, glibtop_inodedb *inodedb); -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/loadavg.h b/include/glibtop/loadavg.h index 39d507df..03c4fc3a 100644 --- a/include/glibtop/loadavg.h +++ b/include/glibtop/loadavg.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_LOADAVG_LOADAVG 0 #define GLIBTOP_LOADAVG_NR_RUNNING 1 @@ -74,6 +74,6 @@ extern const char *glibtop_descriptions_loadavg []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/mem.h b/include/glibtop/mem.h index 186520e8..8492c634 100644 --- a/include/glibtop/mem.h +++ b/include/glibtop/mem.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_MEM_TOTAL 0 #define GLIBTOP_MEM_USED 1 @@ -82,6 +82,6 @@ extern const char *glibtop_descriptions_mem []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/mountlist.h b/include/glibtop/mountlist.h index 9e6e97a3..e5ecf374 100644 --- a/include/glibtop/mountlist.h +++ b/include/glibtop/mountlist.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_MOUNTLIST_NUMBER 0 #define GLIBTOP_MOUNTLIST_TOTAL 1 @@ -74,6 +74,6 @@ extern const char *glibtop_descriptions_mountlist []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/msg_limits.h b/include/glibtop/msg_limits.h index 39d680bf..c66f292b 100644 --- a/include/glibtop/msg_limits.h +++ b/include/glibtop/msg_limits.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_IPC_MSGPOOL 0 #define GLIBTOP_IPC_MSGMAP 1 @@ -80,7 +80,7 @@ extern const char *glibtop_descriptions_msg_limits []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/netload.h b/include/glibtop/netload.h index a002a954..1df82dc8 100644 --- a/include/glibtop/netload.h +++ b/include/glibtop/netload.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_NETLOAD_IF_FLAGS 0 #define GLIBTOP_NETLOAD_MTU 1 @@ -113,6 +113,6 @@ extern const char *glibtop_descriptions_netload []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/open.h b/include/glibtop/open.h index 8c0ba1f0..8b9186b7 100644 --- a/include/glibtop/open.h +++ b/include/glibtop/open.h @@ -24,7 +24,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define _GLIBTOP_INIT_STATE_INIT 0x10000 #define _GLIBTOP_INIT_STATE_OPEN 0x20000 @@ -66,6 +66,6 @@ glibtop_open_s (glibtop *server, const char *program_name, const unsigned long features, const unsigned flags); -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/parameter.h b/include/glibtop/parameter.h index dbf4524a..f0a0832d 100644 --- a/include/glibtop/parameter.h +++ b/include/glibtop/parameter.h @@ -23,7 +23,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_PARAM_METHOD 1 #define GLIBTOP_PARAM_FEATURES 2 @@ -44,6 +44,6 @@ void glibtop_set_parameter_l (glibtop *server, const unsigned parameter, const void *data_ptr, size_t data_size); -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/ppp.h b/include/glibtop/ppp.h index 556e0854..84995ecf 100644 --- a/include/glibtop/ppp.h +++ b/include/glibtop/ppp.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_PPP_STATE 0 #define GLIBTOP_PPP_BYTES_IN 1 @@ -78,6 +78,6 @@ extern const char *glibtop_descriptions_ppp []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/procargs.h b/include/glibtop/procargs.h index aefaef70..901d88b4 100644 --- a/include/glibtop/procargs.h +++ b/include/glibtop/procargs.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_PROC_ARGS_SIZE 0 @@ -76,6 +76,6 @@ extern const char *glibtop_descriptions_proc_args []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/prockernel.h b/include/glibtop/prockernel.h index 97ae2112..ed7a808b 100644 --- a/include/glibtop/prockernel.h +++ b/include/glibtop/prockernel.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_PROC_KERNEL_K_FLAGS 0 #define GLIBTOP_PROC_KERNEL_MIN_FLT 1 @@ -91,6 +91,6 @@ extern const char *glibtop_descriptions_proc_kernel []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/proclist.h b/include/glibtop/proclist.h index 0ed2089f..411221ce 100644 --- a/include/glibtop/proclist.h +++ b/include/glibtop/proclist.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_PROCLIST_NUMBER 0 #define GLIBTOP_PROCLIST_TOTAL 1 @@ -97,6 +97,6 @@ extern const char *glibtop_descriptions_proclist []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/procmap.h b/include/glibtop/procmap.h index 9096225b..12e3a9b0 100644 --- a/include/glibtop/procmap.h +++ b/include/glibtop/procmap.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_PROC_MAP_NUMBER 0 #define GLIBTOP_PROC_MAP_TOTAL 1 @@ -103,6 +103,6 @@ extern const char *glibtop_descriptions_proc_map []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/procmem.h b/include/glibtop/procmem.h index f9133d6e..7179fc9f 100644 --- a/include/glibtop/procmem.h +++ b/include/glibtop/procmem.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_PROC_MEM_SIZE 0 #define GLIBTOP_PROC_MEM_VSIZE 1 @@ -82,6 +82,6 @@ extern const char *glibtop_descriptions_proc_mem []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/procsegment.h b/include/glibtop/procsegment.h index 027eeaef..f312c279 100644 --- a/include/glibtop/procsegment.h +++ b/include/glibtop/procsegment.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_PROC_SEGMENT_TEXT_RSS 0 #define GLIBTOP_PROC_SEGMENT_SHLIB_RSS 1 @@ -85,6 +85,6 @@ extern const char *glibtop_descriptions_proc_segment []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/procsignal.h b/include/glibtop/procsignal.h index 15add08b..56ea83c3 100644 --- a/include/glibtop/procsignal.h +++ b/include/glibtop/procsignal.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_PROC_SIGNAL_SIGNAL 0 #define GLIBTOP_PROC_SIGNAL_BLOCKED 1 @@ -76,6 +76,6 @@ extern const char *glibtop_descriptions_proc_signal []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/procstate.h b/include/glibtop/procstate.h index a26c8b11..00b7491f 100644 --- a/include/glibtop/procstate.h +++ b/include/glibtop/procstate.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_PROC_STATE_CMD 0 #define GLIBTOP_PROC_STATE_STATE 1 @@ -83,6 +83,6 @@ extern const char *glibtop_descriptions_proc_state []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/proctime.h b/include/glibtop/proctime.h index c9ffac69..b440e3a9 100644 --- a/include/glibtop/proctime.h +++ b/include/glibtop/proctime.h @@ -26,7 +26,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_PROC_TIME_START_TIME 0 #define GLIBTOP_PROC_TIME_RTIME 1 @@ -97,6 +97,6 @@ extern const char *glibtop_descriptions_proc_time []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/procuid.h b/include/glibtop/procuid.h index 0d73de7b..9cdfb488 100644 --- a/include/glibtop/procuid.h +++ b/include/glibtop/procuid.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_PROC_UID_UID 0 #define GLIBTOP_PROC_UID_EUID 1 @@ -92,6 +92,6 @@ extern const char *glibtop_descriptions_proc_uid []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/read.h b/include/glibtop/read.h index b1658c1b..229938b6 100644 --- a/include/glibtop/read.h +++ b/include/glibtop/read.h @@ -25,13 +25,13 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define glibtop_read(p1, p2) glibtop_read(glibtop_global_server, p1, p2) void glibtop_read_l (glibtop *server, size_t size, void *buf); void glibtop_read_s (glibtop *server, size_t size, void *buf); -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/read_data.h b/include/glibtop/read_data.h index 67d13f82..c2b383fd 100644 --- a/include/glibtop/read_data.h +++ b/include/glibtop/read_data.h @@ -25,13 +25,13 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define glibtop_read_data() glibtop_read_data_r(glibtop_global_server) void *glibtop_read_data_l (glibtop *server); void *glibtop_read_data_s (glibtop *server); -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/sem_limits.h b/include/glibtop/sem_limits.h index 1ce0f794..55197407 100644 --- a/include/glibtop/sem_limits.h +++ b/include/glibtop/sem_limits.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_IPC_SEMMAP 0 #define GLIBTOP_IPC_SEMMNI 1 @@ -86,6 +86,6 @@ extern const char *glibtop_descriptions_sem_limits []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/shm_limits.h b/include/glibtop/shm_limits.h index 7ee62eee..d69ab2fc 100644 --- a/include/glibtop/shm_limits.h +++ b/include/glibtop/shm_limits.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_IPC_SHMMAX 0 #define GLIBTOP_IPC_SHMMIN 1 @@ -76,6 +76,6 @@ extern const char *glibtop_descriptions_shm_limits []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/signal.h b/include/glibtop/signal.h index 1e774d10..8ee74816 100644 --- a/include/glibtop/signal.h +++ b/include/glibtop/signal.h @@ -28,7 +28,7 @@ #include #endif -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS typedef struct _glibtop_signame glibtop_signame; @@ -40,6 +40,6 @@ struct _glibtop_signame extern const glibtop_signame glibtop_sys_siglist []; -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/swap.h b/include/glibtop/swap.h index 26139170..05e46342 100644 --- a/include/glibtop/swap.h +++ b/include/glibtop/swap.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_SWAP_TOTAL 0 #define GLIBTOP_SWAP_USED 1 @@ -76,6 +76,6 @@ extern const char *glibtop_descriptions_swap []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/sysdeps.h b/include/glibtop/sysdeps.h index a8e06595..3fb1d666 100644 --- a/include/glibtop/sysdeps.h +++ b/include/glibtop/sysdeps.h @@ -24,7 +24,7 @@ #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_SYSDEPS_FEATURES 0 #define GLIBTOP_SYSDEPS_CPU 1 @@ -103,6 +103,6 @@ extern const char *glibtop_descriptions_sysdeps []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/sysinfo.h b/include/glibtop/sysinfo.h index e71d10aa..86138c50 100644 --- a/include/glibtop/sysinfo.h +++ b/include/glibtop/sysinfo.h @@ -28,7 +28,7 @@ #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_SYSINFO_CPUINFO 0 @@ -57,6 +57,6 @@ struct _glibtop_sysinfo glibtop_sysinfo *glibtop_get_sysinfo_s (glibtop *server); -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/types.h b/include/glibtop/types.h index b622426f..11414343 100644 --- a/include/glibtop/types.h +++ b/include/glibtop/types.h @@ -22,7 +22,7 @@ #ifndef __GLIBTOP_TYPES_H__ #define __GLIBTOP_TYPES_H__ -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_TYPE_LONG 1 #define GLIBTOP_TYPE_ULONG 2 @@ -31,6 +31,6 @@ __BEGIN_DECLS #define GLIBTOP_TYPE_CHAR 5 #define GLIBTOP_TYPE_STRING 6 -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/union.h b/include/glibtop/union.h index 28f4bd41..39b555cf 100644 --- a/include/glibtop/union.h +++ b/include/glibtop/union.h @@ -48,7 +48,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS typedef union _glibtop_union glibtop_union; @@ -78,6 +78,6 @@ union _glibtop_union glibtop_ppp ppp; }; -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/uptime.h b/include/glibtop/uptime.h index 806f93ce..539fe02f 100644 --- a/include/glibtop/uptime.h +++ b/include/glibtop/uptime.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_UPTIME_UPTIME 0 #define GLIBTOP_UPTIME_IDLETIME 1 @@ -70,6 +70,6 @@ extern const char *glibtop_descriptions_uptime []; #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/version.h b/include/glibtop/version.h index ae392df3..63640e4f 100644 --- a/include/glibtop/version.h +++ b/include/glibtop/version.h @@ -27,7 +27,7 @@ #define LIBGTOP_VERSION_STRING "Libgtop %s server version %s (%u,%u,%u,%u)." -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #if _IN_LIBGTOP @@ -35,6 +35,6 @@ void glibtop_send_version (glibtop *server, int fd); #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/write.h b/include/glibtop/write.h index b0936fa5..0219e321 100644 --- a/include/glibtop/write.h +++ b/include/glibtop/write.h @@ -25,13 +25,13 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define glibtop_write(p1, p2) glibtop_write(glibtop_global_server, p1, p2) void glibtop_write_l (glibtop *server, size_t size, void *buf); void glibtop_write_s (glibtop *server, size_t size, void *buf); -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/include/glibtop/xmalloc.h b/include/glibtop/xmalloc.h index 23214e43..0c8ed919 100644 --- a/include/glibtop/xmalloc.h +++ b/include/glibtop/xmalloc.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define glibtop_malloc(p1) glibtop_malloc_r(glibtop_global_server, p1) #define glibtop_calloc(p1, p2) glibtop_calloc_r(glibtop_global_server, p1, p2) @@ -39,6 +39,6 @@ void *glibtop_realloc_r (glibtop *server, void *ptr, size_t size); char *glibtop_strdup_r (glibtop *server, const char *string); void glibtop_free_r (glibtop *server, const void *ptr); -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/po/de.po b/po/de.po index 92f00f2b..69b0cbc6 100644 --- a/po/de.po +++ b/po/de.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: libgtop VERSION\n" -"POT-Creation-Date: 1999-02-18 22:12+0100\n" +"POT-Creation-Date: 1999-02-19 10:33+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Martin Baulig \n" "Language-Team: Martin Baulig \n" diff --git a/po/es.po b/po/es.po index dc9653f3..e6811578 100644 --- a/po/es.po +++ b/po/es.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: glibtop 0.99.3\n" -"POT-Creation-Date: 1999-02-18 22:12+0100\n" +"POT-Creation-Date: 1999-02-19 10:33+0100\n" "PO-Revision-Date: 1998-12-13 04:38+0100\n" "Last-Translator: Pablo Saratxaga \n" "Language-Team: Pablo Saratxaga \n" diff --git a/po/es_DO.po b/po/es_DO.po index 0057ac81..460c414c 100644 --- a/po/es_DO.po +++ b/po/es_DO.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-02-18 22:12+0100\n" +"POT-Creation-Date: 1999-02-19 10:33+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/es_GT.po b/po/es_GT.po index 0057ac81..460c414c 100644 --- a/po/es_GT.po +++ b/po/es_GT.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-02-18 22:12+0100\n" +"POT-Creation-Date: 1999-02-19 10:33+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/es_HN.po b/po/es_HN.po index 0057ac81..460c414c 100644 --- a/po/es_HN.po +++ b/po/es_HN.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-02-18 22:12+0100\n" +"POT-Creation-Date: 1999-02-19 10:33+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/es_MX.po b/po/es_MX.po index caca7935..460c414c 100644 --- a/po/es_MX.po +++ b/po/es_MX.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-02-15 22:39+0100\n" +"POT-Creation-Date: 1999-02-19 10:33+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/es_PA.po b/po/es_PA.po index caca7935..460c414c 100644 --- a/po/es_PA.po +++ b/po/es_PA.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-02-15 22:39+0100\n" +"POT-Creation-Date: 1999-02-19 10:33+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/es_PE.po b/po/es_PE.po index caca7935..460c414c 100644 --- a/po/es_PE.po +++ b/po/es_PE.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-02-15 22:39+0100\n" +"POT-Creation-Date: 1999-02-19 10:33+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/es_SV.po b/po/es_SV.po index caca7935..460c414c 100644 --- a/po/es_SV.po +++ b/po/es_SV.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-02-15 22:39+0100\n" +"POT-Creation-Date: 1999-02-19 10:33+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/fr.po b/po/fr.po index 48adda41..c7d1b862 100644 --- a/po/fr.po +++ b/po/fr.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: libgtop VERSION\n" -"POT-Creation-Date: 1999-02-15 22:39+0100\n" +"POT-Creation-Date: 1999-02-19 10:33+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Vincent Renardias \n" "Language-Team: Vincent Renardias \n" diff --git a/po/ja.po b/po/ja.po index e49a0bb9..65a7c722 100644 --- a/po/ja.po +++ b/po/ja.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: libgtop VERSION\n" -"POT-Creation-Date: 1999-02-15 22:39+0100\n" +"POT-Creation-Date: 1999-02-19 10:33+0100\n" "PO-Revision-Date: 1998-12-11 06:53+09:00\n" "Last-Translator: Eiichiro ITANI \n" "Language-Team: \n" diff --git a/po/ko.po b/po/ko.po index b0839b29..8a3ae902 100644 --- a/po/ko.po +++ b/po/ko.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: libgtop VERSION\n" -"POT-Creation-Date: 1999-02-15 22:39+0100\n" +"POT-Creation-Date: 1999-02-19 10:33+0100\n" "PO-Revision-Date: 1999-02-04 14:31:38+0900\n" "Last-Translator: Sung-Hyun Nam \n" "Language-Team: Korean \n" diff --git a/po/no.po b/po/no.po index 8f8db263..435b8174 100644 --- a/po/no.po +++ b/po/no.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: libgtop 0.99.3\n" -"POT-Creation-Date: 1999-02-15 22:39+0100\n" +"POT-Creation-Date: 1999-02-19 10:33+0100\n" "PO-Revision-Date: 1999-01-27 23:22+0100\n" "Last-Translator: Kjartan Maraas \n" "Language-Team: Norwegian \n" diff --git a/src/daemon/daemon.h b/src/daemon/daemon.h index 546d3a32..9a058cce 100644 --- a/src/daemon/daemon.h +++ b/src/daemon/daemon.h @@ -38,7 +38,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS /* Some don't have LOG_PERROR */ #ifndef LOG_PERROR @@ -59,19 +59,21 @@ __BEGIN_DECLS #define MSG_BUFSZ sizeof (struct _glibtop_ipc_message) #define MSG_MSGSZ (MSG_BUFSZ - sizeof (long)) -extern void handle_parent_connection __P((int)); -extern void handle_slave_connection __P((int, int)); -extern void handle_slave_command __P((glibtop_command *, glibtop_response *, const void *)); +void handle_parent_connection (int s); +void handle_slave_connection (int input, int output); +void handle_slave_command (glibtop_command *cmnd, glibtop_response *resp, + const void *parameter); -extern void do_output __P((int, glibtop_response *, off_t, size_t, const void *)); -extern int do_read __P((int, void *, size_t)); +void do_output (int s, glibtop_response *resp, off_t offset, + size_t data_size, const void *data); +int do_read (int s, void *ptr, size_t total_size); -extern void syslog_message __P((int, char *, ...)); -extern void syslog_io_message __P((int, char *, ...)); +void syslog_message (int priority, char *format, ...); +void syslog_io_message (int priority, char *format, ...); extern int enable_debug; extern int verbose_output; -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/freebsd/glibtop_machine.h b/sysdeps/freebsd/glibtop_machine.h index f2320d3d..84a45ab7 100644 --- a/sysdeps/freebsd/glibtop_machine.h +++ b/sysdeps/freebsd/glibtop_machine.h @@ -36,7 +36,7 @@ #include #endif -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS typedef struct _glibtop_machine glibtop_machine; @@ -51,6 +51,6 @@ struct _glibtop_machine kvm_t *kd; }; -__END_DECLS +END_LIBGTOP_DECLS #endif __GLIBTOP_MACHINE_H__ diff --git a/sysdeps/freebsd/glibtop_server.h b/sysdeps/freebsd/glibtop_server.h index ab051092..d1f2aeb9 100644 --- a/sysdeps/freebsd/glibtop_server.h +++ b/sysdeps/freebsd/glibtop_server.h @@ -22,7 +22,7 @@ #ifndef __GLIBTOP_SERVER_H__ #define __GLIBTOP_SERVER_H__ -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_SUID_CPU (1 << GLIBTOP_SYSDEPS_CPU) #define GLIBTOP_SUID_MEM (1 << GLIBTOP_SYSDEPS_MEM) @@ -45,6 +45,6 @@ __BEGIN_DECLS #define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD) #define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP) -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/freebsd/glibtop_suid.h b/sysdeps/freebsd/glibtop_suid.h index ddbca208..f5f6a59f 100644 --- a/sysdeps/freebsd/glibtop_suid.h +++ b/sysdeps/freebsd/glibtop_suid.h @@ -22,7 +22,7 @@ #ifndef __GLIBTOP_SUID_H__ #define __GLIBTOP_SUID_H__ -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define KI_PROC(ki) (&(ki))->kp_proc) #define KI_EPROC(ki) (&(ki))->kp_eproc) @@ -39,10 +39,14 @@ static inline void glibtop_suid_leave (glibtop *server) { _exit (1); }; -extern void glibtop_init_p __P((glibtop *, const unsigned long, const unsigned)); +void +glibtop_init_p (glibtop *server, const unsigned long features, + const unsigned flags); +void +glibtop_open_p (glibtop *server, const char *program_name, + const unsigned long features, + const unsigned flags); -extern void glibtop_open_p __P((glibtop *, const char *, const unsigned long, const unsigned)); - -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/kernel/glibtop_server.h b/sysdeps/kernel/glibtop_server.h index 48485001..f6c7def8 100644 --- a/sysdeps/kernel/glibtop_server.h +++ b/sysdeps/kernel/glibtop_server.h @@ -22,7 +22,7 @@ #ifndef __GLIBTOP_SERVER_H__ #define __GLIBTOP_SERVER_H__ -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_SUID_CPU 0 #define GLIBTOP_SUID_MEM 0 @@ -45,6 +45,6 @@ __BEGIN_DECLS #define GLIBTOP_SUID_NETLOAD 0 #define GLIBTOP_SUID_PPP 0 -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/kernel/kernel.h b/sysdeps/kernel/kernel.h index e7380d64..11c38eab 100644 --- a/sysdeps/kernel/kernel.h +++ b/sysdeps/kernel/kernel.h @@ -29,10 +29,10 @@ #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS extern int table (int, union table *, const void *); -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/linux/glibtop_machine.h b/sysdeps/linux/glibtop_machine.h index a1c789ed..09f6f12f 100644 --- a/sysdeps/linux/glibtop_machine.h +++ b/sysdeps/linux/glibtop_machine.h @@ -26,7 +26,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #if _IN_LIBGTOP @@ -51,6 +51,6 @@ struct _glibtop_machine char proc_status [BUFSIZ]; }; -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/linux/glibtop_server.h b/sysdeps/linux/glibtop_server.h index ed03578e..a36eec22 100644 --- a/sysdeps/linux/glibtop_server.h +++ b/sysdeps/linux/glibtop_server.h @@ -25,7 +25,7 @@ #include #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #ifdef _IN_LIBGTOP @@ -127,6 +127,6 @@ proc_stat_after_cmd (char *p) #define GLIBTOP_SUID_NETLOAD 0 #define GLIBTOP_SUID_PPP 0 -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/osf1/glibtop_machine.h b/sysdeps/osf1/glibtop_machine.h index 12c28c60..4bc03913 100644 --- a/sysdeps/osf1/glibtop_machine.h +++ b/sysdeps/osf1/glibtop_machine.h @@ -30,9 +30,9 @@ #undef user #undef idle -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS -extern int table __P((int id, int index, char *addr, int nel, u_int lel)); +int table (int id, int index, char *addr, int nel, u_int lel); typedef struct _glibtop_machine glibtop_machine; @@ -43,6 +43,6 @@ struct _glibtop_machine unsigned proctable_entries; /* Max entries in the proctable */ }; -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/osf1/glibtop_server.h b/sysdeps/osf1/glibtop_server.h index 0c925cbf..d3a86de2 100644 --- a/sysdeps/osf1/glibtop_server.h +++ b/sysdeps/osf1/glibtop_server.h @@ -22,7 +22,7 @@ #ifndef __GLIBTOP_SERVER_H__ #define __GLIBTOP_SERVER_H__ -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_SUID_CPU 0 #define GLIBTOP_SUID_MEM 0 @@ -41,6 +41,6 @@ __BEGIN_DECLS #define GLIBTOP_SUID_PROC_KERNEL (1 << GLIBTOP_SYSDEPS_PROC_KERNEL) #define GLIBTOP_SUID_PROC_SEGMENT (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT) -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/osf1/glibtop_suid.h b/sysdeps/osf1/glibtop_suid.h index f6faaf38..3b40c0ac 100644 --- a/sysdeps/osf1/glibtop_suid.h +++ b/sysdeps/osf1/glibtop_suid.h @@ -24,7 +24,7 @@ #include -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS static inline void glibtop_suid_enter (glibtop *server) { setreuid (server->machine.uid, server->machine.euid); @@ -35,10 +35,14 @@ static inline void glibtop_suid_leave (glibtop *server) { _exit (1); }; -extern void glibtop_init_p __P((glibtop *, const unsigned long, const unsigned)); +void +glibtop_init_p (glibtop *server, const unsigned long features, + const unsigned flags); +void +glibtop_open_p (glibtop *server, const char *program_name, + const unsigned long features, + const unsigned flags); -extern void glibtop_open_p __P((glibtop *, const char *, const unsigned long, const unsigned)); - -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/stub/glibtop_server.h b/sysdeps/stub/glibtop_server.h index 48485001..f6c7def8 100644 --- a/sysdeps/stub/glibtop_server.h +++ b/sysdeps/stub/glibtop_server.h @@ -22,7 +22,7 @@ #ifndef __GLIBTOP_SERVER_H__ #define __GLIBTOP_SERVER_H__ -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_SUID_CPU 0 #define GLIBTOP_SUID_MEM 0 @@ -45,6 +45,6 @@ __BEGIN_DECLS #define GLIBTOP_SUID_NETLOAD 0 #define GLIBTOP_SUID_PPP 0 -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/stub_suid/glibtop_machine.h b/sysdeps/stub_suid/glibtop_machine.h index f32bc787..5627b66e 100644 --- a/sysdeps/stub_suid/glibtop_machine.h +++ b/sysdeps/stub_suid/glibtop_machine.h @@ -22,7 +22,7 @@ #ifndef __GLIBTOP_MACHINE_H__ #define __GLIBTOP_MACHINE_H__ -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS typedef struct _glibtop_machine glibtop_machine; @@ -32,6 +32,6 @@ struct _glibtop_machine gid_t gid, egid; /* Real and effective group id */ }; -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/stub_suid/glibtop_server.h b/sysdeps/stub_suid/glibtop_server.h index ab051092..d1f2aeb9 100644 --- a/sysdeps/stub_suid/glibtop_server.h +++ b/sysdeps/stub_suid/glibtop_server.h @@ -22,7 +22,7 @@ #ifndef __GLIBTOP_SERVER_H__ #define __GLIBTOP_SERVER_H__ -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_SUID_CPU (1 << GLIBTOP_SYSDEPS_CPU) #define GLIBTOP_SUID_MEM (1 << GLIBTOP_SYSDEPS_MEM) @@ -45,6 +45,6 @@ __BEGIN_DECLS #define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD) #define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP) -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/stub_suid/glibtop_suid.h b/sysdeps/stub_suid/glibtop_suid.h index 349d8f2a..659bad5d 100644 --- a/sysdeps/stub_suid/glibtop_suid.h +++ b/sysdeps/stub_suid/glibtop_suid.h @@ -22,7 +22,7 @@ #ifndef __GLIBTOP_SUID_H__ #define __GLIBTOP_SUID_H__ -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS static inline void glibtop_suid_enter (glibtop *server) { setreuid (server->machine.uid, server->machine.euid); @@ -33,10 +33,14 @@ static inline void glibtop_suid_leave (glibtop *server) { _exit (1); }; -extern void glibtop_init_p __P((glibtop *, const unsigned long, const unsigned)); +void +glibtop_init_p (glibtop *server, const unsigned long features, + const unsigned flags); +void +glibtop_open_p (glibtop *server, const char *program_name, + const unsigned long features, + const unsigned flags); -extern void glibtop_open_p __P((glibtop *, const char *, const unsigned long, const unsigned)); - -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/sun4/glibtop_machine.h b/sysdeps/sun4/glibtop_machine.h index 662cf03c..4aded8ff 100644 --- a/sysdeps/sun4/glibtop_machine.h +++ b/sysdeps/sun4/glibtop_machine.h @@ -46,7 +46,7 @@ #include "loadavg.h" -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS /* Older versions of SunOS don't have a typedef for pid_t. Hopefully this will catch all those cases without causing other problems. @@ -102,16 +102,14 @@ struct _glibtop_machine extern struct nlist _glibtop_nlist[]; -extern int _glibtop_check_nlist __P((void *, register struct nlist *)); - -extern int _glibtop_getkval __P((void *, unsigned long, int *, int, char *)); - -extern void _glibtop_read_proc_table __P((void *)); - -extern struct proc *_glibtop_find_pid __P((void *, pid_t)); +int _glibtop_check_nlist (void *server, register struct nlist *nlst); +int _glibtop_getkval (void *void_server, unsigned long offset, int *ptr, + int size, char *refstr); +void _glibtop_read_proc_table (void *void_server); +struct proc *_glibtop_find_pid (void *void_server, pid_t pid); #endif -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/sun4/glibtop_server.h b/sysdeps/sun4/glibtop_server.h index 199991ac..2e828022 100644 --- a/sysdeps/sun4/glibtop_server.h +++ b/sysdeps/sun4/glibtop_server.h @@ -22,7 +22,7 @@ #ifndef __GLIBTOP_SERVER_H__ #define __GLIBTOP_SERVER_H__ -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS #define GLIBTOP_SUID_CPU (1 << GLIBTOP_SYSDEPS_CPU) #define GLIBTOP_SUID_MEM (1 << GLIBTOP_SYSDEPS_MEM) @@ -42,6 +42,6 @@ __BEGIN_DECLS #define GLIBTOP_SUID_PROC_SEGMENT (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT) #define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP) -__END_DECLS +END_LIBGTOP_DECLS #endif diff --git a/sysdeps/sun4/glibtop_suid.h b/sysdeps/sun4/glibtop_suid.h index bff87930..063ee71d 100644 --- a/sysdeps/sun4/glibtop_suid.h +++ b/sysdeps/sun4/glibtop_suid.h @@ -22,7 +22,7 @@ #ifndef __GLIBTOP_SUID_H__ #define __GLIBTOP_SUID_H__ -__BEGIN_DECLS +BEGIN_LIBGTOP_DECLS static inline void glibtop_suid_enter (glibtop *server) { setregid (server->machine.gid, server->machine.egid); @@ -33,10 +33,14 @@ static inline void glibtop_suid_leave (glibtop *server) { _exit (1); }; -extern void glibtop_init_p __P((glibtop *, const unsigned long, const unsigned)); +void +glibtop_init_p (glibtop *server, const unsigned long features, + const unsigned flags); +void +glibtop_open_p (glibtop *server, const char *program_name, + const unsigned long features, + const unsigned flags); -extern void glibtop_open_p __P((glibtop *, const char *, const unsigned long, const unsigned)); - -__END_DECLS +END_LIBGTOP_DECLS #endif