make errors in gnome-libs-1.2.11: zvt/subshell.c



Hi,

I'm trying to compile gnome-libs-1.2.11, on a UnixWare 7.1.1
host, i586-sco-sysv5uw7.1.1, using gcc 2.95.2.1, and gnu-make.

I'm sorry if this is longish, but I get two errors with
subshell.c, one because <sys/termio.h> is not included, and
the other one complains about ru_utime being an incomplete type.


Here's the configure command I used:

CPPFLAGS=-I/usr/local/BerkeleyDB/include \
LDFLAGS=-L/usr/local/BerkeleyDB/lib \
LIBS="-lsocket -lnsl -pthread" ./configure --x-libraries=/usr/X/lib --x-includes=/usr/X/include --disable-nls



Here's the first error from gmake (which is /usr/local/bin/make):
-----------------------------------------------------------------------
subshell.c: In function `zvt_resize_subshell':
subshell.c:416: warning: control reaches end of non-void function
gmake[2]: *** [subshell.lo] Error 1
gmake[2]: Leaving directory `/home/matthew/Uber/Gnome/gnome-libs-1.2.11/zvt'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/matthew/Uber/Gnome/gnome-libs-1.2.11'
gmake: *** [all-recursive-am] Error 2
-----------------------------------------------------------------------



Here's the function from subshell.c:
--------------------------------------------------------------------------
int zvt_resize_subshell (int fd, int col, int row, int xpixel, int ypixel)
{
#if defined TIOCSWINSZ && !defined SCO_FLAVOR
    struct winsize tty_size;

    tty_size.ws_row = row;
    tty_size.ws_col = col;
    tty_size.ws_xpixel = xpixel;
    tty_size.ws_ypixel = ypixel;

    return (ioctl (fd, TIOCSWINSZ, &tty_size));
#endif
}
----------------------------------------------------------------------------


If I edit subshell-includes.h and add
        #include <sys/termio.h>
then I get rid of this error, because termio.h defines TIOCSWINSZ.

==============================================================
==============================================================


Second error.  After fixing the first error, the make fails
because of the same file, subshell.c, with the following error:
(this error shows up all the time, I snipped it from the first issue)
-----------------------------------------------------------
In file included from subshell-includes.h:12,
                 from subshell.c:27:
/usr/include/sys/resource.h:125: field `ru_utime' has incomplete type
/usr/include/sys/resource.h:126: field `ru_stime' has incomplete type
gmake[2]: *** [subshell.lo] Error 1
----------------------------------------------------------




Here's the section from resource.h:
----------------------------------------------------------
struct  rusage {
        struct timeval ru_utime;        /* user time used */
        struct timeval ru_stime;        /* system time used */
        long    ru_maxrss;
#define ru_first        ru_ixrss
        long    ru_ixrss;               /* XXX: 0 */
        long    ru_idrss;               /* XXX: sum of rm_asrss */
        long    ru_isrss;               /* XXX: 0 */
        long    ru_minflt;              /* any page faults not requiring I/O */
        long    ru_majflt;              /* any page faults requiring I/O */
        long    ru_nswap;               /* swaps */
        long    ru_inblock;             /* block input operations */
        long    ru_oublock;             /* block output operations */
        long    ru_msgsnd;              /* messages sent */
        long    ru_msgrcv;              /* messages received */
        long    ru_nsignals;            /* signals received */
        long    ru_nvcsw;               /* voluntary context switches */
        long    ru_nivcsw;              /* involuntary " */
#define ru_last         ru_nivcsw
};
------------------------------------------------------------


Here's the section from <sys/time.h>
------------------------------------------------------------
#if (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE_EXTENDED - 0 >= 1) \
 || ( !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) \
 && !defined(_XOPEN_SOURCE))

#ifndef _TIMEVAL_STR
#define _TIMEVAL_STR
struct timeval {
        long    tv_sec;         /* seconds */
        long    tv_usec;        /* and microseconds */
};
#endif

#endif
------------------------------------------------------------


So I'm not sure what's wrong here.  Would someone tell
me what they make of this?  Is the timeval struct not getting
defined because it's inside a #if or something?

Thanks for you time,
Matthew




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]