I just got alerted about the fact that FAMEvent contains PATH_MAX:
typedef struct FAMEvent {
FAMConnection* fc; /* The fam connection that event occurred on */
FAMRequest fr; /* Corresponds to the FamRequest from monitor */
char *hostname; /* host and filename - pointer to which */
char filename[PATH_MAX]; /* file changed */
void *userdata; /* userdata associated with this monitor req. */
enum FAMCodes code; /* What happened to file - see above */
} FAMEvent;
not only is PATH_MAX large, making FAMEvent over 4k, it is also not really
a constant, so whenever PATH_MAX changes (it may change soon on linux from
4095 to 4096 for standardization reasons) the FAM ABI breaks.
I'm not sure what is the right solution here. Maybe using FAM_PATH_MAX or
something that doesn't change. Or just use dynamically allocated strings.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl@xxxxxxxxxx alla@xxxxxxxxxxxxxx
He's a notorious Jewish dog-catcher with a secret. She's an artistic hip-hop
archaeologist with a knack for trouble. They fight crime!
--
Source code, list archive, and docs: http://oss.sgi.com/projects/fam/
To unsubscribe: echo unsubscribe fam | mail majordomo@xxxxxxxxxxx
|