1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00
Commit graph

20857 commits

Author SHA1 Message Date
Michael Gran
3c9052b261 Avoid mysterious "error no error" message in pipe
* libguile/posix.c (pipe)[!HAVE_PIPE2]: set errno to ENOSYS
   when pipe2 is missing
2022-11-10 14:48:50 -08:00
Michael Gran
591e10a121 Avoids sign extension error in bytevector construction
Without this, negative numbers may change signedness

* libguile/bytevectors (is_signed_int8, is_unsigned_int8)
  (is_signed_int16, is_unsigned_int16)[__MINGW32__ __x86_64__]:
  use long long type.
2022-11-10 14:45:31 -08:00
Michael Gran
bb646c42f7 fixes for chmodat test
* test-suite/tests/filesys.test (chmodat): some chmodat tests don't test if it
   exists. Mark unwritable file writable before deleting.
  ("port representing a regular file"): reorder to avoid unclosed
     port on exception.
2022-11-10 12:28:12 -08:00
Michael Gran
c6cdd92022 Revert "Fix 'absolute-file-name?' and others for cross-build to MinGW."
This reverts commit 0deacfe06e3c9ce848253cb23fcc77a28145d2f8.
2022-11-10 10:33:58 -08:00
Michael Gran
ec27a4d7d3 Revert "squash! Fix 'absolute-file-name?' and others for cross-build to MinGW."
This reverts commit a841ba1a6a5c4d6f5a6b77cb090a92a0a53ab327.
2022-11-10 10:33:58 -08:00
Michael Gran
6d436ac58a Revert "REMOVEME mingw: Hardcode compile-time-file-name-convention to 'mingw."
This reverts commit e2f9cfed6318ed85fd72315326c8ef76c4e5b725.
2022-11-10 10:33:57 -08:00
Michael Gran
ab0a917ff4 For MinGW, use native signal func in sigaction
For MinGW, there is a native signal function in UCRT. It handles
a limited set of signals.

* libguile/scmsigs.c (scm_sigaction_for_thread)[__MINGW32__]: removed
  (scm_sigaction_for_thread)[!__MINGW32__]: use for MinGW as well.
    For signals outside UCRT's native signal set, always return SIG_IGN.
2022-11-10 10:33:57 -08:00
Michael Gran
9a29293a88 More long integer fixes for x86_64-w64-mingw32
* libguile/gc.c (scm_object_address): use uintptr_t instead of ulong
* libguile/gen-scmconfig.c (main): handle different sizes of scm_off_t
* libguile/integers.c (scm_integer_length_z): the mask size is bitcnt_max,
    not UINTPTR_MAX
* libguile/ports.c (scm_set_port_line_x): test that line is an intptr_t,
    not a long
* libguile/srfi-60.c (scm_srfi60_rotate_bit_fields): use correct size of
    integer for bit-shifting
  (scm_srfi60_reverse_bit_field): use correct integer size for bit-shifting
* libguile/symbols.h (scm_i_symbol_hash): cast to uintptr_t, not unsigned long
2022-11-10 10:33:57 -08:00
Michael Gran
46bb667f20 MinGW 64: fixes hash out-of-range error for 64-bit negative numbers
* libguile/hash.c (scm_raw_ihash): modified
2022-11-10 10:33:56 -08:00
Jan (janneke) Nieuwenhuizen
eec610141b DEBUG guile.cmd, wine-guile.sh: Some Wine help.
Try:

    wine cmd /c guile -c '(display "hello\n")'
    ./check-guile -i ./wine-guile.sh numbers.test

* guile.cmd,
wine-guile.sh: New files.
2022-11-10 10:33:56 -08:00
Jan (janneke) Nieuwenhuizen
be78f55238 REMOVEME guix: guile-mingw: Hardcode file-name-convention.
Build it:

    GUIX_PACKAGE_PATH=guix guix build --target=x86_64-w64-mingw32 guile-mingw

