[csw-maintainers] Solaris 8&9: No header file for (get|set|end)usershell, but libc provides it?

Sebastian Kayser skayser at opencsw.org
Tue Sep 15 23:27:27 CEST 2009


Hi,

does anyone know why there would be no include files with function
declarations for the (get|set|end)usershell functions on Solaris 8 & 9,
although the functions are documented and provided by libc?

I have an application that tries to build with -errwarn and bails out
with implicit function declaration warnings. On both build8s and build9s
the situation is about the same

  $ apropos usershell
  endusershell    getusershell (3c)   - get legal user shells
  getusershell    getusershell (3c)   - get legal user shells
  setusershell    getusershell (3c)   - get legal user shells

  $ ggrep -Er '(get|set|end)usershell' /usr/include/
  $

  $ nm -p /usr/lib/libc.so | ggrep -Er '(get|set|end)usershell'
  0000247760 T endusershell
  0000247684 T getusershell
  0000000000 f getusershell.c
  0000247860 T setusershell

build10s does have the function declaration in unistd.h

  $ ggrep -Er '(get|set|end)usershell' /usr/include/
  /usr/include/unistd.h:extern void endusershell(void);
  /usr/include/unistd.h:extern char *getusershell(void);
  /usr/include/unistd.h:extern void setusershell(void);
  /usr/include/unistd.h:extern void endusershell();
  /usr/include/unistd.h:extern char *getusershell();
  /usr/include/unistd.h:extern void setusershell();

What i noticed so far is that the man page for the affected libc calls
(in contrast to others) does not mention an include file on Solaris 8 &
9 ... never seen this before.

Sebastian



More information about the maintainers mailing list