- fixed compilation

This commit is contained in:
Bastien Nocera
2003-10-20 15:20:16 +00:00
parent ba36a20cb8
commit b67e4c7f7d
166 changed files with 434 additions and 333 deletions

View File

@@ -26,13 +26,13 @@
#include <glibtop.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
void glibtop_close_r (glibtop *server);
void glibtop_close_s (glibtop *server);
void glibtop_close_p (glibtop *server);
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -28,7 +28,7 @@
#include <glibtop/sysdeps.h>
#include <glibtop/union.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_CMND_QUIT 0
#define GLIBTOP_CMND_SYSDEPS 1
@@ -97,6 +97,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_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_CPU_TOTAL 0
#define GLIBTOP_CPU_USER 1
@@ -94,6 +94,6 @@ extern const char *glibtop_descriptions_cpu [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -26,7 +26,7 @@
#include <glibtop.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#ifndef G_GNUC_UNUSED
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
@@ -131,6 +131,6 @@ glibtop_warn_io (char *format, ...)
#endif /* no __GNUC__ */
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_FSUSAGE_BLOCKS 0
#define GLIBTOP_FSUSAGE_BFREE 1
@@ -67,6 +67,6 @@ extern const char *glibtop_descriptions_fsusage [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -24,43 +24,14 @@
#ifndef __GLIBTOP_GLOBAL_H__
#define __GLIBTOP_GLOBAL_H__
#include <glib.h>
#ifdef _IN_LIBGTOP
#include <config.h>
#endif
/*
* All declarations are enclosed in BEGIN_LIBGTOP_DECLS and
* END_LIBGTOP_DECLS so that C++ compilers don't mangle their names.
*
*/
#undef BEGIN_LIBGTOP_DECLS
#undef END_LIBGTOP_DECLS
#ifdef __cplusplus
# define BEGIN_LIBGTOP_DECLS extern "C" {
# define END_LIBGTOP_DECLS }
#else
# define BEGIN_LIBGTOP_DECLS /* empty */
# define END_LIBGTOP_DECLS /* empty */
#endif
#ifdef _IN_LIBGTOP
/* Provide macros to feature the GCC function attribute.
*/
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
#define G_GNUC_NORETURN \
__attribute__((noreturn))
#define G_GNUC_CONST \
__attribute__((const))
#define G_GNUC_UNUSED \
__attribute__((unused))
#else /* !__GNUC__ */
#define G_GNUC_NORETURN
#define G_GNUC_CONST
#define G_GNUC_UNUSED
#endif /* !__GNUC__ */
#endif /* _IN_LIBGTOP */
#if TIME_WITH_SYS_TIME
@@ -74,27 +45,6 @@
# endif
#endif
#ifdef NEED_GNOMESUPPORT_H
#include <gnomesupport.h>
#endif
#ifdef WITHOUT_GUILE
#undef GLIBTOP_GUILE
#undef GLIBTOP_GUILE_NAMES
#endif
#ifdef GLIBTOP_GUILE
#include <guile/gh.h>
#endif
#ifdef _IN_LIBGTOP
#if (defined HAVE_LIBINTL_H) || (defined HAVE_GETTEXT)
#include <libintl.h>
#else
#include <libgettext.h>
#endif
#endif
#include <stdio.h>
#include <stdlib.h>
@@ -124,18 +74,13 @@
#ifdef _IN_LIBGTOP
BEGIN_LIBGTOP_DECLS
#ifndef _
#define _(String) dgettext (PACKAGE, String)
#define N_(String) (String)
#endif
G_BEGIN_DECLS
#ifndef HAVE_STRERROR
char *strerror (int errno);
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif /* _IN_LIBGTOP */

View File

@@ -31,7 +31,7 @@
#define GLIBTOP_INODEDB_ALL 7
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
typedef struct _glibtop_inodedb glibtop_inodedb;
@@ -62,6 +62,6 @@ glibtop_inodedb_lookup_s (glibtop *server,
void
glibtop_inodedb_close_s (glibtop *server, glibtop_inodedb *inodedb);
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_LOADAVG_LOADAVG 0
#define GLIBTOP_LOADAVG_NR_RUNNING 1
@@ -76,6 +76,6 @@ extern const char *glibtop_descriptions_loadavg [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_MEM_TOTAL 0
#define GLIBTOP_MEM_USED 1
@@ -84,6 +84,6 @@ extern const char *glibtop_descriptions_mem [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_MOUNTLIST_NUMBER 0
#define GLIBTOP_MOUNTLIST_TOTAL 1
@@ -76,6 +76,6 @@ extern const char *glibtop_descriptions_mountlist [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_IPC_MSGPOOL 0
#define GLIBTOP_IPC_MSGMAP 1
@@ -82,7 +82,7 @@ extern const char *glibtop_descriptions_msg_limits [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_NETLOAD_IF_FLAGS 0
#define GLIBTOP_NETLOAD_MTU 1
@@ -115,6 +115,6 @@ extern const char *glibtop_descriptions_netload [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -26,7 +26,7 @@
#include <glibtop/read.h>
#include <glibtop/error.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define _GLIBTOP_INIT_STATE_INIT 0x10000
#define _GLIBTOP_INIT_STATE_OPEN 0x20000
@@ -68,6 +68,6 @@ glibtop_open_s (glibtop *server, const char *program_name,
const unsigned long features, const unsigned flags);
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/open.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_PARAM_METHOD 1
#define GLIBTOP_PARAM_FEATURES 2
@@ -46,6 +46,6 @@ void
glibtop_set_parameter_l (glibtop *server, const unsigned parameter,
const void *data_ptr, size_t data_size);
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_PPP_STATE 0
#define GLIBTOP_PPP_BYTES_IN 1
@@ -80,6 +80,6 @@ extern const char *glibtop_descriptions_ppp [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_PROC_ARGS_SIZE 0
@@ -78,6 +78,6 @@ extern const char *glibtop_descriptions_proc_args [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_PROC_KERNEL_K_FLAGS 0
#define GLIBTOP_PROC_KERNEL_MIN_FLT 1
@@ -93,6 +93,6 @@ extern const char *glibtop_descriptions_proc_kernel [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_PROCLIST_NUMBER 0
#define GLIBTOP_PROCLIST_TOTAL 1
@@ -99,6 +99,6 @@ extern const char *glibtop_descriptions_proclist [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_PROC_MAP_NUMBER 0
#define GLIBTOP_PROC_MAP_TOTAL 1
@@ -105,6 +105,6 @@ extern const char *glibtop_descriptions_proc_map [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_PROC_MEM_SIZE 0
#define GLIBTOP_PROC_MEM_VSIZE 1
@@ -84,6 +84,6 @@ extern const char *glibtop_descriptions_proc_mem [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_PROC_SEGMENT_TEXT_RSS 0
#define GLIBTOP_PROC_SEGMENT_SHLIB_RSS 1
@@ -87,6 +87,6 @@ extern const char *glibtop_descriptions_proc_segment [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_PROC_SIGNAL_SIGNAL 0
#define GLIBTOP_PROC_SIGNAL_BLOCKED 1
@@ -78,6 +78,6 @@ extern const char *glibtop_descriptions_proc_signal [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_PROC_STATE_CMD 0
#define GLIBTOP_PROC_STATE_STATE 1
@@ -85,6 +85,6 @@ extern const char *glibtop_descriptions_proc_state [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -28,7 +28,7 @@
#include <glibtop/cpu.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_PROC_TIME_START_TIME 0
#define GLIBTOP_PROC_TIME_RTIME 1
@@ -99,6 +99,6 @@ extern const char *glibtop_descriptions_proc_time [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_PROC_UID_UID 0
#define GLIBTOP_PROC_UID_EUID 1
@@ -94,6 +94,6 @@ extern const char *glibtop_descriptions_proc_uid [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,13 +27,13 @@
#include <glibtop.h>
#include <glibtop/error.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_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_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,13 +27,13 @@
#include <glibtop.h>
#include <glibtop/error.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_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_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_IPC_SEMMAP 0
#define GLIBTOP_IPC_SEMMNI 1
@@ -88,6 +88,6 @@ extern const char *glibtop_descriptions_sem_limits [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_IPC_SHMMAX 0
#define GLIBTOP_IPC_SHMMIN 1
@@ -78,6 +78,6 @@ extern const char *glibtop_descriptions_shm_limits [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -30,7 +30,7 @@
#include <sys/signal.h>
#endif
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
typedef struct _glibtop_signame glibtop_signame;
@@ -42,6 +42,6 @@ struct _glibtop_signame
extern const glibtop_signame glibtop_sys_siglist [];
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_SWAP_TOTAL 0
#define GLIBTOP_SWAP_USED 1
@@ -78,6 +78,6 @@ extern const char *glibtop_descriptions_swap [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -26,7 +26,7 @@
#include <glibtop.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_SYSDEPS_FEATURES 0
#define GLIBTOP_SYSDEPS_CPU 1
@@ -105,6 +105,6 @@ extern const char *glibtop_descriptions_sysdeps [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -30,7 +30,7 @@
#include <glib.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_SYSINFO_CPUINFO 0
@@ -59,6 +59,6 @@ struct _glibtop_sysinfo
glibtop_sysinfo *glibtop_get_sysinfo_s (glibtop *server);
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_TYPES_H__
#define __GLIBTOP_TYPES_H__
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_TYPE_LONG 1
#define GLIBTOP_TYPE_ULONG 2
@@ -33,6 +33,6 @@ BEGIN_LIBGTOP_DECLS
#define GLIBTOP_TYPE_CHAR 5
#define GLIBTOP_TYPE_STRING 6
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -50,7 +50,7 @@
#include <glibtop/netload.h>
#include <glibtop/ppp.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
typedef union _glibtop_union glibtop_union;
@@ -80,6 +80,6 @@ union _glibtop_union
glibtop_ppp ppp;
};
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#define GLIBTOP_UPTIME_UPTIME 0
#define GLIBTOP_UPTIME_IDLETIME 1
@@ -72,6 +72,6 @@ extern const char *glibtop_descriptions_uptime [];
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -29,7 +29,7 @@
#define LIBGTOP_VERSION_STRING "Libgtop %s server version %s (%u,%u,%u,%u)."
BEGIN_LIBGTOP_DECLS
G_BEGIN_DECLS
#if _IN_LIBGTOP
@@ -37,6 +37,6 @@ void glibtop_send_version (glibtop *server, int fd);
#endif
END_LIBGTOP_DECLS
G_END_DECLS
#endif

View File

@@ -27,13 +27,13 @@
#include <glibtop.h>
#include <glibtop/error.h>
BEGIN_LIBGTOP_DECLS
G_BEGIN_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_LIBGTOP_DECLS
G_END_DECLS
#endif