Peter Eisentraut wrote:
Robert Lor wrote:

The attached patch contains a couple of fixes in the existing probes and includes a few new ones.

- Fixed compilation errors on OS X for probes that use typedefs

Could you explain what these errors are about? I don't see any errors on my machine.

In the current probes.d, the following probe definitions are commented out because they cause compilation errors on OS X.

        * probe lock__wait__start(unsigned int, LOCKMODE);
        * probe lock__wait__done(unsigned int, LOCKMODE);
        * probe buffer__read__start(BlockNumber, Oid, Oid, Oid, bool);
        * probe buffer__read__done(BlockNumber, Oid, Oid, Oid, bool, bool);

The problem was fixed by making the changes below. probes.d is preprocessed with cpp and as such only macros get expanded.

From:

typedef unsigned int LocalTransactionId;
typedef int LWLockId;
typedef int LWLockMode;
typedef int LOCKMODE;
typedef unsigned int BlockNumber;
typedef unsigned int Oid;
typedef int ForkNumber;


To:

#define LocalTransactionId unsigned int
#define LWLockId int
#define LWLockMode int
#define LOCKMODE int
#define BlockNumber unsigned int
#define Oid unsigned int
#define ForkNumber int





--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to