# New Ticket Created by  Todd Vierling 
# Please include the string:  [perl #33892]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=33892 >



This is a bug report for perl from [EMAIL PROTECTED],
generated with the help of perlbug 1.35 running under perl v5.8.6.


-----------------------------------------------------------------
[Please enter your report here]

The following diff implements support for Interix (Windows Services for UNIX)
3.5, and likely 3.0 and 3.1.  Shared module and libperl support is enabled.
There are probably a couple things you may find odd about this, in spite of
the diff's small size, so please feel free to ask me any questions.

Diff is against 5.8.6.  Note that platform tracking info at the bottom of
this ticket reflects my mail-capable system, not Interix.  8-)

--- hints/interix.sh.orig       2005-01-21 09:27:04.000000000 -0500
+++ hints/interix.sh    2005-01-21 09:27:04.000000000 -0500
@@ -0,0 +1,26 @@
+# hints/interix.sh
+#
+# Please check with [EMAIL PROTECTED] before making modifications
+# to this file.
+
+cc='gcc'
+cccdlflags="-DPIC $cccdlflags"
+ccdlflags='-Wl,-E'
+ccflags="-D_ALL_SOURCE $ccflags"
+d_poll="$undef"
+ld='gcc'
+lddlflags="-shared $lddlflags"
+rpathflag='-Wl,-R'
+sharpbang='#!'
+usenm='false'
+
+# This script UU/usethreads.cbu will get 'called-back' by Configure 
+# after it has prompted the user for whether to use threads. 
+cat > UU/usethreads.cbu <<'EOCBU' 
+case "$usethreads" in
+$define|true|[yY]*)
+       ccflags="-D_REENTRANT $ccflags"
+       libswanted="$libswanted pthread"
+        ;; 
+esac 
+EOCBU
--- lib/ExtUtils/MM_Unix.pm.orig        2005-01-21 09:24:09.000000000 -0500
+++ lib/ExtUtils/MM_Unix.pm     2005-01-21 09:25:56.000000000 -0500
@@ -12,7 +12,7 @@
 
 use vars qw($VERSION @ISA
             $Is_Mac $Is_OS2 $Is_VMS $Is_Win32 $Is_Win95  $Is_Dos $Is_VOS
-            $Is_QNX $Is_AIX $Is_OSF $Is_IRIX  $Is_NetBSD $Is_BSD
+            $Is_QNX $Is_AIX $Is_OSF $Is_IRIX  $Is_NetBSD $Is_BSD $Is_Interix
             $Is_SunOS4 $Is_Solaris $Is_SunOS
             $Verbose %pm %static
             %Config_Override
@@ -37,10 +37,11 @@
 $Is_OSF     = $^O eq 'dec_osf';
 $Is_IRIX    = $^O eq 'irix';
 $Is_NetBSD  = $^O eq 'netbsd';
+$Is_Interix = $^O eq 'interix';
 $Is_SunOS4  = $^O eq 'sunos';
 $Is_Solaris = $^O eq 'solaris';
 $Is_SunOS   = $Is_SunOS4 || $Is_Solaris;
-$Is_BSD     = $^O =~ /^(?:free|net|open)bsd|bsdos$/;
+$Is_BSD     = $^O =~ /^(?:free|net|open)bsd|bsdos|interix$/;
 
 
 =head1 NAME
@@ -1120,7 +1121,7 @@
 
     my $libs = '$(LDLOADLIBS)';
 
-    if ($Is_NetBSD) {
+    if ($Is_NetBSD || $Is_Interix) {
        # Use nothing on static perl platforms, and to the flags needed
        # to link against the shared libperl library on shared perl
        # platforms.  We peek at lddlflags to see if we need -Wl,-R
--- lib/File/Find.pm.orig       2005-01-21 09:27:20.000000000 -0500
+++ lib/File/Find.pm    2005-01-21 09:27:40.000000000 -0500
@@ -1221,7 +1221,7 @@
 
 $File::Find::dont_use_nlink = 1
     if $^O eq 'os2' || $^O eq 'dos' || $^O eq 'amigaos' || $^O eq 'MSWin32' ||
-       $^O eq 'cygwin' || $^O eq 'epoc' || $^O eq 'qnx' ||
+       $^O eq 'interix' || $^O eq 'cygwin' || $^O eq 'epoc' || $^O eq 'qnx' ||
           $^O eq 'nto';
 
 # Set dont_use_nlink in your hint file if your system's stat doesn't
--- lib/File/Temp.pm.orig       2005-01-21 09:28:12.000000000 -0500
+++ lib/File/Temp.pm    2005-01-21 09:28:57.000000000 -0500
@@ -2012,6 +2012,7 @@
 
 {
   my $TopSystemUID = 10;
+  $TopSystemUID = 197108 if $^O eq 'interix'; # "Administrator"
   sub top_system_uid {
     my $self = shift;
     if (@_) {
--- t/io/openpid.t.orig 2005-01-21 09:29:19.000000000 -0500
+++ t/io/openpid.t      2005-01-21 09:29:28.000000000 -0500
@@ -23,6 +23,7 @@
 use Config;
 $| = 1;
 $SIG{PIPE} = 'IGNORE';
+$SIG{HUP} = 'IGNORE' if $^O eq 'interix';
 
 my $perl = which_perl();
 $perl .= qq[ "-I../lib"];
--- t/op/groups.t.orig  2005-01-21 09:29:44.000000000 -0500
+++ t/op/groups.t       2005-01-21 09:29:53.000000000 -0500
@@ -133,7 +133,7 @@
 
 print "# gr = @gr\n";
 
-if ($^O =~ /^(?:uwin|cygwin|solaris)$/) {
+if ($^O =~ /^(?:uwin|cygwin|interix|solaris)$/) {
        # Or anybody else who can have spaces in group names.
        $gr1 = join(' ', grep(!$did{$_}++, sort split(' ', join(' ', @gr))));
 } else {
--- Configure.orig      2005-01-21 09:22:04.000000000 -0500
+++ Configure   2005-01-21 09:22:17.000000000 -0500
@@ -7852,7 +7852,7 @@
        solaris)
                xxx="-R $shrpdir"
                ;;
-       freebsd|netbsd|openbsd)
+       freebsd|netbsd|openbsd|interix)
                xxx="-Wl,-R$shrpdir"
                ;;
        bsdos|linux|irix*|dec_osf)
--- Makefile.SH.orig    2005-01-21 09:26:16.000000000 -0500
+++ Makefile.SH 2005-01-21 09:26:48.000000000 -0500
@@ -72,6 +72,10 @@
        netbsd*|freebsd[234]*|openbsd*)
                linklibperl="-L. -lperl"
                ;;
+       interix*)
+               linklibperl="-L. -lperl"
+               shrpldflags="$shrpldflags -Wl,--image-base,0x57000000"
+               ;;
        aix*)
                shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
                case "$osvers" in

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Site configuration information for perl v5.8.6:

Configured by tv at Wed Jan  5 15:45:11 EST 2005.

Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
  Platform:
    osname=netbsd, osvers=2.0, archname=i386-netbsd-thread-multi
    uname='netbsd server.duh.org 2.0 netbsd 2.0 (server) #4: fri dec 17 
12:07:29 est 2004 [EMAIL PROTECTED]:exportsrcduhnetbsd-kernelsserver i386 '
    config_args='-sde -Dprefix=/usr/pkg -Dscriptdir=/usr/pkg/bin 
-Darchname=i386-netbsd -Dcc=cc -Doptimize=-O2  -pthread  -I/usr/include 
-Dinstallstyle=lib/perl5 -Duseshrplib -Ui_malloc -Uusemymalloc 
-Uinstallusrbinperl -Dman3ext=3 -Dman3dir=/usr/pkg/lib/perl5/5.8.6/man/man3 
-Dsiteman3dir=/usr/pkg/lib/perl5/site_perl/man/man3 -Dman1dir=/usr/pkg/man/man1 
-Dsiteprefix=/usr/pkg -Dsiteman1dir=/usr/pkg/man/man1 -Duseithreads 
-Dlibswanted=m crypt '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/usr/pkg/include',
    optimize='-O2 -pthread -I/usr/include',
    cppflags='-fno-strict-aliasing -pipe -I/usr/pkg/include'
    ccversion='', gccversion='3.3.3 (NetBSD nb3 20040520)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -Wl,-R/usr/pkg/lib  -pthread  -L/usr/pkg/lib'
    libpth=/usr/pkg/lib /usr/lib
    libs=-lm -lcrypt -lpthread
    perllibs=-lm -lcrypt -lpthread
    libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E  
-Wl,-R/usr/pkg/lib/perl5/5.8.6/i386-netbsd-thread-multi/CORE'
    cccdlflags='-DPIC -fPIC ', lddlflags=' -Wl,-R/usr/pkg/lib  -pthread 
--whole-archive -shared  -L/usr/pkg/lib'

Locally applied patches:
    

---
@INC for perl v5.8.6:
    /usr/pkg/lib/perl5/site_perl/5.8.6/i386-netbsd-thread-multi
    /usr/pkg/lib/perl5/site_perl/5.8.6
    /usr/pkg/lib/perl5/site_perl/5.8.5/i386-netbsd-thread-multi
    /usr/pkg/lib/perl5/site_perl/5.8.5
    /usr/pkg/lib/perl5/site_perl
    /usr/pkg/lib/perl5/5.8.6/i386-netbsd-thread-multi
    /usr/pkg/lib/perl5/5.8.6
    .

---
Environment for perl v5.8.6:
    HOME=/home/tv
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    
PATH=/home/tv/.bin:/usr/local/sbin:/usr/local/bin:/usr/pkg/sbin:/usr/pkg/bin:/usr/X11R6/bin:/usr/sbin:/usr/bin:/sbin:/bin
    PERL_BADLANG (unset)
    SHELL=/bin/ksh

Reply via email to