[collectd] Compiling on HP-UX
Jeff Haney
jah at clan-rum.org
Mon Nov 6 16:56:23 CET 2006
Hi octo,
Have you had a chance to look at this? Was this the information you
needed? Thanks again for any help with this.
-jeff
Jeff Haney wrote:
> Hi octo,
>
> It seems that the only include is mntent.h
>
> SYNOPSIS
> #include <mntent.h>
> FILE *setmntent(const char *path, char *type);
> struct mntent *getmntent(FILE *stream);
> int getmntent_r(
> FILE *stream,
> struct mntent *result,
> char *buffer,
> int buflen);
> int addmntent(FILE *stream, struct mntent *mnt);
> int delmntent(FILE *stream, struct mntent *mnt);
> char *hasmntopt(struct mntent *mnt, const char *opt);
> int endmntent(FILE *stream);
-------------- next part --------------
/* @(#)B11.23_LR$Revision: ../hdr/mntent.h@@/main/i80/12 $ */
/*
* File system table, see checklist(4)
*
* Used by dump, mount, umount, swapon, fsck, df, ...
*
*/
#ifndef _MNTENT_INCLUDED /* allow multiple inclusions */
#define _MNTENT_INCLUDED
#ifndef _SYS_STDSYMS_INCLUDED
# include <sys/stdsyms.h>
#endif /* _SYS_STDSYMS_INCLUDED */
#ifdef _INCLUDE_HPUX_SOURCE
#define MNT_CHECKLIST "/etc/fstab"
#define MNT_MNTTAB "/etc/mnttab"
#include <stdio.h>
#ifndef _FAST_SHLIB_CALLS
# if defined(_HP_SHLIB_CALLS) && !defined(__LP64__)
# define _FAST_SHLIB_CALLS
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define MNTMAXSTR 128
#define MNTTYPE_HFS "hfs" /* HP HFS file system. */
#define MNTTYPE_CDFS "cdfs" /* CD-ROM file system. */
#define MNTTYPE_NFS "nfs" /* NFS Version 2 file system */
#define MNTTYPE_NFS3 "nfs3" /* NFS Version 3 file system */
#define MNTTYPE_CACHEFS "cachefs" /* Cache File System */
#define MNTTYPE_VXFS "vxfs" /* VxFS file system */
#define MNTTYPE_LOFS "lofs" /* Loopback file system */
#define MNTTYPE_SWAP "swap" /* Swap device */
#define MNTTYPE_SWAPFS "swapfs" /* File system swap */
#define MNTTYPE_DUMP "dump" /* Dump file system */
#define MNTTYPE_IGNORE "ignore" /* Ignore this entry */
#define MNTTYPE_DFS "dfs" /* HP DFS file system. */
#define MNTTYPE_AUTOFS "autofs" /* autofs file system */
/*
* WARNING: Any options added here will not show up in /etc/mnttab
* unless they are also added to the update_mnttab(3x) libarary.
*/
#define MNTOPT_DEFAULTS "defaults" /* use all default opts */
#define MNTOPT_RO "ro" /* read only */
#define MNTOPT_RW "rw" /* read/write */
#define MNTOPT_SUID "suid" /* set uid allowed */
#define MNTOPT_NOSUID "nosuid" /* no set uid allowed */
#define MNTOPT_NOAUTO "noauto" /* Don't automatically mount with -a. */
#define MNTOPT_DEV "dev" /* Device ID of the file system mounted */
/*
* Large Files Mount Options
*/
#define MNTOPT_LARGEFILES "largefiles"
#define MNTOPT_NOLARGEFILES "nolargefiles"
/*
* CDCASE mount option
*/
#define MNTOPT_CDCASE "cdcase" /* Support case folding & Vers suppression */
/*
* UFS/HFS specific options
* WARNING: Any options added here will not show up in /etc/mnttab
* unless they are also added to the update_mnttab(3x) libarary.
*/
#define MNTOPT_DELAYED "delayed" /* delayed writes to disk; 700 default*/
#define MNTOPT_BEHIND "behind" /* write async'ly to disk; 800 default*/
#define MNTOPT_FSASYNC "fsasync" /* async update */
#define MNTOPT_NOFSASYNC "nofsasync" /* no async update - default */
/*
* NFS specific options
* WARNING: Any options added here will not show up in /etc/mnttab
* unless they are also added to the update_mnttab(3x) libarary.
*/
#define MNTOPT_BG "bg" /* Retry mount in background */
#define MNTOPT_FG "fg" /* Retry mount in foreground */
#define MNTOPT_RETRY "retry" /* Number of retries allowed. */
#define MNTOPT_RSIZE "rsize" /* Read buffer size in bytes. */
#define MNTOPT_WSIZE "wsize" /* Write buffer size in bytes. */
#define MNTOPT_TIMEO "timeo" /* Timeout in 1/10's of seconds. */
#define MNTOPT_RETRANS "retrans" /* Number of retransmissions. */
#define MNTOPT_PORT "port" /* IP on server for requests. */
#define MNTOPT_SOFT "soft" /* soft mount */
#define MNTOPT_HARD "hard" /* hard mount */
#define MNTOPT_INTR "intr" /* Allow interrupts to hard mounts. */
#define MNTOPT_NOINTR "nointr" /* Don't allow interrupts to hard mounts. */
#define MNTOPT_DEVS "devs" /* Allow device file access */
#define MNTOPT_NODEVS "nodevs" /* Don't allow device file access */
#define MNTOPT_NOAC "noac" /* suppress fress attributes on file open */
#define MNTOPT_NOCTO "nocto" /* suppress attribute & name(lookup) caching */
#define MNTOPT_ACTIMEO "actimeo" /* attr cache timeout (sec) */
#define MNTOPT_ACREGMIN "acregmin" /* min ac timeout for reg files (sec) */
#define MNTOPT_ACREGMAX "acregmax" /* max ac timeout for reg files (sec) */
#define MNTOPT_ACDIRMIN "acdirmin" /* min ac timeout for dirs (sec) */
#define MNTOPT_ACDIRMAX "acdirmax" /* max ac timeout for dirs (sec) */
#define MNTOPT_SEMISOFT "semisoft" /* partial soft, uncommited interface */
#define MNTOPT_GRPID "grpid" /* SysV-compatible gid on create */
#define MNTOPT_REMOUNT "remount" /* Change mount options */
#define MNTOPT_SECURE "secure" /* Secure (AUTH_DES) mounting */
#define MNTOPT_POSIX "posix" /* Get static pathconf for mount */
#define MNTOPT_LLOCK "llock" /* Local locking (no lock manager) */
#define MNTOPT_VERS "vers" /* protocol version number indicator */
#define MNTOPT_PROTO "proto" /* protocol network_id indicator */
#define MNTOPT_SEC "sec" /* Security flavor indicator */
#define MNTOPT_NOPRINT "noprint" /* Do not print messages */
#define MNTOPT_FORCEDIRECTIO "forcedirectio" /* Force DirectIO on all files */
#define MNTOPT_NOFORCEDIRECTIO "noforcedirectio" /* No Force DirectIO */
#define MNTOPT_PUBLIC "public" /* Use NFS public file handle */
#define MNTOPT_OVERLAY "overlay" /* Overlay mount */
#define MNTOPT_DEBUG "debug" /* Turn debug on */
/*
* VxFS-specific options
*/
#define MNTOPT_LOG "log"
#define MNTOPT_DELAYLOG "delaylog"
#define MNTOPT_TMPLOG "tmplog"
#define MNTOPT_NOLOG "nolog"
#define MNTOPT_BLKCLEAR "blkclear"
#define MNTOPT_DATAINLOG "datainlog"
#define MNTOPT_NODATAINLOG "nodatainlog"
#define MNTOPT_SNAPOF "snapof"
#define MNTOPT_SNAPSIZE "snapsize"
#define MNTOPT_MINCACHE "mincache"
#define NMTOPT_CLOSESYNC "closesync"
#define MNTOPT_DIRECT "direct"
#define MNTOPT_DSYNC "dsync"
#define MNTOPT_TMPCACHE "tmpcache"
#define MNTOPT_CONVOSYNC "convosync"
#define MNTOPT_DELAY "delay"
#define MNTOPT_TRANFLUSH "tranflush"
/*
* Device swap options
*/
#define MNTOPT_END "end" /* swap after end of file system- S300 only */
/*
* File system swap options
*/
#define MNTOPT_MIN "min" /* minimum file system swap */
#define MNTOPT_LIM "lim" /* maximum file system swap */
#define MNTOPT_RES "res" /* reserve space for file system */
#define MNTOPT_PRI "pri" /* file system swap priority */
/*
* Quota options
*/
#define MNTOPT_QUOTA "quota" /* Allow disc quotas */
#define MNTOPT_NOQUOTA "noquota" /* Don't allow disc quotas */
/*
* Boot options
*/
#define MNTOPT_BOOT "boot" /* boot-time mounting for diskless */
/*
* Default mode for /etc/mnttab, and default sizes for NFS mount options
*/
#define MNTTAB_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)
#define DEFAULT_WSIZE NFS_MAXDATA /* NFS default defines */
#define DEFAULT_RSIZE NFS_MAXDATA
#define DEFAULT_PORT NFS_PORT
#define DEFAULT_TIMEO 7
#define DEFAULT_RETRANS 4
#define DEFAULT_RETRY 1
#define DEFAULT_ACREGMIN 3
#define DEFAULT_ACREGMAX 60
#define DEFAULT_ACDIRMIN 30
#define DEFAULT_ACDIRMAX 60
struct mntent{
char *mnt_fsname; /* name of mounted file system */
char *mnt_dir; /* file system path prefix */
char *mnt_type; /* MNTTYPE_* */
char *mnt_opts; /* MNTOPT* */
int mnt_freq; /* dump frequency, in days */
int mnt_passno; /* pass number on parallel fsck */
long mnt_time; /* Time this filesystem was mounted */
unsigned short mnt_cnode; /* OBSOLETE */
};
#ifdef _HP_SHLIB_CALLS
# pragma HP_DEFINED_EXTERNAL addmntent,delmntent,getmntent
# pragma HP_DEFINED_EXTERNAL hasmntopt,setmntent,endmntent
#endif /* _HP_SHLIB_CALLS */
#ifdef _FAST_SHLIB_CALLS
# pragma HP_NO_RELOCATION addmntent,delmntent,getmntent
# pragma HP_NO_RELOCATION hasmntopt,setmntent,endmntent
# pragma HP_LONG_RETURN addmntent,delmntent,getmntent
# pragma HP_LONG_RETURN hasmntopt,setmntent,endmntent
#endif /* _FAST_SHLIB_CALLS */
#if defined(__ia64)
/* pragmas needed to support -B protected */
# pragma extern addmntent, delmntent, getmntent
# ifdef _PTHREADS_DRAFT4
# pragma extern getmntent_r
# endif /* _PTHREADS_DRAFT4 */
# pragma extern hasmntopt, setmntent, endmntent
#endif /* __ia64 */
#if defined(__STDC__) || defined(__cplusplus)
extern int addmntent(FILE *, struct mntent *);
extern int delmntent(FILE *, struct mntent *);
extern struct mntent *getmntent(FILE *);
#ifdef _PTHREADS_DRAFT4
extern int getmntent_r(FILE *, struct mntent *, char *, int);
#endif /* _PTHREADS_DRAFT4 */
extern char *hasmntopt(struct mntent *, const char *);
extern FILE *setmntent(const char *, const char *);
extern int endmntent(FILE *);
#else /* not __STDC__ defined(__STDC__) || defined(__cplusplus)*/
extern int addmntent();
extern int delmntent();
extern struct mntent *getmntent();
#ifdef _PTHREADS_DRAFT4
extern int getmntent_r();
#endif /* _PTHREADS_DRAFT4 */
extern char *hasmntopt();
extern FILE *setmntent();
extern int endmntent();
#endif /* else not __STDC__ || __cplusplus */
/* for compatibility: */
#define MNTTAB MNT_CHECKLIST
#define MOUNTED MNT_MNTTAB
#define MNTTYPE_43 MNTTYPE_HFS
#define MNTTYPE_UFS "ufs"
#ifdef __cplusplus
}
#endif
#endif /* _INCLUDE_HPUX_SOURCE */
#endif /* _MNTENT_INCLUDED */
More information about the collectd
mailing list