This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: xfce4 - xffm


On Thu, 10 Jun 2004, Dave Korn wrote:

> > -----Original Message-----
> > From: cygwin-owner On Behalf Of getting_out
> > Sent: 10 June 2004 13:52
>
> > I'm trying to compile xfce4 under cygwin. It's almost fine
> > but I have an error while trying to compile xffm.
>
> > like said before I'm having trouble compiling xffm-4.0.5. The
> > error I have is
> >
> > /include/glib-2.0 -I/usr/lib/glib-2.0/include -DPACKAGE_DATA_DIR=\"/usr/local/share\" -DPACKAGE_LOCALE_DIR=\"/usr/local/share/locale\" -g -O2 -MT libxffm_fstab_la-fstab.lo -MD -MP -MF .deps/libxffm_fstab_la-fstab.Tpo -c fstab.c -DPIC -o .libs/libxffm_fstab_la-fstab.o
> > In file included from fstab.c:56:
> > /usr/include/mntent.h:29: error: syntax error before '*' token
> > /usr/include/mntent.h:30: error: syntax error before '*' token
> > /usr/include/mntent.h:31: error: syntax error before '*' token
> > /usr/include/mntent.h:32: error: syntax error before '*' token
> > fstab.c: In function `is_mounted':
> > fstab.c:221: warning: assignment from incompatible pointer type
> > fstab.c: In function `open_fstab':
> > fstab.c:472: warning: assignment from incompatible pointer type
> > fstab.c:501: warning: assignment from incompatible pointer type
> > make[2]: *** [libxffm_fstab_la-fstab.lo] Error 1
> > make[2]: Leaving directory `/usr/local/src/xfce-4.0.5/src/xffm-4.0.5/libs'
> > make[1]: *** [all-recursive] Error 1
> > make[1]: Leaving directory `/usr/local/src/xfce-4.0.5/src/xffm-4.0.5'
> > make: *** [all] Error 2
> >
> > I've tried search with google with no result.
> >
> > Can anyone help me pls.
>
>    Yep.  The problem is on lines 29-32 of mntent.h.  When you see "syntax
> error before '*'", that's almost always something that's trying to declare a
> pointer to a type that hasn't yet been defined.  Taking a look at mntent.h,
> we see that lines 29-32 are:
>
> dk@mace /artimi> head -32 /usr/include/mntent.h  | tail -4
> FILE *setmntent (const char *__filep, const char *__type);
> struct mntent *getmntent (FILE *__filep);
> int addmntent (FILE *__filep, const struct mntent *__mnt);
> int endmntent (FILE *__filep);
>
>   So the problem is that when compiling fstab.c, this header has been
> included, but the FILE type is unknown.  If you edit fstab.c and add
> #include <stdio.h> before the line that includes mntent.h, you should get
> somewhere.
>
>   That doesn't answer the question of why fstab.c doesn't already do so,
> which is probably down to a bug in whatever kind of autoconf-or-similar the
> software uses.  But I've no idea what xfce4 is, so I can't advise on that.

Dave,

IMO, this is a bug in <mntent.h>.  There's no reason not to include all
the prerequisites, as include guards will take care of multiple includes.
It shouldn't require the users to include other headers before it...

Yes, I know, I know, PTC...
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]