OSDN Git Service

On architectures where we don't have any special inline code for
authorBruce Momjian <bruce@momjian.us>
Sat, 18 Jul 1998 14:51:10 +0000 (14:51 +0000)
committerBruce Momjian <bruce@momjian.us>
Sat, 18 Jul 1998 14:51:10 +0000 (14:51 +0000)
commita93f397423076b2c2670bc4d3beedbe3a421f5b3
treea9e168e3077c0bc8d039b1917d65a512f9bcd1c7
parentb47466482f28760df1442507e4c2221297d1376e
On architectures where we don't have any special inline code for
GCC, the inner "#if defined(__GNUC__)" can just be omitted in that
architecture's block.

The existing arrangement with an outer "#if defined(__GNUC__)"
doesn't have any obvious benefit, and it encourages missed cases
like this one.

BTW, I'd suggest making the definition of clear_lock for HPUX be

static const slock_t clear_lock = {{-1, -1, -1, -1}};

The extra braces are needed to suppress warnings from gcc, and
declaring it const just seems like good practice.

regards, tom lane
src/include/storage/s_lock.h