ref: 8d92858a9140e9e8336b44f79696f1bec43ad3e4
parent: 28ff0e0d1d2e08739775ff0c9b9044db1d1b9c1a
parent: 91c75c5c2390d8703c96bb8a7886a905ce26f12d
author: James Zern <[email protected]>
date: Wed Jan 13 23:13:24 EST 2016
Merge changes I6998e15f,I88891d9f * changes: Remove unused POSIX_MMAP references Remove unused stdint.h check
--- a/configure
+++ b/configure
@@ -263,9 +263,7 @@
HAVE_LIST="
${ARCH_EXT_LIST}
vpx_ports
- stdint_h
pthread_h
- sys_mman_h
unistd_h
"
EXPERIMENT_LIST="
@@ -550,16 +548,12 @@
# Specialize windows and POSIX environments.
case $toolchain in
*-win*-*)
- case $header-$toolchain in
- stdint*-gcc) true;;
- *) false;;
- esac && enable_feature $var
- ;;
+ # Don't check for any headers in Windows builds.
+ false
+ ;;
*)
case $header in
- stdint.h) true;;
pthread.h) true;;
- sys/mman.h) true;;
unistd.h) true;;
*) false;;
esac && enable_feature $var
@@ -575,9 +569,7 @@
int main(void) {return 0;}
EOF
# check system headers
- check_header stdint.h
check_header pthread.h
- check_header sys/mman.h
check_header unistd.h # for sysconf(3) and friends.
check_header vpx/vpx_integer.h -I${source_path} && enable_feature vpx_ports
--- a/examples/vp8_multi_resolution_encoder.c
+++ b/examples/vp8_multi_resolution_encoder.c
@@ -29,13 +29,6 @@
#include <math.h>
#include <assert.h>
#include <sys/time.h>
-#if USE_POSIX_MMAP
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <fcntl.h>
-#include <unistd.h>
-#endif
#include "vpx_ports/vpx_timer.h"
#include "vpx/vpx_encoder.h"
#include "vpx/vp8cx.h"
--- a/vpxstats.c
+++ b/vpxstats.c
@@ -26,17 +26,6 @@
stats->buf.buf = NULL;
res = (stats->file != NULL);
} else {
-#if USE_POSIX_MMAP
- struct stat stat_buf;
- int fd;
-
- fd = open(fpf, O_RDONLY);
- stats->file = fdopen(fd, "rb");
- fstat(fd, &stat_buf);
- stats->buf.sz = stat_buf.st_size;
- stats->buf.buf = mmap(NULL, stats->buf.sz, PROT_READ, MAP_PRIVATE, fd, 0);
- res = (stats->buf.buf != NULL);
-#else
size_t nbytes;
stats->file = fopen(fpf, "rb");
@@ -58,7 +47,6 @@
nbytes = fread(stats->buf.buf, 1, stats->buf.sz, stats->file);
res = (nbytes == stats->buf.sz);
-#endif /* USE_POSIX_MMAP */
}
return res;
@@ -82,11 +70,7 @@
void stats_close(stats_io_t *stats, int last_pass) {
if (stats->file) {
if (stats->pass == last_pass) {
-#if USE_POSIX_MMAP
- munmap(stats->buf.buf, stats->buf.sz);
-#else
free(stats->buf.buf);
-#endif /* USE_POSIX_MMAP */
}
fclose(stats->file);