mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-02 22:54:15 +00:00
win32: fixup some headers to improve win32 compilation
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
a9984a4e60
commit
840fb8b7cb
23
src/common.h
23
src/common.h
@ -1,6 +1,10 @@
|
||||
#ifndef INCLUDE_common_h__
|
||||
#define INCLUDE_common_h__
|
||||
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
#define GIT_WIN32 1
|
||||
#endif
|
||||
|
||||
#include "git/thread-utils.h"
|
||||
|
||||
#ifdef GIT_HAS_PTHREAD
|
||||
@ -11,9 +15,26 @@
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef GIT_WIN32
|
||||
|
||||
# include <io.h>
|
||||
# include <winsock2.h>
|
||||
|
||||
typedef int ssize_t;
|
||||
|
||||
#else
|
||||
|
||||
# include <unistd.h>
|
||||
# include <sys/mman.h>
|
||||
# include <arpa/inet.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "cc-compat.h"
|
||||
#include "git/common.h"
|
||||
#include "util.h"
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "common.h"
|
||||
#include "fileops.h"
|
||||
#include <sys/mman.h>
|
||||
|
||||
int gitfo_open(const char *path, int flags)
|
||||
{
|
||||
|
@ -10,14 +10,9 @@
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
|
||||
#include "common.h"
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#define GITFO_BUF_INIT {NULL, 0}
|
||||
|
Loading…
Reference in New Issue
Block a user