Replace all __BEGIN_DELCS with LIBGTOP_BEGIN_DECLS and all __END_DECLS
1999-02-19 Martin Baulig <martin@home-of-linux.org> * 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.
This commit is contained in:
committed by
Martin Baulig
parent
2b96f77245
commit
1272d38f72
@@ -36,7 +36,7 @@
|
||||
#include <osreldate.h>
|
||||
#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__
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
|
||||
#include <syscall.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
BEGIN_LIBGTOP_DECLS
|
||||
|
||||
extern int table (int, union table *, const void *);
|
||||
|
||||
__END_DECLS
|
||||
END_LIBGTOP_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <ctype.h>
|
||||
|
||||
__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
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <ctype.h>
|
||||
|
||||
__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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <sys/table.h>
|
||||
|
||||
__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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user