1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

Use consistent format for reporting GetLastError()

Use something like "error code %lu" for reporting GetLastError()
values on Windows.  Previously, a mix of different wordings and
formats were in use.
This commit is contained in:
Peter Eisentraut
2011-08-23 22:00:52 +03:00
parent 6c6a415333
commit 1af55e2751
18 changed files with 132 additions and 132 deletions

View File

@ -91,7 +91,7 @@ PGSemaphoreCreate(PGSemaphore sema)
}
else
ereport(PANIC,
(errmsg("could not create semaphore: error code %d", (int) GetLastError())));
(errmsg("could not create semaphore: error code %lu", GetLastError())));
}
/*
@ -158,7 +158,7 @@ PGSemaphoreLock(PGSemaphore sema, bool interruptOK)
if (errno != 0)
ereport(FATAL,
(errmsg("could not lock semaphore: error code %d", (int) GetLastError())));
(errmsg("could not lock semaphore: error code %lu", GetLastError())));
}
/*
@ -171,7 +171,7 @@ PGSemaphoreUnlock(PGSemaphore sema)
{
if (!ReleaseSemaphore(*sema, 1, NULL))
ereport(FATAL,
(errmsg("could not unlock semaphore: error code %d", (int) GetLastError())));
(errmsg("could not unlock semaphore: error code %lu", GetLastError())));
}
/*
@ -200,7 +200,7 @@ PGSemaphoreTryLock(PGSemaphore sema)
/* Otherwise we are in trouble */
ereport(FATAL,
(errmsg("could not try-lock semaphore: error code %d", (int) GetLastError())));
(errmsg("could not try-lock semaphore: error code %lu", GetLastError())));
/* keep compiler quiet */
return false;