I experienced a problem compiling openssh_cvs with IRIX 6.5.11f.
% cc -version
MIPSpro Compilers: Version 7.3.1.2m
% cc -n32 -mips3 -O2 -OPT:Olimit=0 ..... -c auth.c
cc-1515 cc: ERROR File = auth.c, Line = 100
A value of type "int" cannot be assigned to an entity of type
"char *".
while ((cp = getusershell()) != NULL)
^
1 error detected in the compilation of "auth.c".
*** openssh_cvs/auth.c- Sun Mar 18 12:52:30 2001
--- openssh_cvs/auth.c Sun Mar 18 13:32:20 2001
***************
*** 57,63 ****
allowed_user(struct passwd * pw)
{
struct stat st;
! char *shell, *cp;
int i;
#ifdef WITH_AIXAUTHENTICATE
char *loginmsg;
--- 57,63 ----
allowed_user(struct passwd * pw)
{
struct stat st;
! char *shell, *cp, *getusershell();
int i;
#ifdef WITH_AIXAUTHENTICATE
char *loginmsg;
-- ayamura
On 18 Mar 2001, Ayamura KIKUCHI wrote:> I experienced a problem compiling openssh_cvs with IRIX 6.5.11f. > > % cc -version > MIPSpro Compilers: Version 7.3.1.2m > > % cc -n32 -mips3 -O2 -OPT:Olimit=0 ..... -c auth.c > cc-1515 cc: ERROR File = auth.c, Line = 100 > A value of type "int" cannot be assigned to an entity of type "char *". > > while ((cp = getusershell()) != NULL) > ^ > > 1 error detected in the compilation of "auth.c". > > *** openssh_cvs/auth.c- Sun Mar 18 12:52:30 2001 > --- openssh_cvs/auth.c Sun Mar 18 13:32:20 2001 > *************** > *** 57,63 **** > allowed_user(struct passwd * pw) > { > struct stat st; > ! char *shell, *cp; > int i; > #ifdef WITH_AIXAUTHENTICATE > char *loginmsg; > --- 57,63 ---- > allowed_user(struct passwd * pw) > { > struct stat st; > ! char *shell, *cp, *getusershell();Maybe it's me..but this logic really raises hairs on the back of my neck. Standard typecasing does not work? while ((cp = (char *) getusershell()) != NULL) It's much easier to parse and makes more. - Ben
> Standard typecasing does not work? > > while ((cp = (char *) getusershell()) != NULL)Yes, it works. Several OS such as IRXI do not have the getusershell(),setusershell() and endusershell() functions so we need to introduce those in a file "openbsd-compat/getusershell.c". -- ayamura