Run it:

    WINEPATH=$(guix shell wine64 -- winepath -w                                     \
        $(echo $(guix gc -R                                                         \
                      $(GUIX_PACKAGE_PATH=guix guix build                           \
                                         --target=x86_64-w64-mingw32 guile-mingw))) \
                   | sed 's,$,/bin,g' | tr '\n' ';')                                \
            guix shell wine64 -- wine                                               \
            $(GUIX_PACKAGE_PATH=guix guix build --target=x86_64-w64-mingw32         \
                               guile-mingw)/bin/guile.exe                           \
            -c '(format #t "Hello  ~a world!\n" %host-type)'

* guix/guile-mingw-file-name-convention.patch: New file.
* guix/mingw.scm (guile-mingw): Use it.
2022-11-10 10:33:56 -08:00
Jan (janneke) Nieuwenhuizen
3caa459f1f REMOVEME mingw: Hardcode compile-time-file-name-convention to 'mingw.
FIXME Apply this patch only when compiling for mingw.
      Temporary hack until we have a proper fix to determine
      compile-time-file-name-convention

* module/ice-9/boot-9.scm (compile-time-file-name-convention): Hardcode
to 'mingw instead of 'posix.
2022-11-10 10:33:55 -08:00
Jan (janneke) Nieuwenhuizen
2c957102ce guix: Add guile-patched, guile-mingw.
Build it:

    GUIX_PACKAGE_PATH=guix guix build --target=x86_64-w64-mingw32 guile-mingw

Run it:

    WINEPATH=$(guix shell wine64 -- winepath -w                                     \
        $(echo $(guix gc -R                                                         \
                      $(GUIX_PACKAGE_PATH=guix guix build                           \
                                         --target=x86_64-w64-mingw32 guile-mingw))) \
                   | sed 's,$,/bin,g' | tr '\n' ';')                                \
            guix shell wine64 -- wine                                               \
            $(GUIX_PACKAGE_PATH=guix guix build --target=x86_64-w64-mingw32         \
                               guile-mingw)/bin/guile.exe                           \
            -c '(format #t "Hello  ~a world!\n" %host-type)'

* guix/guile-patched.scm,
guix/mingw.scm: New files.
2022-11-10 10:33:55 -08:00
Rutger van Beusekom
98b62ab0f4 DRAFT Add partial `scm_fcntl' support for MinGW.
* libguile/filesys.c (_mingw_debug_p)[__MINGW32__: New function.
(scm_fcntl)[__MINGW32__]: Add support creating non-blocking sockets.
2022-11-10 10:33:55 -08:00
Jan (janneke) Nieuwenhuizen
99507f1cda Add `scm_sigaction_for_thread' stub for MinGW.
* libguile/scmsigs.c (scm_sigaction_for_thread)[__MINGW32__]: New stub.
(SIGHUP, SIGPIPE)[__MINGW32__]: New defines.
2022-11-10 10:33:54 -08:00
Jan (janneke) Nieuwenhuizen
f9567b84e9 Install 'mingw_take_signal' on MinGW.
After installing a signal handler, these are handled

    * C-c
    * kill -SIGINT <guile.exe-pid> (the wine process) works

these result in a direct terminate (or kill even?)

    - kill <guile.exe-pid>
    - wine cmd /c guile -c '(kill <guile-exe.pid> SIGINT)'
    - wine cmd /c guile -c '(kill <guile-exe.pid> SIGTERM)'

