lördag den 21 januari 2012 klockan 08:11 skrev Alfred M. Szmidt detta: > > BTW, syslogd.sh says #!/bin/sh, but it seems to use non-POSIX > > extensions, no? > > > > What extentions do are you thinking of exactly? I couldn't find > > anything particular > > I noticed the $((foo)) construct that, according to the Autoconf > manual, doesn't work on Solaris 10. However I thought we had some > positive success on Solaris? > > $((FOO)) is in IEEE 1003.1-2004, not sure about earlier. Maybe > Solaris uses a non-POSIX shell?
I wish I had access to Solaris 9 or 10 for building IU, but alas. On OpenIndiana, sh(1) and most other shells are linked to different personalities of ksh93(1), and so is the documentation. On GNU/OpenSolaris, i.e., NexentaCore, sh(1) and some more are linked to bash(1): /bin/sh -> bash However, the manual page sh(1) claims to describe /usr/bin/sh ( -> bash on NexentaCore ) /usr/xpg4/bin/sh of which the latter is a standalone variant of ksh(1). The important observation is that the manual page sh(1) is NOT mentioning either of $( ) or $(( )). Still tests show that "/usr/xpg4/bin/sh" does understand both contructs since it is closely related to the Korn shell. My interpretation is that we should avoid "$( )" and "$(( ))" if we want to support Solaris 10 or 9. Regards, Mats
