squid-
cache.org
Optimising Web Delivery
Docs
Download
Donate
Support
About
Contact
Shop
Blog
compat
stdio.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3
*
4
* Squid software is distributed under GPLv2+ license and includes
5
* contributions from numerous individuals and organizations.
6
* Please see the COPYING and CONTRIBUTORS files for details.
7
*/
8
9
#ifndef _SQUID_COMPAT_STDIO_H
10
#define _SQUID_COMPAT_STDIO_H
11
24
// Import the stdio.h definitions first to do the state setup
25
#if HAVE_STDIO_H
26
#include <
stdio.h
>
27
#endif
28
29
// Check for the buggy case
30
#if defined(__USE_FILE_OFFSET64) && !defined(__REDIRECT)
31
32
// Define the problem functions as needed
33
#if defined(fgetpos)
34
#undef fgetpos
35
inline
int
fgetpos(FILE *f, fpos64_t *p) {
return
fgetpos64(f,p); }
36
#endif
37
#if defined(fopen)
38
#undef fopen
39
inline
FILE * fopen(
const
char
*f,
const
char
*m) {
return
fopen64(f,m); }
40
#endif
41
#if defined(freopen)
42
#undef freopen
43
inline
FILE * freopen(
const
char
*f,
const
char
*m, FILE *s) {
return
freopen64(f,m,s); }
44
#endif
45
#if defined(fsetpos)
46
#undef fsetpos
47
inline
int
fsetpos(FILE *f, fpos64_t *p) {
return
fsetpos64(f,p); }
48
#endif
49
#if defined(tmpfile)
50
#undef tmpfile
51
inline
FILE * tmpfile(
void
) {
return
tmpfile64(); }
52
#endif
53
54
#endif
/* __USE_FILE_OFFSET64 && !__REDIRECT */
55
56
// Finally import the <cstdio> stuff we actually use
57
#if defined(__cplusplus)
58
#include <cstdio>
59
#endif
60
61
#ifndef MAXPATHLEN
62
#define MAXPATHLEN SQUID_MAXPATHLEN
63
#endif
64
65
#endif
/* _SQUID_COMPAT_STDIO_H */
66
stdio.h
Introduction
About Squid
Why Squid?
Squid Developers
How to Donate
How to Help Out
Getting Squid
Squid Source Packages
Squid Deployment Case-Studies
Squid Software Foundation
Documentation
Quick Setup
Configuration:
Reference
Examples
FAQ
and
Wiki
Guide Books:
Beginners
Definitive
Non-English
More...
Support
Security Advisories
Bugzilla Database
Mailing lists
Contacting us
Commercial services
Project Sponsors
Squid-based products
Miscellaneous
Developer Resources
Related Writings
Related Software:
Authenticators
Ecap
Icap
Ident
Log Analysis
Monitor
Proxies
Redirectors
General
Squid Artwork
Web Site Translations
Japanese
Mirrors
Website:
gr
il
pl
...
full list
FTP Package Archive