chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Chicken-users] Diff file to compile Chicken 4.5.0 on OpenSolaris


From: Semih Cemiloglu
Subject: RE: [Chicken-users] Diff file to compile Chicken 4.5.0 on OpenSolaris
Date: Tue, 25 May 2010 14:31:23 +1000

Hi Felix,

Regarding this:
"The C_path_to_executable function in chicken.h is possibly not working.
Does Solaris something resembling the "/proc/<PID>/exe" thingy available
on Linux? We need a way to get at the real location of the currently
running executable in the file-system."

The patch for the chicken.h and the full modified version of it is attached to 
this message:

diff chicken-4.5.0-org/chicken.h chicken-4.5.0/chicken.h
2220c2220
< # ifdef __linux__
---
> # if defined(__linux__) || defined(__sun)
2225a2226
> # ifdef __linux__
2226a2228,2230
> # else
>   C_sprintf(linkname, "/proc/%i/path/a.out", pid); /* SunOS == Solaris */
> # endif

With this change, all of the regression tests pass (on OpenSolaris):

======================================== private repository test ...
../chicken private-repository-test.scm -output-file tmp/xxx.c -include-path ..
cc tmp/xxx.c -o tmp/xxx.o -c -errtags -DHAVE_CHICKEN_CONFIG_H 
-DC_ENABLE_PTABLES -xdebugformat=stabs -xannotate=no -g -xO3 
-DC_PRIVATE_REPOSITORY -I.. -I"/stow/chicken-4.5.0/include"
rm tmp/xxx.c
cc tmp/xxx.o -o tmp/xxx -L.. -L"/stow/chicken-4.5.0/lib" -lchicken -lrt 
-lsocket -lnsl -lm -ldl
rm tmp/xxx.o
(/export/home/semihc/Packages/chicken-4.5.0/tests/tmp 
/export/home/semihc/Packages/chicken-4.5.0/tests/tmp)
(/export/home/semihc/Packages/chicken-4.5.0/tests/tmp 
/export/home/semihc/Packages/chicken-4.5.0/tests/tmp)


I would appreciate if you please merge this change to main trunk. Consequently, 
the condition in 
runtests.sh for this particular test case should be removed:

 # Skip this test on Solaris/Sun CC
 if [ "$OS_NAME" != "SunOS" -o "$C_COMPILER" != "cc" ]; then


Kind regards,
Semih Cemiloglu

Attachment: chicken.h
Description: chicken.h


reply via email to

[Prev in Thread] Current Thread [Next in Thread]