A gcc puzzle for the experts
walt
wa1ter at myrealbox.com
Tue Jan 25 16:24:42 PST 2005
The problem is that the gnomevfs2 port won't compile on my
gcc34 machine, but compiles perfectly on the gcc2 machine
and on FreeBSD-CURRENT (gcc 3.4.2).
This is the error:
cdda-method.c:647: error: syntax error before "else"
and this is the offending code:
/* Check and see if we already have opened and stashed this drive */
if (!use_base) {
if (global_context != NULL) {
#ifdef __linux__
if (strcmp (drive->cdda_device_name,
global_context->drive->cdda_device_name) == 0) {
#elif defined(__FreeBSD__)
if (strcmp (drive->dev->device_path,
global_context->drive->dev->device_path) == 0) {
#endif
use_cache = TRUE;
cdda_close (drive);
gnome_vfs_file_info_copy (file_info,
global_context->file_info);
} else {
/* We have a new drive. */
cdda_context_free (global_context);
global_context = cdda_context_new (drive, uri);
cdda_set_file_info_for_root (global_context,
uri);
gnome_vfs_file_info_copy (file_info,
global_context->file_info);
}
} else { <======== line 647
/* Create a new context */
global_context = cdda_context_new (drive, uri);
<remainder of sourcefile snipped>
The error occurs even if I change __FreeBSD__ to __DragonFly__ because
the error is a *syntax* error, not an undefined symbol or missing header.
So, anyone have a clue what is wrong -- anyone else getting the same error?
More information about the Users
mailing list