mirror of
https://github.com/tbamud/tbamud.git
synced 2026-01-30 04:45:17 +01:00
Changes to make the code compile normally on macOS. (#137)
Changes in configure to set crypt lib dynamically depending on the OS
This commit is contained in:
parent
e59420363a
commit
7036a15782
6 changed files with 500 additions and 38 deletions
29
src/sysdep.h
29
src/sysdep.h
|
|
@ -63,6 +63,24 @@
|
|||
|
||||
/* Do not change anything below this line. */
|
||||
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
/* Machine-specific dependencies for running on modern macOS systems 10.13+ (High Sierra)
|
||||
* Updated by Victor Augusto Borges Dias de Almeida (aka Stoneheart), 26 June 2024.
|
||||
*
|
||||
* Tested on:
|
||||
* - macOS 10.13: High Sierra (Lobo) - September 25, 2017 (Latest: 10.13.6)
|
||||
* - macOS 10.14: Mojave (Liberty) - September 24, 2018 (Latest: 10.14.6)
|
||||
* - macOS 10.15: Catalina (Jazz) - October 7, 2019 (Latest: 10.15.7)
|
||||
* - macOS 11: Big Sur (GoldenGate) - November 12, 2020 (Latest: 11.7.10)
|
||||
* - macOS 12: Monterey (Star) - October 25, 2021 (Latest: 12.7)
|
||||
* - macOS 13: Ventura (Rome) - November 7, 2022 (Latest: 13.7)
|
||||
* - macOS 14: Sonoma (Sunburst) - November 7, 2023 (Latest: 14.3)
|
||||
*
|
||||
* This file works on Apple Silicon Chips (M1, M2, M3) without futher configurations.
|
||||
*/
|
||||
#define CIRCLE_MAC_OS 1
|
||||
#endif
|
||||
|
||||
/* Set up various machine-specific things based on the values determined from
|
||||
* configure and conf.h. */
|
||||
|
||||
|
|
@ -78,7 +96,7 @@
|
|||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#if (defined (STDC_HEADERS) || defined (__GNU_LIBRARY__))
|
||||
#if (defined (STDC_HEADERS) || defined (__GNU_LIBRARY__) || defined(CIRCLE_MAC_OS))
|
||||
#include <stdlib.h>
|
||||
|
||||
#else /* No standard headers. */
|
||||
|
|
@ -88,9 +106,8 @@
|
|||
#endif
|
||||
|
||||
extern char *malloc(), *calloc(), *realloc();
|
||||
extern void free ();
|
||||
|
||||
extern void abort (), exit ();
|
||||
extern void free();
|
||||
extern void abort(), exit();
|
||||
|
||||
#endif /* Standard headers. */
|
||||
|
||||
|
|
@ -150,9 +167,11 @@ extern void abort (), exit ();
|
|||
#include <sys/errno.h>
|
||||
#endif
|
||||
|
||||
#ifndef CIRCLE_MAC_OS
|
||||
#ifdef HAVE_CRYPT_H
|
||||
#include <crypt.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
|
|
@ -434,9 +453,11 @@ struct in_addr {
|
|||
char *strerror(int errnum);
|
||||
#endif
|
||||
|
||||
#ifndef CIRCLE_MAC_OS
|
||||
#ifdef NEED_STRLCPY_PROTO
|
||||
size_t strlcpy(char *dest, const char *src, size_t copylen);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef NEED_SYSTEM_PROTO
|
||||
int system(const char *string);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue