Skip to content

Commit d6ce9dd

Browse files
committed
[PBCKP-245] mingw: no need to define custom sleep/usleep
Mingw defines usable them.
1 parent c3be893 commit d6ce9dd

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

src/utils/pgut.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,20 +1061,6 @@ init_cancel_handler(void)
10611061
SetConsoleCtrlHandler(consoleHandler, TRUE);
10621062
}
10631063

1064-
int
1065-
sleep(unsigned int seconds)
1066-
{
1067-
Sleep(seconds * 1000);
1068-
return 0;
1069-
}
1070-
1071-
int
1072-
usleep(unsigned int usec)
1073-
{
1074-
Sleep((usec + 999) / 1000); /* rounded up */
1075-
return 0;
1076-
}
1077-
10781064
#undef select
10791065
static int
10801066
select_win32(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timeval * timeout)

src/utils/pgut.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,4 @@ extern char *pgut_str_strip_trailing_filename(const char *filepath, const char *
9898
extern int wait_for_socket(int sock, struct timeval *timeout);
9999
extern int wait_for_sockets(int nfds, fd_set *fds, struct timeval *timeout);
100100

101-
#ifdef WIN32
102-
extern int sleep(unsigned int seconds);
103-
extern int usleep(unsigned int usec);
104-
#endif
105-
106101
#endif /* PGUT_H */

0 commit comments

Comments
 (0)