PostgreSQL Source Code: src/port/win32pwrite.c Source File (original) (raw)

Go to the documentation of this file.

1/*-------------------------------------------------------------------------

2 *

3 * win32pwrite.c

4 * Implementation of pwrite(2) for Windows.

5 *

6 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group

7 *

8 * IDENTIFICATION

9 * src/port/win32pwrite.c

10 *

11 *-------------------------------------------------------------------------

12 */

13

14

15#include "c.h"

16

17#include <windows.h>

18

21{

25

28 {

30 return -1;

31 }

32

33 /* Avoid overflowing DWORD. */

34 size = Min(size, 1024 * 1024 * 1024);

35

36 /* Note that this changes the file position, despite not using it. */

39

41 {

43 return -1;

44 }

45

46 return result;

47}

static char buf[DEFAULT_XLOG_SEG_SIZE]

static int fd(const char *x, int i)

void _dosmaperr(unsigned long)