Hi Dennis, yes, as you mentioned, there are number of differences in the GNU and Solaris environment and I think maintainer of the Solaris version cares about it and patches official sources (in case if it's needed) at its discretion. Check these patches. It's hard to maintain one git-tree for all systems and platforms (don't forget - some of them are proprietar). This is the reason why each UNIX and UNIX-like system has its maintainer (even each GNU/Linux distribution has its screen maintainer).
I tested screen on OpenIndiana few weeks ago. It was version 4.6.1, I think, and it works perfectly :) What is the best size for PATH_MAX on Solaris? Sorry, but I don't know. Some systems use 255, some of them 4096... We took 1024. As I said, each maintainer is free to change this value at its discretion. Cheers, Alex On Mon, Jul 9, 2018 at 10:49 PM Dennis Clarke <dcla...@blastwave.org> wrote: > > > So I love screen and who doesn't? Really? Anyone that doesn't think > "screen" is the UNIX/Linux swiss army knife has rocks in their head. > > I sure can not live without it. > > However I have been dragging around a binary[1] for years and years and > finally figured that I should maybe cook up a new rev. Lovely that the > sources are easy to get and so I felt I should try to do all this with > a hard core C99 compiler on Solaris 10 Sparc. So that would be the > Oracle Studio 12.6 developer tools kit and the c99 therein is ruthless > about compliance. Seemed like a good idea to give that a whirl : > > PATH=$PATH:/usr/local/bin /usr/local/bin/aclocal > > PATH=$PATH:/usr/local/bin /usr/local/bin/autoreconf -i > > That gives me a configure script which seems to run fine : > > $ ./configure --prefix=/export/home/dclarke/local \ > > --disable-socket-dir --enable-colors256 --with-socket-dir=/var/tmp \ > > --with-sys-screenrc=/export/home/dclarke/local/etc > this is screen version 4.6.2 > checking for gcc... /opt/developerstudio12.6/bin/c99 > checking whether the C compiler works... yes > checking for C compiler default output file name... a.out > checking for suffix of executables... > checking whether we are cross compiling... no > checking for suffix of object files... o > checking whether we are using the GNU C compiler... no > checking whether /opt/developerstudio12.6/bin/c99 accepts -g... yes > checking for /opt/developerstudio12.6/bin/c99 option to accept ISO > C89... none needed > checking how to run the C preprocessor... > /opt/developerstudio12.6/bin/c99 -E > checking for grep that handles long lines and -e... /usr/local/bin/grep > checking for egrep... /usr/local/bin/grep -E > checking for library containing strerror... none required > checking for ANSI C header files... yes > checking for sys/types.h... yes > checking for sys/stat.h... yes > checking for stdlib.h... yes > checking for string.h... yes > checking for memory.h... yes > checking for strings.h... yes > checking for inttypes.h... yes > checking for stdint.h... yes > checking for unistd.h... yes > checking minix/config.h usability... no > checking minix/config.h presence... no > checking for minix/config.h... no > checking whether it is safe to define __EXTENSIONS__... yes > checking for gawk... /usr/local/bin/gawk > checking for a BSD-compatible install... ./install.sh -c > configure: checking for buggy tools... > checking if a system-wide socket dir should be used... no. ~/.screen > will be used instead. > configure: checking for MIPS... > configure: checking for Ultrix... > configure: checking for butterfly... > configure: checking for POSIX.1... > - you have a POSIX system > configure: checking for System V... > configure: checking for sequent/ptx... > configure: checking SVR4... > checking dwarf.h usability... no > checking dwarf.h presence... no > checking for dwarf.h... no > checking elf.h usability... yes > checking elf.h presence... yes > checking for elf.h... yes > checking stropts.h usability... yes > checking stropts.h presence... yes > checking for stropts.h... yes > checking for string.h... (cached) yes > checking for strings.h... (cached) yes > configure: checking for Solaris 2.x... > configure: checking BSD job jontrol... > - you have jobcontrol > configure: checking setresuid... > configure: checking setreuid... > configure: checking seteuid... > configure: checking execvpe... > configure: checking select... > configure: checking fifos... > - your fifos are usable > configure: checking for broken fifo implementation... > - your implementation is ok > configure: checking sockets... > - your sockets are not usable > - select can't count > configure: checking for tgetent... > configure: checking libcurses... > - you use the terminfo database > configure: checking ospeed... > configure: checking for /dev/ptc... > configure: checking for SVR4 ptys... > checking for getpt... no > configure: checking for ptyranges... > configure: checking default tty permissions/group... > checking for write... /usr/bin/write > checking for xterm... /usr/openwin/bin/xterm > - pty mode: 0620, group: 7 > configure: checking getutent... > configure: checking ut_host... > checking utempter.h usability... no > checking utempter.h presence... no > checking for utempter.h... no > configure: checking for libutil(s)... > configure: checking getloadavg... > assuming posix signal definition > configure: checking for crypt and sec libraries... > configure: checking crypt... > configure: checking IRIX sun library... > configure: checking syslog... > configure: checking wait union... > configure: checking for termio or termios... > configure: checking getspnam... > configure: checking getttyent... > configure: checking fdwalk... > configure: checking whether memcpy/memmove/bcopy handles overlapping > arguments... > checking for long file names... yes > checking for vsprintf... yes > checking for dirent.h that defines DIR... yes > checking for library containing opendir... none required > checking for setenv... checking for nl_langinfo(CODESET)... yes > checking for library containing gethostname... none required > checking for rename... yes > checking for fchmod... yes > checking for fchown... yes > checking for strerror... yes > checking for lstat... yes > checking for _exit... yes > checking for utimes... yes > checking for vsnprintf... yes > checking for getcwd... yes > checking for setlocale... yes > checking for strftime... yes > checking for the global screenrc file... configure: creating > ./config.status > config.status: creating Makefile > config.status: creating doc/Makefile > config.status: creating config.h > config.status: executing default commands > > Now please check the pathnames in the Makefile and in the user > configuration section in config.h. > Then type 'make' to make screen. Good luck. > > $ > > > OKay ... good luck indeed : > > > $ /usr/local/bin/gmake 2>&1 | tee > ../screen-4.6.2_SunOS5.10_sparc64vii+.001.compile.log > CPP="/opt/developerstudio12.6/bin/c99 -E -I/usr/local/include > -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE > -DETCSCREENRC='"/export/home/dclarke/local/etc"' > -DSCREENENCODINGS='"/export/home/dclarke/local/share/screen/utf8encodings"'" > > srcdir=. sh ./osdef.sh > AWK=/usr/local/bin/gawk CC="/opt/developerstudio12.6/bin/c99 > -errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 > -xmemalign=8s -xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee -mc > -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 > -xarch=sparc" srcdir=. sh ./comm.sh > AWK=/usr/local/bin/gawk srcdir=. sh ./term.sh > /opt/developerstudio12.6/bin/c99 -c -I. -I. -I/usr/local/include > -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE > -DETCSCREENRC='"/export/home/dclarke/local/etc"' > -DSCREENENCODINGS='"/export/home/dclarke/local/share/screen/utf8encodings"' > > -DHAVE_CONFIG_H -DGIT_REV=\"\" \ > -errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff > -m64 -xmemalign=8s -xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee > -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf > -xunroll=1 -xarch=sparc screen.c > "layer.h", line 79: warning: nonportable bit-field type > "screen.c", line 688: error: undefined symbol: PATH_MAX > "screen.c", line 1746: warning: implicit function declaration: kill > c99: acomp failed for screen.c > gmake: *** [Makefile:82: screen.o] Error 2 > $ > > That was fast. > > Well PATH_MAX should be in limits.h and sure enough it is : > > #ifndef PATH_MAX > #define PATH_MAX 1024 /* max # of characters in a path name */ > #endif > > Hrmmm ... welll this is a Solaris box and Linux boxen may have that as > 4096 bytes and who knows what else may be out there. At the very least > a trap for ENAMETOOLONG may be needed but for now ... quick hack, I will > drop PATH_MAX directly into screen.c as 1024 bytes. However maybe the > minimum _POSIX_PATH_MAX should be used? No idea on that. I could > stuff in the POSIX.1-1990 defaults which is _POSIX_PATH_MAX=255. > > Anyways moving on. > > Somehow "kill()" isn't defined. > > Baffling because screen.c has #include <sys/types.h> but the signal.h > seems to be wrapped inside #ifndef SIGINT and that's weird. I think > the c99 compiler defines _STRICT_STDC and somehow I don't get what > is needed here. At all. > > Anyways .. thought I'd let you know before I give up on c99 and just > go with cc and some easy CFLAGS. > > Dennis > > > [1] $ $HOME/bin/screen -v > Screen version 4.00.03 (FAU) 23-Oct-06 > >