* libguile/scmsigs.c (mingw_take_signal)[__MINGW32__]: New function.
install_mingw_take_signal)[__MINGW32__]: New function.
(scm_init_scmsigs)[__MINGW32__]: Use it.
2022-11-10 10:33:54 -08:00
Jan (janneke) Nieuwenhuizen
fe4e19a22a Make `read-bytes' suspendable for socket reads on MinGW.
On MinGW, port-read will block on sockets if no data is available.
Avoid blocking by using select first.

* module/ice-9/suspendable-ports.scm (read-bytes): For socket ports,
guard port-read with select.
2022-11-10 10:33:54 -08:00
Jan (janneke) Nieuwenhuizen
9bfd0b544f squash! Fix 'absolute-file-name?' and others for cross-build to MinGW.
FIXME in 3.0.7, this works:

  ;; boot-9.scm
  (define (compile-time-file-name-convention)
    (let ((target ((@ (system base target) target-type))))
      (cond ((equal? target %host-type)
             (system-file-name-convention))
            ((string-contains-ci target "mingw")
             'windows)
            (else
             'posix)))))

in 3.0.8 it aborts hard.

    guile: uncaught exception:
    Unbound variable:define-module
    Cannot exit gracefully when init is in progress; aborting.

* module/ice-9/boot-9.scm (eval): Avoid calling (target-type) this
hardcodes 'posix again.
2022-11-10 10:33:53 -08:00
Jan (janneke) Nieuwenhuizen
96597fa21d Fix 'absolute-file-name?' and others for cross-build to MinGW.
* module/ice-9/boot-9.scm (compile-time-file-name-convention): New
procedure, defined only when loading.
(compile-time-case): Use it to correctly determine system file name
convention while compiling.
2022-11-10 10:33:53 -08:00
Jan (janneke) Nieuwenhuizen
f4b976aab9 Clear errno before CreateProcess for MinGW.
* libguile/posix-w32.c (start_child): Avoid recursing (and breaking any
PIPE setup) when running in WINE.
2022-11-10 10:33:52 -08:00
Jan (janneke) Nieuwenhuizen
76950b4281 Support for x86_64-w64-mingw32.
On x86-64-MinGW the size of long is 4.  As long is used for
SCM_FIXNUM_BIT, that would mean incompatible .go files, and waste of
cell space.  So we would like to use long long, but the GMP interface
uses long.

To get around this, the x86-64-MinGW port now requires the use of
mini-GMP.  Mini-GMP has been changed to use intptr_t and uintptr_t.

Likewise, "integers.{h,c}" and "numbers.{h,c}" now use intptr_t instead
of scm_t_inum or long, and uintptr_t instead of unsigned long.

* configure.ac: When x86_64-w64-mingw32, require mini-GMP.
* libguile/mini-gmp.h: Use intptr_t instead of long, uintptr_t instead
of unsigned long throughout.
* libguile/mini-gmp.c: Likewise.
* libguile/scm.h (SCM_INTPTR_T_BIT): New define.
* libguile/numbers.h (SCM_FIXNUM_BIT): Use it.
* libguile/numbers.c (L1, UL1): New macros.  Use them thoughout instead
of 1L, 1UL.
(verify): Use SCM_INTPTR_T_BIT.
(verify): Use SCM_INTPTR_T_MAX and SCM_INTPTR_T_MIN.
(scm_from_inum): Remove macro.
Use intptr_t and uintptr_t instead of scm_t_inum or long, and unsigned
long.
* libguile/numbers.h (scm_from_intptr, scm_from_uintptr, scm_to_intptr,
scm_to_uintptr): New defines.
* libguile/integers.h: Use intptr_t and uintptr_t instead of scm_t_inum
and unsigned long.
* libguile/integers.c (L1) : New macro.  Use it thoughout instead of 1L.
Use intptr_t and uintptr_t instead of long and unsigned long.
(long_magnitude): Rename to...
(intptr_t_magnitude): ...this.  Use intptr_t, uintptr_t.
(negative_long): Rename to...
(negative_t_intptr): ...this.  Use uintptr_t, INTPTR_MIN.
(inum_magnitude): Use intptr_t.
(ulong_to_bignum): Rename to...
(uintptr_t_to_bignum): ...this.  Use uintptr_t.
(long_to_bignum): Rename to...
(intptr_t_to_bignum): ...this.  Use intptr_t.
(long_to_scm): Rename to...
(intptr_t_to_scm): ...this.  Use intptr_to_bignum.
(ulong_to_scm): Rename to...
(uintptr_t_to_scm): ...this.  Use uintptr_to_bignum.
(long_sign): Rename to..
(intptr_t_sign): ...this.  Use SCM_SIZEOF_INTPTR_T.
(bignum_cmp_long): Rename to...
(bignum_cmp_intptr_t): ...this.  Use uintptr_t.
* libguile/array-map.c (array_compare): Use uintptr_t instead of
unsigned long and intptr_t instead of long.
* libguile/arrays.c (make-shared-array): Use ssize_t instead of long.
* libguile/bytevectors.c (is_signed_int32, is_unsigned_int32)
[MINGW32 && __x86_64__]: Use ULL.
(twos_complement): Use uintptr_t instead of unsigned long.
* libguile/hash.c (JENKINS_LOOKUP3_HASHWORD2): Likewise.
(narrow_string_hash, wide_string_hash, scm_i_string_hash,
scm_i_locale_string_hash, scm_i_latin1_string_hash,
scm_i_utf8_string_hash, scm_i_struct_hash, scm_raw_ihashq,
scm_raw_ihash): Use and return uintptr_t instead of unsigned long.
(scm_hashv, scm_hash): Use SCM_UINTPTR_T_MAX.
* libguile/hash.h (scm_i_locale_string_hash, scm_i_latin1_string_hash,
scm_i_utf8_string_hash): update prototypes.
* libguile/scmsigs.c (sigaction): Use intptr_t instead of long.
* libguile/strings.c (scm_i_make_symbol, (scm_i_c_make_symbol): Use
uintptr_t instead of unsigned long.
* libguile/strings.h (scm_i_make_symbol, (scm_i_c_make_symbol): Update
declacations.
* libguile/srfi-60.c: Use scm_to_uintptr, scm_from_intptr and variants
throughout.
* libguile/symbols.c (symbol-hash): Use scm_from_uintptr.

Co-authored-by: Mike Gran <spk121@yahoo.com>
Co-authored-by: Andy Wingo <wingo@pobox.com>
2022-11-10 10:33:49 -08:00
Jan (janneke) Nieuwenhuizen
d58c9411ae Add 'set-port-binary/text-mode!' procedure for MinGW.
* libguile/ports.c (scm_init_ports)[O_BINARY]: Define 'O_BINARY'.
[O_TEXT]: Define 'O_TEXT'.
(scm_c_set_port_binary_text_mode_x): New function.
* libguile/ports.h (scm_set_binary_text_mode_x): Declare it.
* module/ice-9/ports.scm (ice-9): Export it as
'set-port-binary/text-mode!'.
* doc/ref/api-io.texi (File Ports): Document it.
2022-11-10 10:31:16 -08:00
Jan (janneke) Nieuwenhuizen
2d82b49cf3 mingw: canonicalize-path: Also canonicalize drive letter and '/'.
* libguile/posix-w32.c (canonicalize_device_name,
slashify_file_name): New static functions.
(canonicalize_file_name_mingw): Use them in new function.
* libguile/posix-w32.h (canonicalize_file_name_mingw): Declare it.
(canonicalize_file_name): New define.
* libguile/filesys.c[__MINGW32__]: Include posix-w32.h to use it.
* libguile/fports.c[__MINGW32__]: Likewise.
2022-11-10 10:31:16 -08:00
Jan (janneke) Nieuwenhuizen
558fe0113d Link fix for MinGW.
This fixes

    libguile/threads.c:1502: undefined reference to `select_used_without_including_sys_select_h'

