File: solaris.pl

package info (click to toggle)
libproc-processtable-perl 0.637-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 672 kB
  • sloc: ansic: 5,765; perl: 568; makefile: 15
file content (30 lines) | stat: -rw-r--r-- 1,420 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
symlink "os/Solaris.c", "OS.c" || die "Could not link os/Solaris.c to os/OS.c\n";

# Historical Note (please correct me if this is wrong!):
#
# A linux-like /proc filesystem was introduced with Solaris 2.6, with
# process information available in pseudo-files under pseudo-directories
# named for process ids in /proc. Previous to 2.6 Solaris used a
# half-baked ioctl-based /proc scheme. Previous to this (SunOS, maybe
# much earlier versions of Solaris?) process information was only
# available through /dev/kmem, which required root access (ps is setuid
# on SunOS-- yuck). All three schemes are supported and available in 2.6,
# but at least the ioctl-based /proc support is supposed to be going away.

# If this OS version supports the new /proc filesystem, use it; 
# otherwise default to ioctl-proc
`uname -r` =~ /^(\d+\.\d+)/;
if( $1 !~ /^5.[012345]$/ ){
    $self->{DEFINE} = $self->{DEFINE} . " -DPROC_FS";
}

$self->{DEFINE} .= " -D_POSIX_PTHREAD_SEMANTICS";

# For reasons I don't understand, we have to turn off the large file
# environment flags in order to compile in the large file environment
#10/28/2002:
# Should not set CCLFAGS to empty.  Should only remove these two symbol while preserving others.
if( `/usr/bin/getconf LFS_CFLAGS` =~ /-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64/){
    $self->{CCFLAGS} = $Config{ccflags};
    $self->{CCFLAGS} =~ s/-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64//;
}