Dermot McCluskey wrote:
> 
> Please review and give comments:
> http://cr.opensolaris.org/~dermot/tcltk64-01/
> 
> This change adds 64-bit libs and binaries for Tcl and Tk.
> It also adds back in a few Targetdirs entries that seem to have
> gone missing during someone else's putback.

1. "/usr/src/lib/tcl/Makefile.sfw": It may be nice to tweak the compiler
to be...
-- snip --
CC="/opt/SUNWspro/bin/cc -xc99=%all -D_XOPEN_SOURCE=600
-D__EXTENSIONS__=1"
-- snip --
... this is the same we do for ksh93 and enables both C99 compiler
features and XPG6 mode+extensions (which includes some nice things like
that |popen()|&co. use a /usr/xpg4/bin/sh etc. (which is much closer to
what opensource projects assume as "minimum system shell")) - otherwise
you're locked to Sun Studio's default mode... and that's not really
"fun".. ;-(

2. "/usr/src/lib/tcl/Makefile.sfw": Please add "-xstrconst" to the
CFLAGS to make sure that string literals are put into the read-only
section and not duplicated each time in a read-write section (gcc does
this by default) - this should save some memory

3. small nit: "/usr/src/lib/tcl/Makefile.sfw":
Somehow I wish the makefile would use SHELL=/usr/bin/ksh or
SHELL=/usr/bin/ksh93 (precedent for SHELL=/usr/bin/ksh exists in OS/Net)
and then replace things like x=`basename` (Bourne-shell style) with
x="$(basename)" (POSIX-shell style)

4. small nit: "/usr/src/lib/tcl/Makefile.sfw":
Please add quotes around the arguments for "mv" (otherwise it's an
accident which just waits to wreak havoc), e.g. replace
-- snip --
@@ -84,8 +120,21 @@
            for i in *.n ; do manbase=`basename $$i .n`; mv $$i $$manbase.1t;
done ; \
            for i in *.3 ; do manbase=`basename $$i .3`; mv $$i
$$manbase.3tcl; done)
-- snip --
... with ...
-- snip --
@@ -84,8 +120,21 @@
            for i in *.n ; do manbase="$(basename "$$i" .n)"; mv "$$i"
"$${manbase}.1t"; done ; \
            for i in *.3 ; do manbase="$(basename "$$i" .3)"; mv "$$i"
"$${manbase}.3tcl"; done)
-- snip --

5. small nit: usr/src/lib/tk/install-sfw-64
AFAIK it may be nice to use /usr/bin/ksh or /usr/bin/ksh93 (or "bash" if
it supports the "errexit" flag) for this script and then do a $ set -o
errexit # at the beginning that the script - the "errexit" flag causes
the shell to immediately abort the script when it hits a command which
returns a failure instead of continuing operation (and maybe running
amok (and ordering 500 new Ferraris via your Ebay-account etc. =:-) ))
...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to