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
13874
13874
fi
13875
13875
13876
13876
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
13878
13878
do :
13879
13879
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13880
13880
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -16734,12 +16734,6 @@ done
16734
16734
;;
16735
16735
esac
16736
16736
16737
- case " $LIBOBJS " in
16738
- *" getrusage.$ac_objext "* ) ;;
16739
- *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
16740
- ;;
16741
- esac
16742
-
16743
16737
case " $LIBOBJS " in
16744
16738
*" kill.$ac_objext "* ) ;;
16745
16739
*) LIBOBJS="$LIBOBJS kill.$ac_objext"
@@ -16782,6 +16776,12 @@ esac
16782
16776
;;
16783
16777
esac
16784
16778
16779
+ case " $LIBOBJS " in
16780
+ *" win32getrusage.$ac_objext "* ) ;;
16781
+ *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
16782
+ ;;
16783
+ esac
16784
+
16785
16785
case " $LIBOBJS " in
16786
16786
*" win32link.$ac_objext "* ) ;;
16787
16787
*) LIBOBJS="$LIBOBJS win32link.$ac_objext"
6D40
tr>
Original file line number Diff line number Diff line change @@ -1459,7 +1459,6 @@ AC_CHECK_HEADERS(m4_normalize([
1459
1459
sys/personality.h
1460
1460
sys/prctl.h
1461
1461
sys/procctl.h
1462
- sys/resource.h
1463
1462
sys/signalfd.h
1464
1463
sys/sockio.h
1465
1464
sys/ucred.h
@@ -1897,14 +1896,14 @@ fi
1897
1896
if test "$PORTNAME" = "win32"; then
1898
1897
AC_CHECK_FUNCS ( _configthreadlocale )
1899
1898
AC_LIBOBJ ( dirmod )
1900
- AC_LIBOBJ ( getrusage )
1901
1899
AC_LIBOBJ ( kill )
1902
1900
AC_LIBOBJ ( open )
1903
1901
AC_LIBOBJ ( system )
1904
1902
AC_LIBOBJ ( win32dlopen )
1905
1903
AC_LIBOBJ ( win32env )
1906
1904
AC_LIBOBJ ( win32error )
1907
1905
AC_LIBOBJ ( win32fdatasync )
1906
+ AC_LIBOBJ ( win32getrusage )
1908
1907
AC_LIBOBJ ( win32link )
1909
1908
AC_LIBOBJ ( win32ntdll )
1910
1909
AC_LIBOBJ ( win32pread )
Original file line number Diff line number Diff line change 75
75
#include <dirent.h>
76
76
#include <sys/file.h>
77
77
#include <sys/param.h>
78
+ #include <sys/resource.h> /* for getrlimit */
78
79
#include <sys/stat.h>
79
80
#include <sys/types.h>
80
81
#ifndef WIN32
83
84
#include <limits.h>
84
85
#include <unistd.h>
85
86
#include <fcntl.h>
86
- #ifdef HAVE_SYS_RESOURCE_H
87
- #include <sys/resource.h> /* for getrlimit */
88
- #endif
89
87
90
88
#include "access/xact.h"
91
89
#include "access/xlog.h"
Original file line number Diff line number Diff line change 23
23
#include <limits.h>
24
24
#include <signal.h>
25
25
#include <unistd.h>
26
+ #include <sys/resource.h>
26
27
#include <sys/select.h>
27
28
#include <sys/socket.h>
28
- #ifdef HAVE_SYS_RESOURCE_H
29
29
#include <sys/time.h>
30
- #include <sys/resource.h>
31
- #endif
32
-
33
- #ifdef WIN32
34
- #include "rusagestub.h"
35
- #endif
36
30
37
31
#include "access/parallel.h"
38
32
#include "access/printtup.h"
@@ -4860,7 +4854,7 @@ ShowUsage(const char *title)
4860
4854
* The following rusage fields are not defined by POSIX, but they're
4861
4855
* present on all current Unix-like systems so we use them without any
4862
4856
* 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.
4864
4858
*/
4865
4859
appendStringInfo (& str ,
4866
4860
"!\t%ld kB max resident size\n" ,
Original file line number Diff line number Diff line change 14
14
#include <fcntl.h>
15
15
#include <signal.h>
16
16
#include <time.h>
17
+ #include <sys/resource.h>
17
18
#include <sys/stat.h>
19
+ #include <sys/time.h>
18
20
#include <sys/wait.h>
19
21
#include <unistd.h>
20
22
21
- #ifdef HAVE_SYS_RESOURCE_H
22
- #include <sys/time.h>
23
- #include <sys/resource.h>
24
- #endif
25
23
26
24
#include "catalog/pg_control.h"
27
25
#include "common/controldata_utils.h"
Original file line number Diff line number Diff line change 40
40
#include <signal.h>
41
41
#include <time.h>
42
42
#include <sys/time.h>
43
- #ifdef HAVE_SYS_RESOURCE_H
44
43
#include <sys/resource.h> /* for getrlimit */
45
- #endif
46
44
47
45
/* For testing, PGBENCH_USE_SELECT can be defined to force use of that code */
48
46
#if defined(HAVE_PPOLL ) && !defined(PGBENCH_USE_SELECT )
Original file line number Diff line number Diff line change 505
505
/* Define to 1 if you have the <sys/procctl.h> header file. */
506
506
#undef HAVE_SYS_PROCCTL_H
507
507
508
- /* Define to 1 if you have the <sys/resource.h> header file. */
509
- #undef HAVE_SYS_RESOURCE_H
510
-
511
508
/* Define to 1 if you have the <sys/signalfd.h> header file. */
512
509
#undef HAVE_SYS_SIGNALFD_H
513
510
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 14
14
#ifndef PG_RUSAGE_H
15
15
#define PG_RUSAGE_H
16
16
17
- #include <sys/time.h>
18
-
19
- #ifdef HAVE_SYS_RESOURCE_H
20
17
#include <sys/resource.h>
21
- #else
22
- #include "rusagestub.h"
23
- #endif
18
+ #include <sys/time.h>
24
19
25
20
26
21
/* State structure for pg_rusage_init/pg_rusage_show */
You can’t perform that action at this time.
0 commit comments