* libguile/threads.c: Include sys/select.h.
2022-11-10 10:31:15 -08:00
Jan (janneke) Nieuwenhuizen
06391f1cb7 gnulib: Import the gethostname module.
* lib/gethostname.c,
m4/gethostname.m4: New files.
* lib/Makefile.am,
m4/gnulib-cache.m4,
m4/gnulib-comp.m4: Update by running gnulib-tool.
2022-11-10 10:31:15 -08:00
Ludovic Courtès
f72cd79152 doc: Fix typo in VM instruction name.
* doc/ref/vm.texi (Intrinsic Call Instructions): Fix name of
'call-scm<-thread'.
2022-11-01 22:02:25 +01:00
Ludovic Courtès
11dea3c363 disassembler: Show intrinsic name for 'call-' instructions.
* module/system/vm/disassembler.scm (code-annotation)[intrinsic-name]:
New procedure.
Add clauses for intrinsics.
* NEWS: Update.
2022-11-01 22:02:19 +01:00
Maxime Devos
793fb46a1e Update NEWS.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:43:36 +02:00
Maxime Devos
c8b81ffb34 Define Scheme bindings to ‘openat’ when available.
* configure.ac: Detect if ‘openat’ is defined.
* libguile/filesys.c
  (flags_to_mode): Extract from ...
  (scm_mode): ... here.
  (scm_open_fdes_at, scm_openat): Define the Scheme bindings.
