27#include <freeciv_config.h>
34#ifdef FREECIV_HAVE_SYS_TYPES_H
50#ifndef FREECIV_HAVE_CXX_NULLPTR
54#ifndef FREECIV_HAVE_C23_NULLPTR
61#include <posix/be_prim.h>
62#define __bool_true_false_are_defined 1
64#ifdef FREECIV_HAVE_STDBOOL_H
70#undef __bool_true_false_are_defined
71#define bool unsigned int
74#define __bool_true_false_are_defined 1
81#ifdef FREECIV_HAVE_INTTYPES_H
84#ifdef FREECIV_HAVE_STDINT_H
97#define fc__attribute(x) __attribute__(x)
99#define fc__attribute(x)
104#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
105#define fc__warn_unused_result __attribute__((warn_unused_result))
108#ifndef fc__warn_unused_result
109#define fc__warn_unused_result
114#if defined(__GNUC__) && __GNUC__ >= 7
115#define fc__fallthrough __attribute__((fallthrough))
116#elif defined (__clang__) && __clang_major__ >= 12
117#define fc__fallthrough __attribute__((fallthrough))
119#define fc__fallthrough
122#if defined(__GNUC__) && __GNUC__ >= 5
123#define fc__noreturn __attribute__((noreturn))
128#ifdef FREECIV_HAVE_UNREACHABLE
129#define fc__unreachable(_cond_) \
131 __builtin_unreachable(); \
134#define fc__unreachable(_cond_) fc_assert(!(_cond_))
137#ifdef FREECIV_MSWINDOWS
143#ifdef FREECIV_RETURN_VALUE_AFTER_EXIT
144#define RETURN_VALUE_AFTER_EXIT(_val_) return _val_ ;
146#define RETURN_VALUE_AFTER_EXIT(_val_)
149#ifdef FREECIV_NO_CONST_VAR_ARG
152#define VAR_ARG_CONST const
160#define fc_strncmp(_s1_, _s2_, _len_) strncmp(_s1_, _s2_, _len_)
174#ifdef FREECIV_HAVE_LIBZ
186 const char *replace);
191size_t fc_strlcpy(
char *dest,
const char *src,
size_t n);
192size_t fc_strlcat(
char *dest,
const char *src,
size_t n);
195#define sz_strlcpy(dest,src) ((void) fc_strlcpy((dest), (src), sizeof(dest)))
196#define sz_strlcat(dest,src) ((void) fc_strlcat((dest), (src), sizeof(dest)))
209#ifdef FREECIV_SOCKET_ZERO_NOT_STDIN
237#ifdef WORDS_BIGENDIAN
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)