The Solaris function declaration from

        /usr/include/unistd.h:850: previous declaration of `getlogin_r'

looks like:

        extern char *getlogin_r(char *, int);

and "lib/glob.c" line 194 looks like:

        extern int getlogin_r (char *, size_t);

after checking with a test program "size_t" and "int" are both 4 bytes
on this platform.  The "size_t" type is "unsigned long" so I assume
"long" and "int" are equivialent.  Testing details follow:

Here's what I know about "size_t" and "int" based on this program:

        #include <stdio.h>
        #include <sys/types.h>

        int main( int argc, char *argv[ ] )
        {
                printf( "sizeof (int) = %u\n", sizeof (int) );
                printf( "sizeof (size_t) = %u\n", sizeof (size_t) );
                return 0;
        }

        /export/home/cvsusr:$ gcc main.c
        /export/home/cvsusr:$ a.out
        sizeof (int) = 4
        sizeof (size_t) = 4

adding these lines before "main" function:

        extern fido( int );
        extern fido( size_t );

gives this error:

        /export/home/cvsusr:$ gcc main.c
        main.c:5: conflicting types for `fido'
        main.c:4: previous declaration of `fido'

and the gcc version is:

        /export/home/cvsusr:$ gcc -v
        Reading specs from /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.2/specs
        gcc version 2.95.2 19991024 (release)



_______________________________________________
Bug-cvs mailing list
Bug-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-cvs

Reply via email to