* [PATCH] 5.0.0_beta1: glibc 2.4.0 quirk
@ 2007-09-26 10:03 Denys Vlasenko
2007-09-26 15:11 ` Ian Kent
0 siblings, 1 reply; 2+ messages in thread
From: Denys Vlasenko @ 2007-09-26 10:03 UTC (permalink / raw)
To: Ian Kent; +Cc: autofs
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
hi Ian,
I have glibc 2.4.0 installed, and it expands pthread_cleanup_pop(1) into:
} while (0); __pthread_unregister_cancel (&__cancel_buf); if (1) __cancel_routine (__cancel_arg); } while (0);
This doesn't compile if you have a label before it.
gcc 4.2.1 says "error: label at end of compound statement".
This patch works around it by adding extra semicolon.
--
vda
[-- Attachment #2: autofs-5.0.0_beta1-quirk.patch --]
[-- Type: text/x-diff, Size: 1064 bytes --]
diff -d -urpN autofs-5.0.0_beta1-PATH/daemon/direct.c autofs-5.0.0_beta1-quirk/daemon/direct.c
--- autofs-5.0.0_beta1-PATH/daemon/direct.c 2007-09-26 10:29:28.000000000 +0100
+++ autofs-5.0.0_beta1-quirk/daemon/direct.c 2007-09-26 10:38:01.000000000 +0100
@@ -967,7 +967,10 @@ int handle_packet_expire_direct(struct a
pthread_cleanup_pop(1);
done:
- pthread_cleanup_pop(1);
+ /* glibc 2.4.0 expands it into: */
+ /* } while (0); __pthread_unregister_cancel (&__cancel_buf); if (1) __cancel_routine (__cancel_arg); } while (0); */
+ /* ...and gcc 4.2.1 says "error: label at end of compound statement" */
+ ; pthread_cleanup_pop(1);
return status;
}
@@ -1258,7 +1261,10 @@ int handle_packet_missing_direct(struct
pthread_cleanup_pop(1);
done:
- pthread_cleanup_pop(1);
+ /* glibc 2.4.0 expands it into: */
+ /* } while (0); __pthread_unregister_cancel (&__cancel_buf); if (1) __cancel_routine (__cancel_arg); } while (0); */
+ /* ...and gcc 4.2.1 says "error: label at end of compound statement" */
+ ; pthread_cleanup_pop(1);
return status;
}
[-- Attachment #3: Type: text/plain, Size: 140 bytes --]
_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] 5.0.0_beta1: glibc 2.4.0 quirk
2007-09-26 10:03 [PATCH] 5.0.0_beta1: glibc 2.4.0 quirk Denys Vlasenko
@ 2007-09-26 15:11 ` Ian Kent
0 siblings, 0 replies; 2+ messages in thread
From: Ian Kent @ 2007-09-26 15:11 UTC (permalink / raw)
To: Denys Vlasenko; +Cc: autofs
On Wed, 2007-09-26 at 11:03 +0100, Denys Vlasenko wrote:
> hi Ian,
>
> I have glibc 2.4.0 installed, and it expands pthread_cleanup_pop(1) into:
>
> } while (0); __pthread_unregister_cancel (&__cancel_buf); if (1) __cancel_routine (__cancel_arg); } while (0);
>
> This doesn't compile if you have a label before it.
> gcc 4.2.1 says "error: label at end of compound statement".
>
> This patch works around it by adding extra semicolon.
Cool, I'll test this out and commit it.
Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-26 15:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-26 10:03 [PATCH] 5.0.0_beta1: glibc 2.4.0 quirk Denys Vlasenko
2007-09-26 15:11 ` Ian Kent
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.