aboutsummaryrefslogtreecommitdiff
path: root/src/lib/fdio/fdio.h
blob: 99bc33c64bb927135a092330f393323f23ac1165 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* Copyright (c) 2003-2004, Roger Dingledine
 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
 * Copyright (c) 2007-2020, The Tor Project, Inc. */
/* See LICENSE for licensing information */

/**
 * \file fdio.h
 *
 * \brief Header for fdio.c
 **/

#ifndef TOR_FDIO_H
#define TOR_FDIO_H

#include <stddef.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif

off_t tor_fd_getpos(int fd);
int tor_fd_setpos(int fd, off_t pos);
int tor_fd_seekend(int fd);
int tor_ftruncate(int fd);
int write_all_to_fd_minimal(int fd, const char *buf, size_t count);

#endif /* !defined(TOR_FDIO_H) */