Commit cfe3a027 by Ramsay Jones

Use a 64 bit off_t throughout the library and tests on POSIX

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
parent 960ca1d7
#ifndef INCLUDE_common_h__ #ifndef INCLUDE_common_h__
#define INCLUDE_common_h__ #define INCLUDE_common_h__
/** Force 64 bit off_t size on POSIX. */
#define _FILE_OFFSET_BITS 64
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__) #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
#define GIT_WIN32 1 #define GIT_WIN32 1
#endif #endif
......
...@@ -6,9 +6,6 @@ ...@@ -6,9 +6,6 @@
#ifndef INCLUDE_fileops_h__ #ifndef INCLUDE_fileops_h__
#define INCLUDE_fileops_h__ #define INCLUDE_fileops_h__
/** Force 64 bit off_t size on POSIX. */
#define _FILE_OFFSET_BITS 64
#include "common.h" #include "common.h"
#include "map.h" #include "map.h"
#include "dir.h" #include "dir.h"
......
#include "test_lib.h" #include "test_lib.h"
#include "errors.h" #include "errors.h"
#include <string.h>
BEGIN_TEST(errno_zero_on_init) BEGIN_TEST(errno_zero_on_init)
must_be_true(git_errno == 0); must_be_true(git_errno == 0);
......
#include <stdarg.h>
#include "test_lib.h" #include "test_lib.h"
#include "fileops.h" #include "fileops.h"
......
#include "test_lib.h" #include "test_lib.h"
#include <git/oid.h> #include <git/oid.h>
#include <stdlib.h>
BEGIN_TEST(oid_szs) BEGIN_TEST(oid_szs)
git_oid out; git_oid out;
......
#include "test_lib.h" #include "test_lib.h"
#include "test_helpers.h" #include "test_helpers.h"
#include <git/odb.h> #include <git/odb.h>
#include "fileops.h"
static char *odb_dir = "test-objects"; static char *odb_dir = "test-objects";
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "test_lib.h" #include "test_lib.h"
#include "test_helpers.h" #include "test_helpers.h"
#include <git/odb.h> #include <git/odb.h>
#include "fileops.h"
/* /*
* read loose objects from the object directory. The objects are * read loose objects from the object directory. The objects are
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "test_lib.h" #include "test_lib.h"
#include "test_helpers.h" #include "test_helpers.h"
#include <git/odb.h> #include <git/odb.h>
#include "fileops.h"
/* /*
* read loose objects from the object directory. The objects are * read loose objects from the object directory. The objects are
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*/ */
#include "common.h"
#include "test_helpers.h" #include "test_helpers.h"
#include "fileops.h" #include "fileops.h"
......
...@@ -23,10 +23,7 @@ ...@@ -23,10 +23,7 @@
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*/ */
#include <stdio.h> #define GIT__NO_HIDE_MALLOC
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include "test_lib.h" #include "test_lib.h"
struct test_info struct test_info
......
...@@ -23,9 +23,14 @@ ...@@ -23,9 +23,14 @@
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*/ */
#include <stdio.h> #include "common.h"
#include <git/common.h> #include <git/common.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
/** Declare a function never returns to the caller. */ /** Declare a function never returns to the caller. */
#ifdef __GNUC__ #ifdef __GNUC__
# define NORETURN __attribute__((__noreturn__)) # define NORETURN __attribute__((__noreturn__))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment