Changeset 3188
- Timestamp:
- Apr 22, 2007, 10:57:48 AM (18 years ago)
- Location:
- trunk/essentials/dev-lang/perl
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/essentials/dev-lang/perl/MANIFEST
r3187 r3188 2241 2241 os2/OS2/REXX/t/rx_cmprt.t DLL access module 2242 2242 os2/OS2/REXX/t/rx_dllld.t DLL access module 2243 os2/OS2/REXX/t/rx_emxrv.t DLL access module2244 2243 os2/OS2/REXX/t/rx_objcall.t DLL access module 2245 2244 os2/OS2/REXX/t/rx_sql.test DLL access module -
trunk/essentials/dev-lang/perl/configpm
r3187 r3188 475 475 print CONFIG <<'ENDOFSET'; 476 476 my %preconfig; 477 if ($OS2::is_aout) {478 my ($value, $v) = $Config_SH_expanded =~ m/^used_aout='(.*)'\s*$/m;479 for (split ' ', $value) {480 ($v) = $Config_SH_expanded =~ m/^aout_$_='(.*)'\s*$/m;481 $preconfig{$_} = $v eq 'undef' ? undef : $v;482 }483 }484 $preconfig{d_fork} = undef unless $OS2::can_fork; # Some funny cases can't477 #if ($OS2::is_aout) { 478 # my ($value, $v) = $Config_SH_expanded =~ m/^used_aout='(.*)'\s*$/m; 479 # for (split ' ', $value) { 480 # ($v) = $Config_SH_expanded =~ m/^aout_$_='(.*)'\s*$/m; 481 # $preconfig{$_} = $v eq 'undef' ? undef : $v; 482 # } 483 #} 484 #$preconfig{d_fork} = undef unless $OS2::can_fork; # Some funny cases can't 485 485 sub TIEHASH { bless {%preconfig} } 486 486 ENDOFSET -
trunk/essentials/dev-lang/perl/ext/Devel/DProf/DProf.xs
r3187 r3188 76 76 # endif 77 77 # endif 78 # if def OS2/* times() has significant overhead */78 # if defined(OS2)&&!defined(__KLIBC__) /* times() has significant overhead */ 79 79 # define Times(ptr) (dprof_times(aTHX_ ptr)) 80 80 # define INCL_DOSPROFILE … … 132 132 U32 default_perldb; 133 133 UV depth; 134 # ifdef OS2134 # if defined(OS2)&&!defined(__KLIBC__) 135 135 ULONG frequ; 136 136 long long start_cnt; … … 171 171 # define g_THX g_prof_state.my_perl 172 172 #endif 173 # ifdef OS2173 # if defined(OS2)&&!defined(__KLIBC__) 174 174 # define g_frequ g_prof_state.frequ 175 175 # define g_start_cnt g_prof_state.start_cnt … … 179 179 dprof_times(pTHX_ struct tms *t) 180 180 { 181 # ifdef OS2181 # if defined(OS2)&&!defined(__KLIBC__) 182 182 ULONG rc; 183 183 QWORD cnt; -
trunk/essentials/dev-lang/perl/ext/DynaLoader/dl_dlopen.xs
r3187 r3188 219 219 void *sym; 220 220 CODE: 221 #if def DLSYM_NEEDS_UNDERSCORE221 #if defined(DLSYM_NEEDS_UNDERSCORE)||defined(__KLIBC__) 222 222 symbolname = Perl_form_nocontext("_%s", symbolname); 223 223 #endif -
trunk/essentials/dev-lang/perl/hints/os2.sh
r3187 r3188 27 27 case "X$optimize" in 28 28 X) 29 optimize="-O2 -fomit-frame-pointer - malign-loops=2 -malign-jumps=2 -malign-functions=2 -s"29 optimize="-O2 -fomit-frame-pointer -falign-loops=2 -falign-jumps=2 -falign-functions=2 -s" 30 30 ld_dll_optimize="-s" 31 31 ;; … … 147 147 148 148 aout_d_fork='define' 149 aout_ccflags="-DDOSISH -D PERL_IS_AOUT -DOS2=2 -DEMBED -I. $_defemxcrtrev -D__ST_MT_ERRNO__"150 aout_cppflags="-DDOSISH -D PERL_IS_AOUT -DOS2=2 -DEMBED -I. $_defemxcrtrev -D__ST_MT_ERRNO__"149 aout_ccflags="-DDOSISH -DOS2=2 -DEMBED -I. $_defemxcrtrev " 150 aout_cppflags="-DDOSISH -DOS2=2 -DEMBED -I. $_defemxcrtrev " 151 151 aout_use_clib='c' 152 152 aout_usedl='undef' … … 177 177 d_shrplib='define' 178 178 useshrplib='true' 179 obj_ext='.o bj'179 obj_ext='.o' 180 180 lib_ext='.lib' 181 181 ar='emxomfar' … … 186 186 d_fork='undef' 187 187 fi 188 lddlflags="-Zdll -Zomf -Zmt -Zcrtdll -Zlinker /e:2"188 lddlflags="-Zdll -Zomf " 189 189 # Recursive regmatch may eat 2.5M of stack alone. 190 ldflags='-Zexe -Zomf -Z mt -Zcrtdll -Zstack 32000 -Zlinker /e:2'190 ldflags='-Zexe -Zomf -Zstack 32000 ' 191 191 if [ $emxcrtrev -ge 50 ]; then 192 192 ccflags="-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. $_defemxcrtrev" … … 218 218 219 219 # Test would pick up wrong rand, so we hardwire the value for random() 220 libs='-lsocket -lm -lbsd'220 libs='-lsocket' 221 221 randbits=31 222 222 archobjs="os2$obj_ext dl_os2$obj_ext" … … 278 278 d_usleep='define' 279 279 d_usleepproto='define' 280 281 d_link='undef' 282 dont_use_nlink='define' 283 # no posix (aka hard) links for us! 280 284 281 285 # The next two are commented. pdksh handles #!, extproc gives no path part. -
trunk/essentials/dev-lang/perl/lib/ExtUtils/Mksymlists.pm
r3187 r3188 103 103 print DEF "DATA LOADONCALL NONSHARED MULTIPLE\n"; 104 104 print DEF "EXPORTS\n "; 105 print DEF join("\n ",@{$data->{DL_VARS}}, "\n") if @{$data->{DL_VARS}}; 106 print DEF join("\n ",@{$data->{FUNCLIST}}, "\n") if @{$data->{FUNCLIST}}; 105 my @syms; 106 # Export public symbols both with and without underscores to 107 # ensure compatibility between DLLs from different compilers 108 # NOTE: DynaLoader itself only uses the names without underscores, 109 # so this is only to cover the case when the extension DLL may be 110 # linked to directly from C. GSAR 97-07-10 111 if ($Config::Config{'cc'} =~ /^bcc/i) { 112 for (@{$data->{DL_VARS}}, @{$data->{FUNCLIST}}) { 113 push @syms, "_$_", "$_ = _$_"; 114 } 115 } 116 else { 117 for (@{$data->{DL_VARS}}, @{$data->{FUNCLIST}}) { 118 push @syms, "_$_"; 119 } 120 } 121 print DEF join("\n ",@syms, "\n") if @syms; 122 # print DEF join("\n ",@{$data->{DL_VARS}}, "\n ") if @{$data->{DL_VARS}}; 123 # print DEF join("\n ",@{$data->{FUNCLIST}}, "\n") if @{$data->{FUNCLIST}}; 107 124 if (%{$data->{IMPORTS}}) { 108 125 print DEF "IMPORTS\n"; -
trunk/essentials/dev-lang/perl/mg.c
r3187 r3188 631 631 } 632 632 #else 633 #if def OS2633 #if defined(OS2)&&!defined(__KLIBC__) 634 634 if (!(_emx_env & 0x200)) { /* Under DOS */ 635 635 sv_setnv(sv, (NV)errno); -
trunk/essentials/dev-lang/perl/os2/Makefile.SHs
r3187 r3188 43 43 SO_CCCMD = \$(CC) $ccflags \$(OPTIMIZE) 44 44 45 LD_OPT = \$(OPTIMIZE)46 PERL_DLL_LD_OPT = -Z map -Zlinker /map/li45 LD_OPT = 46 PERL_DLL_LD_OPT = -Zdll -Zmap -Zargs-wild 47 47 48 48 PERL_DLL_BASE = perl$dll_post … … 72 72 73 73 libperl_dllmain.imp: imp_version 74 echo ' main $(PERL_DLL_BASE)dll_perlmain ?' >> $@74 echo '_main $(PERL_DLL_BASE) _dll_perlmain ?' >> $@ 75 75 76 76 libperl_dllmain.lib: libperl_dllmain.imp … … 144 144 145 145 miniperl: $(obj) perl$(OBJ_EXT) miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) 146 $(CC) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) perl$(OBJ_EXT) `echo $(obj)|sed -e 's/\bop\./opmini./g'` $(libs) -Zmap -Z linker /map/PM:VIO146 $(CC) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) perl$(OBJ_EXT) `echo $(obj)|sed -e 's/\bop\./opmini./g'` $(libs) -Zmap -Zargs-wild 147 147 @./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest 148 148 … … 171 171 172 172 perl___$(EXE_EXT) perl___: $& libperl_dllmain$(LIB_EXT) 173 $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl___ libperl_dllmain$(LIB_EXT) -Zlinker /map/PM:VIO174 $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 8192 -o perl___8 libperl_dllmain$(LIB_EXT) -Zlinker /map/PM:VIO175 $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 4096 -o perl___4 libperl_dllmain$(LIB_EXT) -Zlinker /map/PM:VIO176 $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 2048 -o perl___2 libperl_dllmain$(LIB_EXT) -Zlinker /map/PM:VIO177 $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 1024 -o perl___1 libperl_dllmain$(LIB_EXT) -Zlinker /map/PM:VIO178 $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 512 -o perl___05 libperl_dllmain$(LIB_EXT) -Zlinker /map/PM:VIO179 $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 320 -o perl___03 libperl_dllmain$(LIB_EXT) -Zlinker /map/PM:VIO173 $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl___ libperl_dllmain$(LIB_EXT) 174 $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 8192 -o perl___8 libperl_dllmain$(LIB_EXT) 175 $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 4096 -o perl___4 libperl_dllmain$(LIB_EXT) 176 $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 2048 -o perl___2 libperl_dllmain$(LIB_EXT) 177 $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 1024 -o perl___1 libperl_dllmain$(LIB_EXT) 178 $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 512 -o perl___05 libperl_dllmain$(LIB_EXT) 179 $(SHRPENV) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -Zstack 320 -o perl___03 libperl_dllmain$(LIB_EXT) 180 180 181 181 # This one is compiled -Zsys, so cannot do many things: … … 187 187 188 188 perl_stat perl_stat$(EXE_EXT): $& libperl_dllmain$(LIB_EXT) 189 $(SHRPENV) $(CC) $(STAT_CLDFLAGS) $(CCDLFLAGS) -o perl_stat libperl_dllmain$(LIB_EXT) -Zlinker /map/PM:VIO189 $(SHRPENV) $(CC) $(STAT_CLDFLAGS) $(CCDLFLAGS) -o perl_stat libperl_dllmain$(LIB_EXT) 190 190 191 191 # Remove -Zcrtdll, add -Zsys … … 195 195 196 196 perl_sys perl_sys$(EXE_EXT): $& libperl_dllmain$(LIB_EXT) 197 $(SHRPENV) $(CC) $(SYS_CLDFLAGS) $(CCDLFLAGS) -o perl_sys libperl_dllmain$(LIB_EXT) -Zlinker /map/PM:VIO197 $(SHRPENV) $(CC) $(SYS_CLDFLAGS) $(CCDLFLAGS) -o perl_sys libperl_dllmain$(LIB_EXT) 198 198 199 199 installcmd : … … 269 269 270 270 perl__$(EXE_EXT) perl__: $& libperl_dllmain$(LIB_EXT) 271 $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl__ libperl_dllmain$(LIB_EXT) -Zlinker /PM:PM 271 $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl__ libperl_dllmain$(LIB_EXT) -Zlinker /PM:PM 272 272 273 273 # Forking dynamically loaded perl: … … 293 293 294 294 # Remove -Zexe, add -Zdll -Zso. No stack needed 295 SO_CLDFLAGS = -Zdll -Z so -Zomf -Zmt -Zsys295 SO_CLDFLAGS = -Zdll -Zomf 296 296 297 297 # A callable-from-REXX DLL … … 304 304 echo "DESCRIPTION '@#perl5-porters@perl.org:`miniperl -Ilib -MConfig -e 'print \$$]'`#@ REXX to Perl `miniperl -Ilib -MConfig -e 'print \$$Config{version}'` interface'" >> $@ 305 305 echo "EXPORTS" >> $@ 306 echo ' " PERL"' >> $@307 echo ' " PERLTERM"' >> $@308 echo ' " PERLINIT"' >> $@309 echo ' " PERLEXIT"' >> $@310 echo ' " PERLEVAL"' >> $@311 echo ' " PERLLASTERROR"' >> $@312 echo ' " PERLEVALSUBCOMMAND"' >> $@313 echo ' " PERLEXPORTALL"' >> $@314 echo ' " PERLDROPALL"' >> $@315 echo ' " PERLDROPALLEXIT"' >> $@306 echo ' "_PERL"' >> $@ 307 echo ' "_PERLTERM"' >> $@ 308 echo ' "_PERLINIT"' >> $@ 309 echo ' "_PERLEXIT"' >> $@ 310 echo ' "_PERLEVAL"' >> $@ 311 echo ' "_PERLLASTERROR"' >> $@ 312 echo ' "_PERLEVALSUBCOMMAND"' >> $@ 313 echo ' "_PERLEXPORTALL"' >> $@ 314 echo ' "_PERLDROPALL"' >> $@ 315 echo ' "_PERLDROPALLEXIT"' >> $@ 316 316 317 317 -
trunk/essentials/dev-lang/perl/os2/OS2/Process/Process.xs
r3187 r3188 221 221 PIB *pib; 222 222 223 #ifndef __KLIBC__ 223 224 if (!(_emx_env & 0x200)) return (char*)ptypes[1]; /* not OS/2. */ 225 #endif 224 226 if (CheckOSError(DosGetInfoBlocks(&tib, &pib))) 225 227 return NULL; … … 234 236 ULONG apptype; 235 237 238 #ifndef __KLIBC__ 236 239 if (!(_emx_env & 0x200)) 237 240 croak("file_type not implemented on DOS"); /* not OS/2. */ 241 #endif 238 242 if (CheckOSError(DosQueryAppType(path, &apptype))) { 239 243 #if 0 … … 481 485 HSWITCH hSwitch; 482 486 487 #ifndef __KLIBC__ 483 488 if (!(_emx_env & 0x200)) 484 489 croak("switch_entry not implemented on DOS"); /* not OS/2. */ 490 #endif 485 491 if (CheckWinError(hSwitch = 486 492 myWinQuerySwitchHandle(hwnd, pid))) … … 683 689 SWENTRY swentry; 684 690 691 #ifndef __KLIBC__ 685 692 if (!(_emx_env & 0x200)) 686 693 croak("process_swentry not implemented on DOS"); /* not OS/2. */ 694 #endif 695 687 696 fill_swentry(&swentry, hwnd, pid); 688 697 return newSVpvn((char*)&swentry, sizeof(swentry)); … … 697 706 SV *sv = newSVpvn("",0); 698 707 708 #ifndef __KLIBC__ 699 709 if (!(_emx_env & 0x200)) 700 710 croak("swentries_list not implemented on DOS"); /* not OS/2. */ 711 #endif 701 712 if (!pWinQuerySwitchList) 702 713 AssignFuncPByORD(pWinQuerySwitchList, ORD_WinQuerySwitchList); … … 759 770 ULONG rc; /* For CheckOSError */ 760 771 772 #ifndef __KLIBC__ 761 773 if (!(_emx_env & 0x200)) 762 774 croak("change_entry() not implemented on DOS"); /* not OS/2. */ 775 #endif 763 776 if (!pWinChangeSwitchEntry) 764 777 AssignFuncPByORD(pWinChangeSwitchEntry, ORD_WinChangeSwitchEntry); -
trunk/essentials/dev-lang/perl/os2/OS2/REXX/REXX.xs
r3187 r3188 15 15 #endif 16 16 17 #ifndef __KLIBC__ 17 18 extern ULONG _emx_exception ( EXCEPTIONREPORTRECORD *, 18 19 EXCEPTIONREGISTRATIONRECORD *, 19 20 CONTEXTRECORD *, 20 21 void *); 22 #endif 21 23 22 24 static RXSTRING * strs; … … 158 160 { 159 161 dTHX; 162 #ifndef __KLIBC__ 160 163 EXCEPTIONREGISTRATIONRECORD xreg = { NULL, _emx_exception }; 164 #endif 161 165 int i, rc; 162 166 unsigned long len; -
trunk/essentials/dev-lang/perl/os2/dl_os2.c
r3187 r3188 150 150 151 151 fail[0] = 0; 152 rc = DosQueryProcAddr((HMODULE)handle, 0, symbol, &addr); 152 153 rc = DosQueryProcAddr((HMODULE)handle, 0, symbol, &addr); 153 154 if (rc == 0) { 154 155 rc = DosQueryProcType((HMODULE)handle, 0, symbol, &type); … … 157 158 rc = ERROR_WRONG_PROCTYPE; 158 159 } 160 159 161 retcode = rc; 160 162 return NULL; -
trunk/essentials/dev-lang/perl/os2/os2.c
r3187 r3188 20 20 * Various Unix compatibility functions for OS/2 21 21 */ 22 23 #ifdef __KLIBC__ 24 #define INSTALL_PREFIX "u:/perl" 25 #endif 22 26 23 27 #include <stdio.h> … … 661 665 PIB *pib; 662 666 667 #ifndef __KLIBC__ 663 668 if (!(_emx_env & 0x200)) return 1; /* not OS/2. */ 669 #endif 664 670 if (CheckOSError(DosGetInfoBlocks(&tib, &pib))) 665 671 return -1; … … 675 681 PIB *pib; 676 682 683 #ifndef __KLIBC__ 677 684 if (!(_emx_env & 0x200)) 678 685 Perl_croak_nocontext("Can't set type on DOS"); /* not OS/2. */ 686 #endif 679 687 if (CheckOSError(DosGetInfoBlocks(&tib, &pib))) 680 688 croak_with_os2error("Error getting info blocks"); … … 833 841 ULONG rc, prio = sys_prio(pid); 834 842 843 #ifndef __KLIBC__ 835 844 if (!(_emx_env & 0x200)) return 0; /* Nop if not OS/2. */ 845 #endif 836 846 if (priors[(32 - val) >> 5] + 1 == (prio >> 8)) { 837 847 /* Do not change class. */ … … 867 877 ULONG ret; 868 878 879 #ifndef __KLIBC__ 869 880 if (!(_emx_env & 0x200)) return 0; /* Nop if not OS/2. */ 881 #endif 870 882 ret = sys_prio(pid); 871 883 if (ret == PRIO_ERR) { … … 952 964 ULONG apptype; 953 965 966 #ifndef __KLIBC__ 954 967 if (!(_emx_env & 0x200)) 955 968 Perl_croak_nocontext("file_type not implemented on DOS"); /* not OS/2. */ 969 #endif 956 970 if (CheckOSError(DosQueryAppType(path, &apptype))) { 957 971 switch (rc) { … … 973 987 /* global PL_Argv[] contains arguments. */ 974 988 989 #ifndef __KLIBC__ 975 990 extern ULONG _emx_exception ( EXCEPTIONREPORTRECORD *, 976 991 EXCEPTIONREGISTRATIONRECORD *, 977 992 CONTEXTRECORD *, 978 993 void *); 994 #endif 979 995 980 996 int … … 1016 1032 reread: 1017 1033 force_shell = 0; 1034 #ifndef __KLIBC__ 1018 1035 if (_emx_env & 0x200) { /* OS/2. */ 1036 #else 1037 { 1038 #endif 1019 1039 int type = file_type(real_name); 1020 1040 type_again: … … 1254 1274 1255 1275 if (!shell) 1276 #ifndef __KLIBC__ 1256 1277 shell = ((_emx_env & 0x200) 1257 1278 ? "c:/os2/cmd.exe" 1258 1279 : "c:/command.com"); 1280 #else 1281 shell = "c:/os2/cmd.exe"; 1282 #endif 1259 1283 nargs = shell_opt ? 2 : 1; /* shell file args */ 1260 1284 exec_args[0] = shell; … … 2056 2080 int number = SvTRUE(get_sv("OS2::nsyserror", TRUE)); 2057 2081 2082 #ifndef __KLIBC__ 2058 2083 if (!(_emx_env & 0x200)) return ""; /* Nop if not OS/2. */ 2084 #endif 2059 2085 if (rc == 0) 2060 2086 return ""; … … 2262 2288 to = dllname2buffer(aTHX_ b, bl); 2263 2289 } else { /* No Perl present yet */ 2290 2264 2291 HMODULE self = find_myself(); 2265 2292 APIRET rc = DosQueryModuleName(self, bl, b); … … 2272 2299 *to = '/'; 2273 2300 to = b; 2301 2274 2302 } 2275 2303 break; … … 2618 2646 APIRET badrc; 2619 2647 2648 #ifndef __KLIBC__ 2620 2649 if (!(_emx_env & 0x200)) /* DOS */ 2621 2650 return !_sleep2(ms); 2622 2651 #endif 2623 2652 os2cp_croak(DosCreateEventSem(NULL, /* Unnamed */ 2624 2653 &hevEvent1, /* Handle of semaphore returned */ … … 3998 4027 GV *gv; 3999 4028 4029 #ifndef __KLIBC__ 4000 4030 if (_emx_env & 0x200) { /* OS/2 */ 4031 #else 4032 { 4033 #endif 4001 4034 newXS("File::Copy::syscopy", XS_File__Copy_syscopy, file); 4002 4035 newXS("Cwd::extLibpath", XS_Cwd_extLibpath, file); … … 4055 4088 GvMULTI_on(gv); 4056 4089 sv_setiv(GvSV(gv), exe_is_aout()); 4090 #ifndef __KLIBC__ 4057 4091 gv = gv_fetchpv("OS2::emx_rev", TRUE, SVt_PV); 4092 #endif 4058 4093 GvMULTI_on(gv); 4094 #ifndef __KLIBC__ 4059 4095 sv_setiv(GvSV(gv), _emx_rev); 4060 4096 sv_setpv(GvSV(gv), _emx_vprt); 4097 #endif 4061 4098 SvIOK_on(GvSV(gv)); 4099 #ifndef __KLIBC__ 4062 4100 gv = gv_fetchpv("OS2::emx_env", TRUE, SVt_PV); 4101 #endif 4063 4102 GvMULTI_on(gv); 4103 #ifndef __KLIBC__ 4064 4104 sv_setiv(GvSV(gv), _emx_env); 4105 #endif 4065 4106 gv = gv_fetchpv("OS2::os_ver", TRUE, SVt_PV); 4066 4107 GvMULTI_on(gv); … … 4073 4114 } 4074 4115 4116 #ifndef __KLIBC__ 4075 4117 extern void _emx_init(void*); 4118 #endif 4076 4119 4077 4120 static void jmp_out_of_atexit(void); … … 4080 4123 #define FORCE_EMX_INIT_INSTALL_ATEXIT 2 4081 4124 4125 #ifndef __KLIBC__ 4082 4126 static void 4083 4127 my_emx_init(void *layout) { … … 4095 4139 "popf\n" : : "r" (layout), "m" (old_esp) ); 4096 4140 } 4097 4141 #endif 4098 4142 struct layout_table_t { 4099 4143 ULONG text_base; … … 4115 4159 }; 4116 4160 4161 #ifndef __KLIBC__ 4117 4162 static ULONG 4118 4163 my_os_version() { … … 4130 4175 return osv_res; 4131 4176 } 4132 4177 #endif 4178 4179 #ifndef __KLIBC__ 4133 4180 static void 4134 4181 force_init_emx_runtime(EXCEPTIONREGISTRATIONRECORD *preg, ULONG flags) … … 4235 4282 exit(56); 4236 4283 } 4237 4284 #endif 4238 4285 static void 4239 4286 jmp_out_of_atexit(void) … … 4282 4329 #include <emx/startup.h> 4283 4330 4331 #ifndef __KLIBC__ 4284 4332 extern ULONG __os_version(); /* See system.doc */ 4285 4333 #endif 4334 4335 #ifndef __KLIBC__ 4286 4336 void 4287 4337 check_emx_runtime(char **env, EXCEPTIONREGISTRATIONRECORD *preg) … … 4339 4389 initialized either. Uninitialized EMX.DLL returns 0 in the low 4340 4390 nibble of __os_version(). */ 4391 4341 4392 v_emx = my_os_version(); 4342 4393 … … 4350 4401 v_crt = (_osmajor | _osminor); 4351 4402 4403 #ifndef __KLIBC__ 4352 4404 if ((_emx_env & 0x200) && !(v_emx & 0xFFFF)) { /* OS/2, EMX uninit. */ 4353 4405 force_init_emx_runtime( preg, 4354 4406 FORCE_EMX_INIT_CONTRACT_ARGV 4355 4407 | FORCE_EMX_INIT_INSTALL_ATEXIT ); 4408 #endif 4356 4409 emx_wasnt_initialized = 1; 4357 4410 /* Update CRTL data basing on now-valid EMX runtime data */ … … 4392 4445 DosReleaseMutexSem(hmtx_emx_init); 4393 4446 } 4394 4447 #endif 4395 4448 #define ENTRY_POINT 0x10000 4396 4449 … … 4430 4483 MALLOC_INIT; 4431 4484 4485 #ifndef __KLIBC__ 4432 4486 check_emx_runtime(env, (EXCEPTIONREGISTRATIONRECORD *)preg); 4433 4487 #endif 4434 4488 settmppath(); 4435 4489 OS2_Perl_data.xs_init = &Xs_OS2_init; … … 4442 4496 Newx(PL_sh_path, strlen(SH_PATH) + 1, char); 4443 4497 strcpy(PL_sh_path, SH_PATH); 4498 #ifndef __KLIBC__ 4444 4499 PL_sh_path[0] = shell[0]; 4500 #endif 4445 4501 } else if ( (shell = getenv("PERL_SH_DIR")) ) { 4446 4502 int l = strlen(shell), i; … … 4451 4507 strncpy(PL_sh_path, shell, l); 4452 4508 strcpy(PL_sh_path + l, "/sh.exe"); 4509 #ifndef __KLIBC__ 4453 4510 for (i = 0; i < l; i++) { 4454 4511 if (PL_sh_path[i] == '\\') PL_sh_path[i] = '/'; 4455 4512 } 4513 #endif 4456 4514 } 4457 4515 #if defined(USE_5005THREADS) || defined(USE_ITHREADS) … … 4494 4552 static ULONG max_fh = 0; 4495 4553 4554 #ifndef __KLIBC__ 4496 4555 if (!(_emx_env & 0x200)) return 1; /* not OS/2. */ 4556 #endif 4497 4557 if (fd >= max_fh) { /* Renew */ 4498 4558 LONG delta = 0; … … 4629 4689 MUTEX_UNLOCK(&perlos2_state_mutex); 4630 4690 } 4691 #ifndef __KLIBC__ 4631 4692 if (!(_emx_env & 0x200) || !use_my_flock) 4632 4693 return flock(handle, o); /* Delegate to EMX. */ 4694 #endif 4633 4695 4634 4696 /* is this a file? */ … … 4769 4831 } 4770 4832 4833 #ifndef __KLIBC__ 4771 4834 void 4772 4835 setgrent(void) … … 4787 4850 return getgrgid(0); 4788 4851 } 4789 4852 #endif 4790 4853 #undef getpwuid 4791 4854 #undef getpwnam -
trunk/essentials/dev-lang/perl/os2/os2ish.h
r3187 r3188 23 23 #define HAS_WAIT 24 24 #define HAS_DLERROR 25 #ifndef __KLIBC__ 25 26 #define HAS_WAITPID_RUNTIME (_emx_env & 0x200) 27 #else 28 #define HAS_WAITPID_RUNTIME 1 29 #endif 26 30 27 31 /* HAS_PASSWD … … 314 318 FILE *my_tmpfile (void); 315 319 char *my_tmpnam (char *); 320 #ifndef __KLIBC__ 316 321 int my_mkdir (__const__ char *, long); 322 #endif 317 323 int my_rmdir (__const__ char *); 318 324 struct passwd *my_getpwent (void); … … 348 354 #endif 349 355 356 #ifndef __KLIBC__ 350 357 struct group *getgrent (void); 351 358 void setgrent (void); 352 359 void endgrent (void); 353 360 #endif 354 361 struct passwd *my_getpwuid (uid_t); 355 362 struct passwd *my_getpwnam (__const__ char *); … … 395 402 396 403 #include <stdlib.h> /* before the following definitions */ 404 #ifndef __KLIBC__ 397 405 #include <unistd.h> /* before the following definitions */ 406 #endif 398 407 #include <fcntl.h> 399 408 #include <sys/stat.h> … … 411 420 #endif 412 421 422 #ifndef __KLIBC__ 413 423 #define PERLIO_IS_BINMODE_FD(fd) _PERLIO_IS_BINMODE_FD(fd) 424 #endif 414 425 415 426 #ifdef __GNUG__ … … 422 433 423 434 #include <emx/io.h> /* for _fd_flags() prototype */ 424 435 #ifndef __KLIBC__ 425 436 static inline bool 426 437 _PERLIO_IS_BINMODE_FD(int fd) … … 430 441 return pflags && (*pflags) & O_BINARY; 431 442 } 432 443 #endif 433 444 /* ctermid is missing from emx0.9d */ 434 445 char *ctermid(char *s); … … 536 547 #define OS2_XS_init() (*OS2_Perl_data.xs_init)(aTHX) 537 548 538 #if _EMX_CRT_REV_ >= 60 549 #ifndef __KLIBC__ 550 #if (_EMX_CRT_REV_ >= 60) 539 551 # define os2_setsyserrno(rc) (Perl_rc = rc, errno = errno_isOS2_set, \ 540 552 _setsyserrno(rc)) … … 542 554 # define os2_setsyserrno(rc) (Perl_rc = rc, errno = errno_isOS2) 543 555 #endif 556 #else 557 # define os2_setsyserrno(rc) (Perl_rc = rc, errno = errno_isOS2) 558 #endif /* __KLIBC__ */ 544 559 545 560 /* The expressions below return true on error. */ … … 781 796 my_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout) 782 797 { 798 #ifndef __KLIBC__ 783 799 if (nfds == 0 && timeout && (_emx_env & 0x200)) { 800 #else 801 if (nfds == 0 && timeout) { 802 #endif 784 803 if (async_mssleep(1000 * timeout->tv_sec + (timeout->tv_usec + 500)/1000, 500)) 785 804 return 0; … … 800 819 int os2_stat(const char *name, struct stat *st); 801 820 int fork_with_resources(); 821 #ifndef __KLIBC__ 802 822 int setpriority(int which, int pid, int val); 803 823 int getpriority(int which /* ignored */, int pid); 824 #endif 804 825 805 826 void croak_with_os2error(char *s) __attribute__((noreturn)); -
trunk/essentials/dev-lang/perl/perl.h
r3187 r3188 95 95 * __bsdi__ for BSD/OS 96 96 */ 97 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(PERL_DARWIN) || defined(__bsdi__) || defined(BSD41) || defined(BSD42) || defined(BSD43) || defined(BSD44) 97 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(PERL_DARWIN) || defined(__bsdi__) || defined(BSD41) || defined(BSD42) || defined(BSD43) || defined(BSD44) 98 98 # ifndef BSDish 99 99 # define BSDish … … 160 160 161 161 #ifndef PERL_UNUSED_DECL 162 # if def HASATTRIBUTE_UNUSED162 # if defined(HASATTRIBUTE_UNUSED) 163 163 # define PERL_UNUSED_DECL __attribute__unused__ 164 164 # else -
trunk/essentials/dev-lang/perl/t/io/fs.t
r3187 r3188 23 23 24 24 my $has_link = $Config{d_link}; 25 25 26 my $accurate_timestamps = 26 27 !($^O eq 'MSWin32' || $^O eq 'NetWare' || … … 37 38 } 38 39 } 40 41 if ($^O eq 'os2') { 42 $has_link = 0;} 39 43 40 44 my $needs_fh_reopen = -
trunk/essentials/dev-lang/perl/util.h
r3187 r3188 27 27 || ((f)[0] == '\\' && (f)[1] == '\\') /* UNC path */ \ 28 28 || ((f)[3] == ':')) /* volume name, currently only sys */ 29 # else /* !NETWARE */ 30 # if defined( DOSISH) || defined(EPOC) 29 # else /* !__NETWARE */ 30 # if defined( __KLIBC__) 31 # define PERL_FILE_IS_ABSOLUTE(f) \ 32 (*(f) == '/' || *(f) == '\\' \ 33 || ((f)[1] == ':' && (f)[2] == '/') || ((f)[1] == ':' && (f)[2] == '\\')) /* drive name */ 34 # else /* !__KLIBC__ */ 35 # if defined( DOSISH) || defined(EPOC) 31 36 # define PERL_FILE_IS_ABSOLUTE(f) \ 32 37 (*(f) == '/' \ … … 40 45 # endif /* DOSISH */ 41 46 # endif /* NETWARE */ 47 # endif /* __KLIBC__ */ 42 48 # endif /* WIN32 */ 43 49 #endif /* VMS */
Note:
See TracChangeset
for help on using the changeset viewer.