On Jan 15,  5:56pm, Jarkko Hietaniemi wrote:
> On Tue, Jan 15, 2002 at 05:48:52PM -0500, Ed Allen Smith wrote:
> > This distribution has been tested as part of the cpan-testers
> > effort to test as many new uploads to CPAN as possible.  See
> > http://testers.cpan.org/
> > 
> > Please cc any replies to [EMAIL PROTECTED] to keep other
> > test volunteers informed and to prevent any duplicate effort.
> > 
> > -- 
> > This module believes that there is no /usr/include/sys/resource.h, when it
> > does exist:
> 
> (1) Can you compile (cc -c, no linking) this C program?
> 
> #include <sys/resource.h>
> static int foo;

Yes. 

> (2) What do the following commands show?
> 
> perl -V:cc

cc='cc -n32 -mips4 -TARG:platform=ip32';

> perl -V:ccflags

ccflags='-D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -DLANGUAGE_C 
-I/server/people/staff/easmith/include -DDEBUGGING';

>    Does the C compiler show by -V:cc exist in your system?

Yes. It is capable of compiling the above program. cc -n32 -mips4
-TARG:platform=ip32 -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184
-DLANGUAGE_C -I/server/people/staff/easmith/include -DDEBUGGING -c
also compiles it.

BTW, getrusage, getrlimit, getrlimit64, setrlimit, setrlimit64,
getpriority, and setpriority all exist on IRIX 6.5. The *64 versions:
        "getrlimit64 and setrlimit64 allow 32-bit programs to set
        64-bit limits. This is particularly useful for shells and
        other 32-bit programs which fork 64-bit binaries.  Unless
        otherwise specified, getrlimit64 and setrlimit64 function in
        exactly the same manner as getrlimit and setrlimit."

        "getrlimit64 and setrlimit64 are provided to allow 32 bit
        applications to manipulate 64 bit limit values.  For example,
        the RLIMIT_FSIZE can be set as large as 0xffffffffff with
        setrlimit64 when using the xfs filesystem."

     "When using the 64 bit interfaces, limits may have an infinite
     value of RLIM64_INFINITY (0x7fffffffffffffff).  In this case rlp
     is a pointer to struct rlimit64 that includes the following
     members:

          rlim64_t         rlim_cur;/* current (soft) limit */
          rlim64_t         rlim_max;/* hard limit */

     rlim64_t is an arithmetic data type to which objects of type long
     long and off64_t can be cast without loss of information."

/usr/include/sys/resources.h:

/*
 * Copyright (c) 1982, 1986 Regents of the University of California.
 * All rights reserved.  The Berkeley software License Agreement
 * specifies the terms and conditions for redistribution.
 *
 *      @(#)resource.h  7.1 (Berkeley) 6/4/86
 */
#ifndef _SYS_RESOURCE_H
#define _SYS_RESOURCE_H

