Merge branch 'c23-port' into 'develop'

port to C23 standard

Closes #775

See merge request embeddable-common-lisp/ecl!345
This commit is contained in:
Daniel Kochmański 2025-05-03 18:49:37 +00:00
commit 8099af9350
11 changed files with 12 additions and 27 deletions

View file

@ -259,5 +259,5 @@ quasiquote_macro(cl_object whole, cl_object env)
void
init_backq(void)
{
ecl_def_c_macro(@'si::quasiquote', quasiquote_macro, 2);
ecl_def_c_macro(@'si::quasiquote', (cl_objectfn_fixed)quasiquote_macro, 2);
}

View file

@ -188,7 +188,7 @@ main(int argc, char **args)
#endif
ECL_SET(@'*features*', features);
top_level = _ecl_intern("TOP-LEVEL", cl_core.system_package);
ecl_def_c_function(top_level, si_simple_toplevel, 0);
ecl_def_c_function(top_level, (cl_objectfn_fixed)si_simple_toplevel, 0);
_ecl_funcall1(top_level);
return(0);
}

View file

@ -85,10 +85,7 @@
#include <ctype.h>
#include <string.h>
#include <stdarg.h>
#if defined(_MSC_VER) && (_MSC_VER >= 1800)
#include <stdbool.h>
#endif
#define DPP
#include <ecl/config.h>
@ -106,13 +103,6 @@
#define TRUE 1
#define FALSE 0
#ifndef __cplusplus
#if ! ( defined(__bool_true_false_are_defined) \
&&__bool_true_false_are_defined )
typedef int bool;
#endif
#endif
FILE *in, *out;
char filename[BUFSIZ];

View file

@ -5166,7 +5166,7 @@ ecl_unread_char(ecl_character c, cl_object strm)
stream_dispatch_table(strm)->unread_char(strm, c);
}
bool
int
ecl_listen_stream(cl_object strm)
{
return stream_dispatch_table(strm)->listen(strm);

View file

@ -179,7 +179,7 @@ void
init_macros(void)
{
ECL_SET(@'*macroexpand-hook*', @'funcall');
ecl_def_c_macro(@'or', or_macro, 2);
ecl_def_c_macro(@'and', and_macro, 2);
ecl_def_c_macro(@'when', when_macro, 2);
ecl_def_c_macro(@'or', (cl_objectfn_fixed)or_macro, 2);
ecl_def_c_macro(@'and', (cl_objectfn_fixed)and_macro, 2);
ecl_def_c_macro(@'when', (cl_objectfn_fixed)when_macro, 2);
}

View file

@ -2019,8 +2019,8 @@ extra_argument(int c, cl_object stream, cl_object d)
}
#define make_cf2(f) ecl_make_cfun((f), ECL_NIL, NULL, 2)
#define make_cf3(f) ecl_make_cfun((f), ECL_NIL, NULL, 3)
#define make_cf2(f) ecl_make_cfun((cl_objectfn_fixed)(f), ECL_NIL, NULL, 2)
#define make_cf3(f) ecl_make_cfun((cl_objectfn_fixed)(f), ECL_NIL, NULL, 3)
void
init_read(void)

View file

@ -32,6 +32,7 @@ extern int errno;
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <stdlib.h>
#endif
#include <string.h>
@ -86,10 +87,6 @@ int connect_to_server(char *host, int port)
struct sockaddr *addr; /* address to connect to */
struct hostent *host_ptr;
int addrlen; /* length of address */
#if !defined(ECL_MS_WINDOWS_HOST)
extern char *getenv();
extern struct hostent *gethostbyname();
#endif
int fd; /* Network socket */
INIT_TCP

View file

@ -22,6 +22,7 @@
#include <stdarg.h> /* va_list */
#include <setjmp.h> /* setjmp and buffers */
#include <stdio.h> /* FILE */
#include <stdbool.h>
/* Microsoft VC++ does not have va_copy() */
#if ( defined(_MSC_VER) && (_MSC_VER < 1800) ) || !defined(va_copy)
#define va_copy(dst, src) \

View file

@ -744,7 +744,7 @@ extern ECL_API void ecl_force_output(cl_object strm);
extern ECL_API void ecl_finish_output(cl_object strm);
extern ECL_API void ecl_clear_input(cl_object strm);
extern ECL_API void ecl_clear_output(cl_object strm);
extern ECL_API bool ecl_listen_stream(cl_object strm);
extern ECL_API int ecl_listen_stream(cl_object strm);
extern ECL_API cl_object ecl_file_position(cl_object strm);
extern ECL_API cl_object ecl_file_position_set(cl_object strm, cl_object disp);
extern ECL_API cl_object ecl_file_length(cl_object strm);

View file

@ -468,7 +468,7 @@ extern void ecl_clear_bignum_registers(cl_env_ptr env);
/* threads/mutex.d */
extern cl_object si_mutex_timeout();
extern cl_object si_mutex_timeout(cl_object process, cl_object lock, cl_object timeout);
/* print.d */

View file

@ -23,9 +23,6 @@ extern "C" {
#define TRUE 1 /* boolean true value */
#define FALSE 0 /* boolean false value */
#if !defined(__cplusplus) && !defined(bool)
typedef int bool;
#endif
typedef unsigned char byte;
/*