* libguile/filesys.h (scm_open_fdes_at, scm_openat): Make them part
  of the API.
* doc/ref/posix.texi (File System): Document them.
* test-suite/tests/filesys.test ("openat"): Test ‘openat’.
* libguile/syscalls.h (openat_or_openat64): Decide between ‘openat’
  and ‘openat64’.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:42:20 +02:00
Maxime Devos
cf255dd3a4 Define a Scheme binding to ‘fstatat’ when available.
* configure.ac: Detect if ‘fstatat’ is defined.
* libguile/filesys.c (scm_statat): Define a Scheme binding to ‘fstatat’.
* libguile/filesys.h (scm_statat): Make it part of the C API.
* doc/ref/posix.texi (File System): Document it.
* libguile/syscalls.h (fstatat_or_fstatat64): Choose between ‘fstatat’
  and ‘fstatat64’.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:41:10 +02:00
Maxime Devos
0af3c2f509 Define a Scheme binding to ‘fchownat’ when it exists.
* configure.ac: Detect whether ‘fchownat’ is available.
* libguile/filesys.c (scm_chownat): Define a Scheme binding to
  ‘fchownat’ when available.
* libguile/filesys.h (scm_chownat): Make it part of the API.
* doc/ref/posix.texi (File System): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:40:37 +02:00
Maxime Devos
3b45185d8f Define a Scheme binding to ‘unlinkat’ when it exists.
‘unlinkat’ is used for both unlinking regular files
and removing empty directories.

* configure.ac: Detect if ‘unlinkat’ exists.
* doc/ref/posix.texi (File System): Document why there is no
  ‘rmdirat’ procedure, and document the ‘delete-file-at’ procedure.
* libguile/filesys.c
  (scm_rmdir): Adjust the docstring here as well.
  (scm_delete_file_at): Define a Scheme binding to ‘unlinkat’.
* libguile/filesys.h (scm_delete_file_at): Make ‘scm_delete_file_at’
  part of the C API.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:40:37 +02:00
Maxime Devos
19b48b1c4a Define a Scheme binding to ‘fchmodat’ when it exists.
* configure.ac: Detect existence of fchmodat.
* libguile/filesys.c (scm_chmodat): New procedure.
* libguile/filesys.h (scm_chmodat): Make it part of the API.
* test-suite/tests/filesys.test ("chmodat"): Test it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:40:37 +02:00
Maxime Devos
3a0554c60f Define a Scheme binding to ‘renameat’ when it exists.
* configure.ac: Detect if ‘renameat’ is defined.
* libguile/filesys.c (scm_renameat): Define a Scheme binding
  to the ‘renameat’ system call.
