[Spread-users] Patch to fix defect in spread 3.17.1
Piotr Kozieradzki
piotoru at zodiac.mimuw.edu.pl
Mon Jan 26 05:11:22 EST 2004
Steven Dake wrote:
>Folks,
>
>I have been using spread 3.17.1 for a few days testing it out and
>playing with it. Excellent job developers!
>
>I did notice one problem with the sp.h header file. In my application I
>am extremely unlucky and use both mailbox and service as a variable
>name. When the C preprocessor processes the C code, it replaces these
>variable names with "int" because they are #define'ed to int by sp.h.
>
>I have attached a patch which replaces the define's with typedefs, which
>are a little more application friendly.
>
>Thanks
>-steve
>
>
Sorry, I think that your patch could make some problem with strong type
checker compiler. Some times I would like to use "mailbox" as clean
'int' type.
Piotr Kozieradzki
>------------------------------------------------------------------------
>
>--- spread-src-3.17.1/sp.h 2002-09-27 10:08:46.000000000 -0700
>+++ spread-src-3.17.1-bugfix/sp.h 2003-12-29 23:26:33.000000000 -0700
>@@ -126,8 +126,8 @@
> #define GROUPS_TOO_SHORT -16
> #define MESSAGE_TOO_LONG -17
>
>-#define mailbox int
>-#define service int
>+typedef int mailbox;
>+typedef int service;
>
> #define MAX_CLIENT_SCATTER_ELEMENTS 100
>
>
>
More information about the Spread-users
mailing list