Blame src/win32/posix.h

Packit Service 20376f
/*
Packit Service 20376f
 * Copyright (C) the libgit2 contributors. All rights reserved.
Packit Service 20376f
 *
Packit Service 20376f
 * This file is part of libgit2, distributed under the GNU GPL v2 with
Packit Service 20376f
 * a Linking Exception. For full terms see the included COPYING file.
Packit Service 20376f
 */
Packit Service 20376f
#ifndef INCLUDE_posix__w32_h__
Packit Service 20376f
#define INCLUDE_posix__w32_h__
Packit Service 20376f
Packit Service 20376f
#include "common.h"
Packit Service 20376f
#include "../posix.h"
Packit Service 20376f
#include "win32-compat.h"
Packit Service 20376f
#include "path_w32.h"
Packit Service 20376f
#include "utf-conv.h"
Packit Service 20376f
#include "dir.h"
Packit Service 20376f
Packit Service 20376f
extern unsigned long git_win32__createfile_sharemode;
Packit Service 20376f
extern int git_win32__retries;
Packit Service 20376f
Packit Service 20376f
typedef SOCKET GIT_SOCKET;
Packit Service 20376f
Packit Service 20376f
#define p_lseek(f,n,w) _lseeki64(f, n, w)
Packit Service 20376f
Packit Service 20376f
extern int p_fstat(int fd, struct stat *buf);
Packit Service 20376f
extern int p_lstat(const char *file_name, struct stat *buf);
Packit Service 20376f
extern int p_stat(const char* path, struct stat *buf);
Packit Service 20376f
Packit Service 20376f
extern int p_utimes(const char *filename, const struct p_timeval times[2]);
Packit Service 20376f
extern int p_futimes(int fd, const struct p_timeval times[2]);
Packit Service 20376f
Packit Service 20376f
extern int p_readlink(const char *path, char *buf, size_t bufsiz);
Packit Service 20376f
extern int p_symlink(const char *old, const char *new);
Packit Service 20376f
extern int p_link(const char *old, const char *new);
Packit Service 20376f
extern int p_unlink(const char *path);
Packit Service 20376f
extern int p_mkdir(const char *path, mode_t mode);
Packit Service 20376f
extern int p_fsync(int fd);
Packit Service 20376f
extern char *p_realpath(const char *orig_path, char *buffer);
Packit Service 20376f
Packit Service 20376f
extern int p_recv(GIT_SOCKET socket, void *buffer, size_t length, int flags);
Packit Service 20376f
extern int p_send(GIT_SOCKET socket, const void *buffer, size_t length, int flags);
Packit Service 20376f
extern int p_inet_pton(int af, const char* src, void* dst);
Packit Service 20376f
Packit Service 20376f
extern int p_vsnprintf(char *buffer, size_t count, const char *format, va_list argptr);
Packit Service 20376f
extern int p_snprintf(char *buffer, size_t count, const char *format, ...) GIT_FORMAT_PRINTF(3, 4);
Packit Service 20376f
extern int p_mkstemp(char *tmp_path);
Packit Service 20376f
extern int p_chdir(const char* path);
Packit Service 20376f
extern int p_chmod(const char* path, mode_t mode);
Packit Service 20376f
extern int p_rmdir(const char* path);
Packit Service 20376f
extern int p_access(const char* path, mode_t mode);
Packit Service 20376f
extern int p_ftruncate(int fd, git_off_t size);
Packit Service 20376f
Packit Service 20376f
/* p_lstat is almost but not quite POSIX correct.  Specifically, the use of
Packit Service 20376f
 * ENOTDIR is wrong, in that it does not mean precisely that a non-directory
Packit Service 20376f
 * entry was encountered.  Making it correct is potentially expensive,
Packit Service 20376f
 * however, so this is a separate version of p_lstat to use when correct
Packit Service 20376f
 * POSIX ENOTDIR semantics is required.
Packit Service 20376f
 */
Packit Service 20376f
extern int p_lstat_posixly(const char *filename, struct stat *buf);
Packit Service 20376f
Packit Service 20376f
extern struct tm * p_localtime_r(const time_t *timer, struct tm *result);
Packit Service 20376f
extern struct tm * p_gmtime_r(const time_t *timer, struct tm *result);
Packit Service 20376f
Packit Service 20376f
/* Use the bundled regcomp */
Packit Service 20376f
#define p_regcomp regcomp
Packit Service 20376f
Packit Service 20376f
#endif