* doc/ref/posix.texi (File System): Document it.
* libguile/filesys.h (scm_renameat): Make it part of the C API.
* test-suite/tests/filesys.test ("rename-file-at"): New tests.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:40:37 +02:00
Maxime Devos
24028e75ca Define AT_REMOVEDIR and others when available.
* libguile/posix.c (scm_init_posix): Define (in Scheme)
  AT_REMOVEDIR and AT_EACCESS when defined (in C).

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:40:37 +02:00
Maxime Devos
f018e0d486 Correct documentation of ‘mkdir’ w.r.t. the umask.
* doc/ref/posix.texi (mkdir): Note that the umask is applied even if the
  mode argument is set.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:40:37 +02:00
Maxime Devos
58ddd5c7bc Define bindings to ‘mkdirat’ when the C function exists.
* configure.ac: Detect if ‘mkdirat’ exists.
* libguile/filesys.c (scm_mkdirat): Define the Scheme binding.
* doc/ref/posix.texi (File System): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:40:37 +02:00
Maxime Devos
6c350b6094 Define ‘symlinkat’ wrapper when supported.
* configure.ac: Detect whether ‘symlinkat’ exists.
* libguile/filesys.c (scm_symlinkat): Define a Scheme binding
  when it exists.
* libguile/filesys.h: Make the binding part of the public C API.
* doc/ref/posix.texi (File System): Document the binding.
* test-suite/tests/filesys.test ("symlinkat"): Test it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:40:37 +02:00
Maxime Devos
9ffd297249 Allow file ports in ‘utime’.
Ports representing symbolic links are currently unsupported.

* configure.ac: Detect 'futimens'.
* doc/ref/posix.texi (utime): Update documentation.
* libguile/posix.c (scm_utime): Support ports.
* libguile/posix.h (scm_utime): Rename argument.
* test-suite/tests/posix.test ("utime"): Add more tests.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:40:30 +02:00
Maxime Devos
30247dc414 Allow file ports in ‘readlink’.
* configure.ac: Detect whether ‘readlinkat’ is defined.
* libguile/filesys.c (scm_readlink): Support file ports
  when ‘readlinkat’ exists.
  (scm_init_filesys): Provide ‘chdir-ports’ when it exists.
* doc/ref/posix.texi (File System): Document it.
* test-suite/tests/filesys.test ("readlink"): Test it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:39:38 +02:00
Maxime Devos
273bfe7510 Allow file ports in ‘chdir’ when supported.
* configure.ac: Check for ‘fchdir’.
* libguile/filesys.c
(scm_chdir): Support file ports.
(scm_init_filesys): Report support of file ports.
* doc/ref/posix.texi (Processes): Update accordingly.
* doc/ref/guile.texi: Add copyright line for new documentation in this
patch and later patches.
* test-suite/tests/filesys.test ("chdir"): Test it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:39:38 +02:00
Michael Gran
1ddc4eb964 Fixes arg type for scm_integer_from_mpz
The definition and the declaration for scm_integer_from_mpz
do not match

* libguile/integers.c (scm_integer_from_mpz): takes const mpz_t arg
  No callers need to be changed.
2022-10-15 10:35:54 -07:00
Michael Gran
b6a84d50e1 autoupdate acinclude.m4
Autoconf's autoupdates replaces AC_TRY_CPP, AC_TRY_LINK,
AC_LANG_C

* acinclude (GUILE_READLINE, GUILE_STRUCT_UTIMBUF, UTIMBUF_NEEDS_POSIX):
  updated using autoupdate
2022-10-14 08:40:23 -07:00
Michael Gran
d3261e8497 Presumes signal handler return void
Since Guile requires a C99 compiler, we can rely on signal handlers
returning void, not int.

* configure.ac: remove AC_TYPE_SIGNAL
* libguile/scmsigs.c (SIGRETTYPE): remove SIGRETTYPE
  (take_signal): returns void
  (scm_sigaction_for_thread): presumes handlers return void
