File tree Expand file tree Collapse file tree 16 files changed +42
-89
lines changed Expand file tree Collapse file tree 16 files changed +42
-89
lines changed Original file line number Diff line number Diff line change @@ -13874,7 +13874,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
1387413874fi
1387513875
1387613876
13877- for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h net/if.h netinet/tcp.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/resource.h sys/ signalfd.h sys/sockio.h sys/ucred.h termios.h ucred.h
13877+ for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h net/if.h netinet/tcp.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/signalfd.h sys/sockio.h sys/ucred.h termios.h ucred.h
1387813878do :
1387913879 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1388013880ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -16734,12 +16734,6 @@ done
1673416734 ;;
1673516735esac
1673616736
16737- case " $LIBOBJS " in
16738- *" getrusage.$ac_objext "* ) ;;
16739- *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
16740- ;;
16741- esac
16742-
1674316737 case " $LIBOBJS " in
1674416738 *" kill.$ac_objext "* ) ;;
1674516739 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
@@ -16782,6 +16776,12 @@ esac
1678216776 ;;
1678316777esac
1678416778
16779+ case " $LIBOBJS " in
16780+ *" win32getrusage.$ac_objext "* ) ;;
16781+ *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
16782+ ;;
16783+ esac
16784+
1678516785 case " $LIBOBJS " in
1678616786 *" win32link.$ac_objext "* ) ;;
1678716787 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
Original file line number Diff line number Diff line change @@ -1459,7 +1459,6 @@ AC_CHECK_HEADERS(m4_normalize([
14591459 sys/personality.h
14601460 sys/prctl.h
14611461 sys/procctl.h
1462- sys/resource.h
14631462 sys/signalfd.h
14641463 sys/sockio.h
14651464 sys/ucred.h
@@ -1897,14 +1896,14 @@ fi
18971896if test "$PORTNAME" = "win32"; then
18981897 AC_CHECK_FUNCS ( _configthreadlocale )
18991898 AC_LIBOBJ ( dirmod )
1900- AC_LIBOBJ ( getrusage )
19011899 AC_LIBOBJ ( kill )
19021900 AC_LIBOBJ ( open )
19031901 AC_LIBOBJ ( system )
19041902 AC_LIBOBJ ( win32dlopen )
19051903 AC_LIBOBJ ( win32env )
19061904 AC_LIBOBJ ( win32error )
19071905 AC_LIBOBJ ( win32fdatasync )
1906+ AC_LIBOBJ ( win32getrusage )
19081907 AC_LIBOBJ ( win32link )
19091908 AC_LIBOBJ ( win32ntdll )
19101909 AC_LIBOBJ ( win32pread )
Original file line number Diff line number Diff line change 7575#include <dirent.h>
7676#include <sys/file.h>
7777#include <sys/param.h>
78+ #include <sys/resource.h> /* for getrlimit */
7879#include <sys/stat.h>
7980#include <sys/types.h>
8081#ifndef WIN32
8384#include <limits.h>
8485#include <unistd.h>
8586#include <fcntl.h>
86- #ifdef HAVE_SYS_RESOURCE_H
87- #include <sys/resource.h> /* for getrlimit */
88- #endif
8987
9088#include "access/xact.h"
9189#include "access/xlog.h"
Original file line number Diff line number Diff line change 2323#include <limits.h>
2424#include <signal.h>
2525#include <unistd.h>
26+ #include <sys/resource.h>
2627#include <sys/select.h>
2728#include <sys/socket.h>
28- #ifdef HAVE_SYS_RESOURCE_H
2929#include <sys/time.h>
30- #include <sys/resource.h>
31- #endif
32-
33- #ifdef WIN32
34- #include "rusagestub.h"
35- #endif
3630
3731#include "access/parallel.h"
3832#include "access/printtup.h"
@@ -4860,7 +4854,7 @@ ShowUsage(const char *title)
48604854 * The following rusage fields are not defined by POSIX, but they're
48614855 * present on all current Unix-like systems so we use them without any
48624856 * special checks. Some of these could be provided in our Windows
4863- * emulation in src/port/getrusage .c with more work.
4857+ * emulation in src/port/win32getrusage .c with more work.
48644858 */
48654859 appendStringInfo (& str ,
48664860 "!\t%ld kB max resident size\n" ,
Original file line number Diff line number Diff line change 1414#include <fcntl.h>
1515#include <signal.h>
1616#include <time.h>
17+ #include <sys/resource.h>
1718#include <sys/stat.h>
19+ #include <sys/time.h>
1820#include <sys/wait.h>
1921#include <unistd.h>
2022
21- #ifdef HAVE_SYS_RESOURCE_H
22- #include <sys/time.h>
23- #include <sys/resource.h>
24- #endif
2523
2624#include "catalog/pg_control.h"
2725#include "common/controldata_utils.h"
Original file line number Diff line number Diff line change 4040#include <signal.h>
4141#include <time.h>
4242#include <sys/time.h>
43- #ifdef HAVE_SYS_RESOURCE_H
4443#include <sys/resource.h> /* for getrlimit */
45- #endif
4644
4745/* For testing, PGBENCH_USE_SELECT can be defined to force use of that code */
4846#if defined(HAVE_PPOLL ) && !defined(PGBENCH_USE_SELECT )
Original file line number Diff line number Diff line change 505505/* Define to 1 if you have the <sys/procctl.h> header file. */
506506#undef HAVE_SYS_PROCCTL_H
507507
508- /* Define to 1 if you have the <sys/resource.h> header file. */
509- #undef HAVE_SYS_RESOURCE_H
510-
511508/* Define to 1 if you have the <sys/signalfd.h> header file. */
512509#undef HAVE_SYS_SIGNALFD_H
513510
Original file line number Diff line number Diff line change 1+ /*
2+ * Replacement for <sys/resource.h> for Windows.
3+ */
4+ #ifndef WIN32_SYS_RESOURCE_H
5+ #define WIN32_SYS_RESOURCE_H
6+
7+ #include <sys/time.h> /* for struct timeval */
8+
9+ #define RUSAGE_SELF 0
10+ #define RUSAGE_CHILDREN (-1)
11+
12+ struct rusage
13+ {
14+ struct timeval ru_utime ; /* user time used */
15+ struct timeval ru_stime ; /* system time used */
16+ };
17+
18+ extern int getrusage (int who , struct rusage * rusage );
19+
20+ #endif /* WIN32_SYS_RESOURCE_H */
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1414#ifndef PG_RUSAGE_H
1515#define PG_RUSAGE_H
1616
17- #include <sys/time.h>
18-
19- #ifdef HAVE_SYS_RESOURCE_H
2017#include <sys/resource.h>
21- #else
22- #include "rusagestub.h"
23- #endif
18+ #include <sys/time.h>
2419
2520
2621/* State structure for pg_rusage_init/pg_rusage_show */
You can’t perform that action at this time.
0 commit comments