Portage Rhapsody

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1889 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 1998-03-13 19:59:11 +00:00
parent c75800174b
commit c0d06c862a
6 changed files with 30 additions and 11 deletions

View File

@ -43,7 +43,7 @@
bytecode interpreter (THREADED_CODE defined in config/sm-Mac.h).
*/
#if defined(__GNUC__) && __GNUC__ >= 2 && !defined(DEBUG)
#if defined(__GNUC__) && __GNUC__ >= 2 && !defined(DEBUG) && !defined (SHRINKED_GNUC)
#define THREADED_CODE
#endif

View File

@ -444,6 +444,9 @@ EOF
echo ns32k-sni-sysv
fi
exit 0 ;;
"Power Macintosh":Rhapsody:*:*)
echo powerpc-apple-rhapsody
exit 0;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2

View File

@ -641,7 +641,7 @@ case $os in
| -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -openbsd* )
| -udi* | -eabi* | -lites* | -openbsd* | -rhapsody* )
# Remember, each alternative MUST END IN *, to match a version number.
;;
-sunos5*)

View File

@ -34,7 +34,9 @@ int main(void)
long n[10];
int res;
signal(SIGSEGV, sig_handler);
#ifdef SIGBUS
signal(SIGBUS, sig_handler);
#endif
if(setjmp(failure) == 0) {
access_double((double *) n);
access_double((double *) (n+1));
@ -43,7 +45,9 @@ int main(void)
res = 1;
}
signal(SIGSEGV, SIG_DFL);
#ifdef SIGBUS
signal(SIGBUS, SIG_DFL);
#endif
exit(res);
}

16
configure vendored
View File

@ -20,6 +20,7 @@ manext=1
host_type=unknown
cc=''
cclibs=''
mathlib='-lm'
x11_include_dir=''
x11_lib_dir=''
posix_threads=no
@ -143,6 +144,10 @@ case "$bytecc,$host" in
# GNU C extensions disabled, but __GNUC__ still defined!
bytecccompopts="-fno-defer-pop -Wall -U__GNUC__ -posix"
bytecclinkopts="-posix";;
cc,*-*-rhapsody*)
# Almost the same as NeXTStep
bytecccompopts="-fno-defer-pop -Wall -DSHRINKED_GNUC"
mathlib="";;
gcc,alpha-*-osf*)
bytecccompopts="-fno-defer-pop -Wall"
# -taso puts code in lower 4GB
@ -265,6 +270,7 @@ case "$host" in
rs6000-*-aix*) arch=power; model=rs6000; system=aix;;
powerpc-*-aix*) arch=power; model=ppc; system=aix;;
powerpc-*-linux*) arch=power; model=ppc; system=elf;;
powerpc-*-rhapsody*) arch=power; model=ppc; system=rhapsody;;
m68k-*-sunos*) arch=m68k; system=sunos;;
esac
@ -284,6 +290,7 @@ case "$arch,$nativecc,$system" in
mips,cc*,ultrix) nativecccompopts=-std;;
*,*,nextstep) nativecccompopts="-Wall -U__GNUC__ -posix"
nativecclinkopts="-posix";;
*,*,rhapsody) nativecccompopts="-Wall -DSHRINKED_GNUC";;
*,gcc*,*) nativecccompopts=-Wall;;
esac
@ -304,6 +311,7 @@ case "$arch,$model,$system" in
power,rs6000,aix) asflags='-u -m pwr -w'; asppflags="$asflags";;
power,ppc,aix) asflags='-u -m ppc -w'; asppflags="$asflags";;
power,*,elf) aspp='gcc'; asppflags='-c';;
power,*,rhapsody) ;;
esac
# Where is ranlib?
@ -358,7 +366,11 @@ fi
if sh ./hasgot sigaction sigprocmask; then
echo "POSIX signal handling found."
echo "#define POSIX_SIGNALS" >> s.h
case $host in
*-*-rhapsody*) echo "But it doesn't work properly."
echo "#define BSD_SIGNALS" >> s.h;;
*) echo "#define POSIX_SIGNALS" >> s.h;;
esac
else
if sh ./runtest signals.c; then
echo "Signals have the BSD semantics."
@ -679,7 +691,7 @@ fi
# Finish generated files
cclibs="$cclibs -lm"
cclibs="$cclibs $mathlib"
echo "BYTECC=$bytecc" >> Makefile
echo "BYTECCCOMPOPTS=$bytecccompopts" >> Makefile

View File

@ -40,18 +40,18 @@ static value alloc_host_entry(struct hostent *entry)
{
value res;
value name = Val_unit, aliases = Val_unit;
value addr_list = Val_unit, addr = Val_unit;
value addr_list = Val_unit, adr = Val_unit;
Begin_roots4 (name, aliases, addr_list, addr);
Begin_roots4 (name, aliases, addr_list, adr);
name = copy_string((char *)(entry->h_name));
aliases = copy_string_array(entry->h_aliases);
entry_h_length = entry->h_length;
#ifdef h_addr
addr_list = alloc_array(alloc_one_addr, entry->h_addr_list);
#else
addr = alloc_one_addr(entry->h_addr);
adr = alloc_one_addr(entry->h_addr);
addr_list = alloc_tuple(1);
Field(addr_list, 0) = addr;
Field(addr_list, 0) = adr;
#endif
res = alloc_tuple(4);
Field(res, 0) = name;
@ -64,11 +64,11 @@ static value alloc_host_entry(struct hostent *entry)
value unix_gethostbyaddr(value a) /* ML */
{
uint32 addr;
uint32 adr;
struct hostent * entry;
addr = GET_INET_ADDR(a);
adr = GET_INET_ADDR(a);
enter_blocking_section();
entry = gethostbyaddr((char *) &addr, 4, AF_INET);
entry = gethostbyaddr((char *) &adr, 4, AF_INET);
leave_blocking_section();
if (entry == (struct hostent *) NULL) raise_not_found();
return alloc_host_entry(entry);