#ifdef __cplusplus
extern "C" {
#endif

#include <standards.h>
#include <sgidefs.h>
#include <sys/types.h>

/*
 * from sys/time.h
 */
#ifndef _TIMEVAL_T
#define _TIMEVAL_T
struct timeval {
#if _MIPS_SZLONG == 64
        __int32_t :32;
#endif
        time_t  tv_sec;         /* seconds */
        long    tv_usec;        /* and microseconds */
};

/*
 * Since SVID API explicitly gives timeval struct to contain longs ...
 * Thus need a second timeval struct for 64bit binaries to correctly
 * access specific files (ie. struct utmpx in utmpx.h).
 */
struct __irix5_timeval {
        __int32_t    tv_sec;         /* seconds */
        __int32_t    tv_usec;        /* and microseconds */
};
#endif /* _TIMEVAL_T */

/*
 * Process priority specifications to get/setpriority.
 */
#define PRIO_MIN        -20
#define PRIO_MAX        20

#define PRIO_PROCESS    0
#define PRIO_PGRP       1
#define PRIO_USER       2

/*
 * Resource utilization information.
 */

#define RUSAGE_SELF     0
#define RUSAGE_CHILDREN -1

struct  rusage {
        struct timeval ru_utime;        /* user time used */
        struct timeval ru_stime;        /* system time used */
#if _ABIAPI
        long    ru_pad[14];
#else
        long    ru_maxrss;
#define ru_first        ru_ixrss
        long    ru_ixrss;               /* integral shared memory size */
        long    ru_idrss;               /* integral unshared data " */
        long    ru_isrss;               /* integral unshared stack " */
        long    ru_minflt;              /* page reclaims */
        long    ru_majflt;              /* page faults */
        long    ru_nswap;               /* swaps */
        long    ru_inblock;             /* block input operations */
        long    ru_oublock;             /* block output operations */
        long    ru_msgsnd;              /* messages sent */
        long    ru_msgrcv;              /* messages received */
        long    ru_nsignals;            /* signals received */
        long    ru_nvcsw;               /* voluntary context switches */
        long    ru_nivcsw;              /* involuntary " */
#define ru_last         ru_nivcsw
#endif  /* _ABIAPI */
};

/*
 * Resource limits
 */
#define RLIMIT_CPU      0               /* cpu time in seconds */
#define RLIMIT_FSIZE    1               /* maximum file size */
#define RLIMIT_DATA     2               /* data size */
#define RLIMIT_STACK    3               /* stack size */
#define RLIMIT_CORE     4               /* core file size */
#define RLIMIT_NOFILE   5               /* file descriptors */
#define RLIMIT_VMEM     6               /* maximum mapped memory */
#define RLIMIT_RSS      7               /* resident set size */
#define RLIMIT_AS       RLIMIT_VMEM
#define RLIMIT_PTHREAD  8               /* pthreads */

#define RLIM_NLIMITS    9               /* number of resource limits */

#ifdef _KERNEL
#define RLIM_INFINITY   0x7fffffffffffffffLL
#define RLIM32_INFINITY 0x7fffffff
#elif (_MIPS_SZLONG == 64) || (_MIPS_SIM == _ABIN32)
#define RLIM_INFINITY   0x7fffffffffffffffLL
#else
#define RLIM_INFINITY   0x7fffffff
#endif /* _KERNEL */

#if _LFAPI
#define RLIM64_SAVED_CUR        0x7ffffffffffffffdLL
#define RLIM64_SAVED_MAX        0x7ffffffffffffffeLL
#define RLIM64_INFINITY         0x7fffffffffffffffLL
#endif  /* _LFAPI */

#if _LFAPI || _XOPEN5
#define RLIM_SAVED_CUR          0x7ffffffd
#define RLIM_SAVED_MAX          0x7ffffffe
#endif

#ifdef _KERNEL
typedef __uint64_t rlim_t;
#elif _MIPS_SIM == _ABIN32
typedef __uint64_t rlim_t;
#else
typedef unsigned long rlim_t;
#endif

struct rlimit {
        rlim_t  rlim_cur;               /* current (soft) limit */
        rlim_t  rlim_max;               /* maximum value for rlim_cur */
};

#if _LFAPI
typedef __uint64_t rlim64_t;

struct rlimit64 {
        rlim64_t        rlim_cur;
        rlim64_t        rlim_max;               
};              
#endif  /* _LFAPI */

#ifdef _KERNEL

#include <sys/types.h>

/*
 * Convert the given 32 bit limit spec to RLIM_INFINITY if it
 * is specified as RLIM32_INFINITY.
 */
#define RLIM32_CONV(x)  (((x) == RLIM32_INFINITY) ? RLIM_INFINITY : (x))

struct uthread_s;

extern void ruadd(struct rusage *, struct rusage *);
extern int setrlimitcommon(usysarg_t, struct rlimit *);
extern rlim_t getaslimit(struct uthread_s *, int);
extern rlim_t getfsizelimit(void);
extern struct rlimit rlimits[];

struct irix5_rlimit {
        app32_ulong_t   rlim_cur;
        app32_ulong_t   rlim_max;
};

#else   /* !_KERNEL */

extern int getrlimit(int, struct rlimit *);
extern int setrlimit(int, const struct rlimit *);
extern int getpriority(int, id_t);
extern int setpriority(int, id_t, int);
extern int getrusage(int, struct rusage *);

#if _LFAPI
extern int getrlimit64(int, struct rlimit64 *);
extern int setrlimit64(int, const struct rlimit64 *);
#endif  /* _LFAPI */

#endif /* !_KERNEL */

#ifdef __cplusplus
}
#endif

#endif /* _SYS_RESOURCE_H */


