After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 321493 - [PATCH] Latest gdm does not build on FreeBSD
[PATCH] Latest gdm does not build on FreeBSD
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.8.x
Other All
: Normal blocker
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2005-11-15 04:09 UTC by Joe Marcus Clarke
Modified: 2005-11-15 22:58 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Fix build on FreeBSD/DFlyBSD (1.40 KB, patch)
2005-11-15 04:09 UTC, Joe Marcus Clarke
none Details | Review

Description Joe Marcus Clarke 2005-11-15 04:09:27 UTC
Please describe the problem:
The latest GDM patch does not build on FreeBSD or DFlyBSD due to the VT_STATE
changes.  The attached patch attempts to back-port the previous code in the
FreeBSD/DFly case.

Steps to reproduce:
1. Try to build gdm HEAD or 2.8.0.6 on FreeBSD
2. 
3. 


Actual results:
The build dies:

getvt.c: In function `get_free_vt':
getvt.c:75: error: storage size of 'vtstat' isn't known
getvt.c:90: error: `VT_GETSTATE' undeclared (first use in this function)
getvt.c:90: error: (Each undeclared identifier is reported only once
getvt.c:90: error: for each function it appears in.)
getvt.c:75: warning: unused variable `vtstat'


Expected results:
GDM should build as it has done in the past.

Does this happen every time?
Yes.

Other information:
The attached patch is against HEAD.  A very similar one is needed for 2.8.0.6.
Comment 1 Joe Marcus Clarke 2005-11-15 04:09:58 UTC
Created attachment 54769 [details] [review]
Fix build on FreeBSD/DFlyBSD
Comment 2 Daniel Macks 2005-11-15 14:49:41 UTC
By saying things like:

+#if defined(__linux__)
 	something;
+#elif defined (__FreeBSD__) || defined(__DragonFly__)
+	some-new-thing;
+#endif

patch 54769 is falsely assuming that all machines that are not FreeBSD or
DragonFly are linux. You're breaking compile on all machines that aren't any of
those but for whom the now-linux-only code ("something") was correct. How about
leaving the default case to be the way it was?

+#if defined (__FreeBSD__) || defined(__DragonFly__)
+	some-new-thing;
+#else
 	something;
+#endif
Comment 3 Joe Marcus Clarke 2005-11-15 16:24:34 UTC
I completely agree.  However, I borrowed that notation from surrounding code
(and from the previous revisions of the file).  I think that VT auto-detection
only works on Linux and FreeBSD/DFlyBSD for now anyway.
Comment 4 Daniel Macks 2005-11-15 17:20:46 UTC
Ooh, good point. /me got hypersensitive to linux assumptions, didn't look at the
context of the code:(
Comment 5 Brian Cameron 2005-11-15 22:58:58 UTC
Fixed in CVS head.  I didn't use the provided patch.  It seems that the linux
and freebsd logic for this function are so different at this point that the
#ifdef's just make everything look too messy.  Now there are two functions and
only one #ifdef to decide which function to call. 

Also, I copied the old logic for BSD from the previous release of GDM since it
seemed to have better cleanup logic.  If you disagree that this is appropriate,
then let me know the reasoning and we can work this out.

Fixed in CVS head and 2.12 branch.