summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2011-11-14 14:52:21 -0500
committerGaetan Nadon <memsize@videotron.ca>2011-11-21 09:13:08 -0500
commit1108f9cfac5b78fc9660174aa4df592ecd87d287 (patch)
tree8cda73eeb5a3b0594f37aab32ced841bd6dc7916
parent0daee9eb57c826da120edf35c50e8947a43f19b2 (diff)
Remove unrequired large file descriptor partial support
The LFS "transitional extension" API is deprecated and is not available on FreeBSD. Large file support (64 bit) is not required on the geode 32 bit only architecture. There are some hints that the LFS transional extension API were not used correclty. The variable holding the value is held in an unsigned long rather than in off_t. The msr open call did not use the O_LARGEFILE flag and did not check for EOVERFLOW. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--src/durango.c2
-rw-r--r--src/geode_msr.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/src/durango.c b/src/durango.c
index 9d6970b..8795d41 100644
--- a/src/durango.c
+++ b/src/durango.c
@@ -32,8 +32,6 @@
#include "config.h"
#endif
-#define _LARGEFILE64_SOURCE
-
#include <unistd.h>
#include <errno.h>
#include <compiler.h>
diff --git a/src/geode_msr.c b/src/geode_msr.c
index 6de693f..26fd78f 100644
--- a/src/geode_msr.c
+++ b/src/geode_msr.c
@@ -1,4 +1,7 @@
-#define _LARGEFILE64_SOURCE
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
@@ -31,7 +34,7 @@ GeodeReadMSR(unsigned long addr, unsigned long *lo, unsigned long *hi)
if (fd == -1)
return -1;
- ret = lseek64(fd, (off64_t) addr, SEEK_SET);
+ ret = lseek(fd, (off_t) addr, SEEK_SET);
if (ret == -1)
return -1;
@@ -56,7 +59,7 @@ GeodeWriteMSR(unsigned long addr, unsigned long lo, unsigned long hi)
if (fd == -1)
return -1;
- if (lseek64(fd, (off64_t) addr, SEEK_SET) == -1)
+ if (lseek(fd, (off_t) addr, SEEK_SET) == -1)
return -1;
data[0] = lo;