27#include <freeciv_config.h>
34#ifdef FREECIV_HAVE_SYS_TYPES_H
51#include <posix/be_prim.h>
52#define __bool_true_false_are_defined 1
54#ifdef FREECIV_HAVE_STDBOOL_H
60#undef __bool_true_false_are_defined
61#define bool unsigned int
64#define __bool_true_false_are_defined 1
71#ifdef FREECIV_HAVE_INTTYPES_H
74#ifdef FREECIV_HAVE_STDINT_H
87#define fc__attribute(x) __attribute__(x)
89#define fc__attribute(x)
94#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
95#define fc__warn_unused_result __attribute__((warn_unused_result))
98#ifndef fc__warn_unused_result
99#define fc__warn_unused_result
104#if defined(__GNUC__) && __GNUC__ >= 7
105#define fc__fallthrough __attribute__((fallthrough))
106#elif defined (__clang__) && __clang_major__ >= 12
107#define fc__fallthrough __attribute__((fallthrough))
109#define fc__fallthrough
112#ifdef FREECIV_MSWINDOWS
118#ifdef FREECIV_RETURN_VALUE_AFTER_EXIT
119#define RETURN_VALUE_AFTER_EXIT(_val_) return _val_ ;
121#define RETURN_VALUE_AFTER_EXIT(_val_)
124#ifdef FREECIV_NO_CONST_VAR_ARG
127#define VAR_ARG_CONST const
140char *
fc_strcasestr(
const char *haystack,
const char *needle);
142int fc_strcoll(
const char *str0,
const char *str1);
143int fc_stricoll(
const char *str0,
const char *str1);
145FILE *
fc_fopen(
const char *filename,
const char *opentype);
146#ifdef FREECIV_HAVE_LIBZ
148gzFile fc_gzopen(
const char *filename,
const char *opentype);
151int fc_stat(
const char *filename,
struct stat *buf);
158 const char *replace);
163size_t fc_strlcpy(
char *dest,
const char *src,
size_t n);
164size_t fc_strlcat(
char *dest,
const char *src,
size_t n);
167#define sz_strlcpy(dest,src) ((void) fc_strlcpy((dest), (src), sizeof(dest)))
168#define sz_strlcat(dest,src) ((void) fc_strlcat((dest), (src), sizeof(dest)))
181#ifdef FREECIV_SOCKET_ZERO_NOT_STDIN
183void fc_init_console(
void);
184char *fc_read_console(
void);
202struct tm *
fc_localtime(
const time_t *timep,
struct tm *result);
209#ifdef WORDS_BIGENDIAN
218 char *buf,
size_t buf_len);
int fc_gethostname(char *buf, size_t len)
size_t fc_strlcpy(char *dest, const char *src, size_t n)
void make_escapes(const char *str, char *buf, size_t buf_len)
int fc_strcasecmp(const char *str0, const char *str1)
void fc_usleep(unsigned long usec)
static bool is_bigendian(void)
void fc_support_init(void)
int fc_snprintf(char *str, size_t n, const char *format,...) fc__attribute((__format__(__printf__
const char * fc_strerror(fc_errno err)
size_t fc_strlcat(char *dest, const char *src, size_t n)
char * fc_strcasestr(const char *haystack, const char *needle)
bool fc_strrep(char *str, size_t len, const char *search, const char *replace)
struct tm * fc_localtime(const time_t *timep, struct tm *result)
FILE * fc_fopen(const char *filename, const char *opentype)
int fc_break_lines(char *str, size_t desired_len)
fc_errno fc_get_errno(void)
int int cat_snprintf(char *str, size_t n, const char *format,...) fc__attribute((__format__(__printf__
void fc_support_free(void)
void remove_escapes(const char *str, bool full_escapes, char *buf, size_t buf_len)
int fc_strcoll(const char *str0, const char *str1)
#define fc__warn_unused_result
int fc_stat(const char *filename, struct stat *buf)
bool is_reg_file_for_access(const char *name, bool write_access)
const char * fc_basename(const char *path)
int fc_vsnprintf(char *str, size_t n, const char *format, va_list ap) fc__attribute((nonnull(1
int fc_strncasequotecmp(const char *str0, const char *str1, size_t n)
size_t effectivestrlenquote(const char *str)
int fc_at_quick_exit(void(*func)(void))
int fc_stricoll(const char *str0, const char *str1)
int fc_remove(const char *filename)
int fc_strncasecmp(const char *str0, const char *str1, size_t n)
char * fc_strrep_resize(char *str, size_t *len, const char *search, const char *replace) fc__warn_unused_result
bool are_support_services_available(void)