> > Checksum for /tmp/root/.cpan/sources/authors/id/J/JH/JHI/BSD-Resource-1.11.tar.gz 
>ok
> > x BSD-Resource-1.11/ChangeLog, 2731 bytes, 6 blocks
> > x BSD-Resource-1.11/README, 1485 bytes, 3 blocks
> > x BSD-Resource-1.11/t/setrlimit.t, 1464 bytes, 3 blocks
> > x BSD-Resource-1.11/t/setpriority.t, 1557 bytes, 4 blocks
> > x BSD-Resource-1.11/t/times.t, 1044 bytes, 3 blocks
> > x BSD-Resource-1.11/t/getrusage.t, 1892 bytes, 4 blocks
> > x BSD-Resource-1.11/t/getpriority.t, 740 bytes, 2 blocks
> > x BSD-Resource-1.11/t/getrlimit.t, 355 bytes, 1 block
> > x BSD-Resource-1.11/MANIFEST, 154 bytes, 1 block
> > x BSD-Resource-1.11/Resource.pm, 15040 bytes, 30 blocks
> > x BSD-Resource-1.11/INSTALL, 1726 bytes, 4 blocks
> > x BSD-Resource-1.11/Makefile.PL, 3698 bytes, 8 blocks
> > x BSD-Resource-1.11/Resource.xs, 18272 bytes, 36 blocks
> > 
> >   CPAN.pm: Going to build J/JH/JHI/BSD-Resource-1.11.tar.gz
> > 
> > 
> > Configuring BSD::Resource...
> > 
> > Your operating system does not seem to have <sys/resource.h> or <sys/rusage.h>.
> > 
> > There is no way BSD::Resource is going to work.
> > 
> > I am awfully sorry but I cannot go further.
> > 
> > Aborting configuration of BSD::Resource.
> > 
> > 
> > --
> > 
> > Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
> >   Platform:
> >     osname=irix, osvers=6.5, archname=IP32-irix
> >     uname='irix benedick 6.5 01200533 ip32 '
> >     config_args=''
> >     hint=previous, useposix=true, d_sigaction=define
> >     usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
> >     useperlio=undef d_sfio=undef uselargefiles=define 
> >     use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
> >   Compiler:
> >     cc='cc -n32 -mips4 -TARG:platform=ip32', optimize='-r5000 
>-OPT:fast_sqrt=OFF:Olimit=0 -TENV:X=1 -LNO:opt=1:ou_further=3 
>-OPT:fold_unsafe_relops=OFF:div_split=OFF:IEEE_arithmetic=1:roundoff=0 -LNO:vintr=OFF 
>-OPT:got_call_conversion=OFF', gccversion=
> >     cppflags='-D_BSD_TYPES -D_BSD_TIME -DLANGUAGE_C 
>-I/server/people/staff/easmith/include -DDEBUGGING'
> >     ccflags ='-D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -DLANGUAGE_C 
>-I/server/people/staff/easmith/include -DDEBUGGING'
> >     stdchar='unsigned char', d_stdstdio=define, usevfork=false
> >     intsize=4, longsize=4, ptrsize=4, doublesize=8
> >     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
> >     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
> >     alignbytes=8, usemymalloc=n, prototype=define
> >   Linker and Libraries:
> >     ld='ld -mips4 -n32 -shared -update_registry /usr/lib32/so_locations', ldflags 
>='-L/server/people/staff/easmith/lib32 -L/usr/lib32/mips4 -L/usr/lib32/internal 
>-L/usr/lib32 -L/lib32 -rpath 
>/server/people/staff/easmith/lib32:/usr/lib32/mips4:/usr/lib32/internal:/usr/lib32:/lib32'
> >     libpth=/server/people/staff/easmith/lib32 /usr/lib32/mips4 /usr/lib32/internal 
>/usr/lib32 /lib32
> >     libs=-lgdbm -ldb -lm -lc
> >     libc=/usr/lib32/mips4/libc.so, so=so, useshrplib=false, libperl=libperl.a
> >   Dynamic Linking:
> >     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
> >     cccdlflags=' ', lddlflags='-L/server/people/staff/easmith/lib32 
>-L/usr/lib32/mips4 -L/usr/lib32/internal -L/usr/lib32 -L/lib32 -rpath 
>/server/people/staff/easmith/lib32:/usr/lib32/mips4:/usr/lib32/internal:/usr/lib32:/lib32'
> 
> -- 
> $jhi++; # http://www.iki.fi/jhi/
>         # There is this special biologist word we use for 'stable'.
>         # It is 'dead'. -- Jack Cohen

As a biologist, I appreciate this... :-}

        Thanks,

        -Allen

-- 
Allen Smith                     [EMAIL PROTECTED]
September 11, 2001              A Day That Shall Live In Infamy II
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Benjamin Franklin

Reply via email to