2022-10-14 08:40:23 -07:00
Michael Gran
2b73ef4deb Modernizes labels-as-values.m4
labels-as-values.m4 uses deprecated AC_TRY_COMPILE and has
a K&R-type C function declaration

* m4/labels-as-values.m4: updated
2022-10-14 08:40:23 -07:00
Mike Gran
e9db8a29e4 Remove special logic for the obscure CMU C library's libc.h
* acinclude.m4 (GUILE_HEADER_LIBC_WITH_UNISTD): removed
* configure.ac: remove GUILE_HEADER_LIBC_WITH_UNISTD, don't check for libc.h
* libguile/filesys.c [LIBC_H_WITH_UNISTD_H]: remove libc.h inclusion
* libguile/posix.c [LIBC_H_WITH_UNISTD_H]: remove libc.h inclusion
2022-10-14 08:40:23 -07:00
Mike Gran
df8e772f3c Presume time.h and sys/time.h don't conflict when included
Systems on which time.h and sys/time.h conflicted are obsolescent.

* configure.ac: remove AC_HEADER_TIME. remove conditional
  in tm.tm_gmtoff test.
* libguile/filesys.c [TIME_WITH_SYS_TIME]: remove conditional
* libguile/posix.c [TIME_WITH_SYS_TIME]: remove conditional

# Conflicts:
#	libguile/filesys.c
2022-10-14 08:40:23 -07:00
Mike Gran
3827291425 Presume ISO C90 functions are always available
* configure.ac: don't check for rename, setlocale, system, memcpy,
   and strcoll
* libguile/i18n.c [HAVE_SETLOCALE] (setlocale): remove static setlocale
    Don't use HAVE_SETLOCALE
* libguile/posix.c: include <locale.h>, remove HAVE_SETLOCALE
  (scm_setlocale): always include. remove HAVE_SETLOCALE
* libguile/simpos.c (scm_system): always include. remove HAVE_SYSTEM
2022-10-14 08:40:23 -07:00
Mike Gran
9b357bace3 Presume ISO C90 headers are always available
This includes <assert.h>, <ctype.h>, <errno.h>, <float.h>, <iso646.h>,
<limits.h>, <locale.h>, <math.h>, <setjmp.h>, <signal.h>, <stdarg.h>,
<stddef.h>, <stdio.h>, <stdlib.h>, <string.h>, <time.h>, <wchar.h>,
and <wctype.h>.

* configure.ac: don't check for <limits.h>, <string.h>, <time.h>, <assert.h>.
   Remove AC_INCLUDES_DEFAULT macro
* libguile/bytevectors.c: include <limits.h>, remove HAVE_LIMITS_H
* libguile/filesys.c: include <string.h>, remove HAVE_STRING_H
* libguile/fports.c: include <string.h>, remove HAVE_STRING_H
* libguile/gen-scmconfig.c: remove HAVE_LIMITS_H, HAVE_TIME_H, STDC_HEADERS
    Remove SCM_HAVE_STDC_HEADERS
* libguile/hash.c: include <wchar.h>, remove HAVE_WCHAR_H
* libguile/net_db.c: include <string.h>, remove HAVE_STRING_H
* libguile/numbers.h: remove SCM_HAVE_STDC_HEADERS
* libguile/regex-posix.c: include <wchar.h>, remove HAVE_WCHAR_H
  (fixup_multibyte_match): always defined
  (scm_regexp_exec): use fixup_multibyte_match
* libguile/scmsigs.c: remove STDC_HEADERS
* libguile/socket.c: include <string.h>, remove HAVE_STRING_H
* test-suite/standalone/test-unwind.c: include <string.h>, remove HAVE_STRING_H
2022-10-14 08:40:23 -07:00
Mike Gran
128e0a3479 Remove AC_HEADER_STDC from configure.ac
Requiring C99 implies standard headers are available

* configure.ac: remove AC_HEADER_STDC
2022-10-14 08:40:23 -07:00