1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Prevent tv_sec from becoming negative in connection timeout code.

This commit is contained in:
Bruce Momjian
2002-10-11 04:12:14 +00:00
parent c2311337f0
commit 6a7bb0afbc
6 changed files with 68 additions and 27 deletions

View File

@ -21,7 +21,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: palloc.h,v 1.19 2002/06/20 20:29:53 momjian Exp $
* $Id: palloc.h,v 1.20 2002/10/11 04:12:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -46,9 +46,12 @@ extern DLLIMPORT MemoryContext CurrentMemoryContext;
* Fundamental memory-allocation operations (more are in utils/memutils.h)
*/
extern void *MemoryContextAlloc(MemoryContext context, Size size);
extern void *MemoryContextAllocZero(MemoryContext context, Size size);
#define palloc(sz) MemoryContextAlloc(CurrentMemoryContext, (sz))
#define palloc0(sz) MemoryContextAllocZero(CurrentMemoryContext, (sz))
extern void pfree(void *pointer);
extern void *repalloc(void *pointer, Size size);