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

245 commits

Author SHA1 Message Date
Ludovic Courtès
7d6f309ccd Treat 'SIG_IGN' as a pointer.
* libguile/posix.c (scm_system_star): Cast 'SIG_IGN' to
'scm_t_uintptr_t' and use 'scm_from_uintptr_t'.  This fixes an
'int-conversion' warning with GCC 6.2.
2017-03-01 19:58:31 +01:00
Andy Wingo
69ca2bb221 Elide syscalls in fdes->port
* libguile/fports.h (scm_t_fport): Add options field.
  (SCM_FDES_RANDOM_P): Deprecate.
  (scm_i_fdes_to_port): Add options argument.
* libguile/fports.c (scm_i_fdes_to_port): Add options argument.  Only
  verify FD if SCM_FPORT_OPTION_VERIFY is there.
  (scm_fdes_to_port, scm_open_file_with_encoding): Adapt to
  scm_i_fdes_to_port changes.
  (fport_random_access_p): Don't try to seek if NOT_SEEKABLE option is
  set.
* libguile/deprecated.h:
* libguile/deprecated.c (SCM_FDES_RANDOM_P): Deprecate.
* NEWS: Add deprecation.
* libguile/filesys.c:
* libguile/ioext.c:
* libguile/posix.c:
* libguile/read.c:
* libguile/socket.c: Adapt callers.
2017-02-14 22:03:21 +01:00
Andy Wingo
f9620e01c3 Fix compile warning in posix.c
* libguile/posix.c (scm_system_star): Fix SIG_IGN usage to not emit a
  warning.  Still broken on Windows64 and similar systems though!
2016-09-14 11:50:35 +02:00
Andy Wingo
ad4fe88ffb Move system* to posix.c, impl on open-process
* libguile/simpos.c: Trim includes.
  (scm_system_star): Move to posix.c.
* libguile/simpos.h (scm_system_star): Remove.
* libguile/posix.h (scm_system_star): Add.
* libguile/posix.c (scm_system_star): Move here and implement in terms
  of open-process.  This lets system* work on Windows.  Inspired by a
  patch by Eli Zaretskii.
  (start_child): Exit with 127 if the command isn't found.
2016-08-31 10:42:21 +02:00
Andy Wingo
513344e33d Add popen feature
* doc/ref/api-options.texi (Common Feature Symbols): Document the popen
  feature.
* doc/ref/posix.texi (Pipes): Depend on the popen feature, not fork.
* libguile/posix.c (scm_init_posix): Add popen feature if we can.
2016-07-25 11:43:54 +02:00
Eli Zaretskii
3231d7658d Add POSIX shims for MinGW
* libguile/posix-w32.h:
* libguile/posix-w32.c (kill, waitpid, getpriority, setpriority)
  (sched_getaffinity, sched_setaffinity): Add MinGW implementations.
  Also, provides macros that on Posix hosts are in sys/wait.h, like
  WIFEXITED and WTERMSIG.
  (start_child): Add implementation.
2016-07-25 11:42:09 +02:00
Andy Wingo
b2d77c38c4 Rename win32-uname.[ch] to posix-w32.[ch]
* libguile/posix-w32.c:
* libguile/posix-w32.h: Rename from win32-uname.c and win32-uname.h.
* libguile/posix.c:
* libguile/Makefile.am
  (EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES)
  (noinst_HEADERS): Adapt.
2016-07-25 11:41:50 +02:00
Andy Wingo
10ae9cc601 Factor start_child out of open_process
* libguile/posix.c (start_child): Factor out from open_process.  Based
  on initial work by Eli Zaretskii.
2016-07-25 11:24:55 +02:00
Andy Wingo
f632d45c69 More specific status:exit-val et al compilation guards
* libguile/posix.c (scm_status_exit_val, scm_status_term_sig)
  (scm_status_stop_sig): Guard on WIFEXITED et al macros instead of on
  MinGW.
2016-07-25 11:24:49 +02:00
Andy Wingo
9222e05ef1 getaffinity, setaffinity docstring cleanup
* libguile/posix.c (scm_getaffinity, scm_setaffinity): Clean up
  docstrings.  Obviously if you have the function, you don't need to be
  told that you have it in the docstring.
2016-07-25 11:24:41 +02:00
Andy Wingo
a1cb59c47e Provide `kill' only if supported by the host
* libguile/posix.c (scm_kill): Only provide if the host has `kill'.  An
  incompatible change on MinGW, where this function would work only if
  the PID was the current PID, but that will be fixed by the next
  process.
2016-07-25 11:24:33 +02:00
Andy Wingo
a9e726eda7 More robust setuid, setgid, etc detection
* configure.ac: Check for getuid, getgid, setuid, and setgid.
* libguile/posix.c (scm_getuid, scm_getgid, scm_setuid, scm_setgid):
  Only provide Scheme functions if the OS provides these facilities.
  (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid): Provide if the
  host has getuid, getgid, etc, instead of being in a MinGW guard.
2016-07-25 11:24:26 +02:00
Mark H Weaver
856d318a9f Merge branch 'stable-2.0'
Conflicts:
	benchmark-suite/benchmarks/ports.bm
	libguile/async.h
	libguile/bytevectors.c
	libguile/foreign.c
	libguile/gsubr.c
	libguile/srfi-1.c
	libguile/vm-engine.h
	libguile/vm-i-scheme.c
	module/Makefile.am
	module/language/tree-il/analyze.scm
	module/language/tree-il/peval.scm
	module/scripts/compile.scm
	module/scripts/disassemble.scm
	test-suite/tests/asm-to-bytecode.test
	test-suite/tests/peval.test
	test-suite/tests/rdelim.test
2014-09-30 03:50:47 -04:00
Ludovic Courtès
447af515a3 Add 'EXIT_SUCCESS' and 'EXIT_FAILURE'.
Suggested by Frank Terbeck <ft@bewatermyfriend.org>.

* libguile/posix.c (scm_init_posix): Define 'EXIT_SUCCESS' and
  'EXIT_FAILURE'.
* doc/ref/posix.texi (Processes): Document them.
2014-09-22 22:51:39 +02:00
Eli Zaretskii
9dc3fc4dd4 Fix calculation of CPU set size for getaffinity.
* libguile/posix.c (cpu_set_to_bitvector): Use CPU_SETSIZE, not
  sizeof, to compute the size of the CPU set.
2014-07-03 19:30:02 +03:00
Ludovic Courtès
a43fa1b706 Slightly simplify 'scm_open_process'.
* libguile/posix.c (scm_open_process): Call 'scm_fdes_to_port' with the
  '0' flag, and remove 'scm_setvbuf' calls.
2014-05-28 23:06:45 +02:00
Mark H Weaver
475772ea57 Merge branch 'stable-2.0'
Conflicts:
	GUILE-VERSION
	NEWS
	guile-readline/ice-9/readline.scm
	libguile/async.c
	libguile/backtrace.c
	libguile/deprecated.h
	libguile/gc-malloc.c
	libguile/gdbint.c
	libguile/init.c
	libguile/ioext.c
	libguile/mallocs.c
	libguile/print.c
	libguile/rw.c
	libguile/scmsigs.c
	libguile/script.c
	libguile/simpos.c
	libguile/snarf.h
	libguile/strports.c
	libguile/threads.c
	libguile/vm-i-scheme.c
	libguile/vm-i-system.c
	module/srfi/srfi-18.scm
	test-suite/Makefile.am
	test-suite/standalone/test-num2integral.c
2014-04-25 02:06:01 -04:00
Mark H Weaver
bc8e6d7d8c Rely on Gnulib for <unistd.h>.
* libguile/async.c:
* libguile/backtrace.c:
* libguile/error.c:
* libguile/filesys.c:
* libguile/fports.c:
* libguile/gc-malloc.c:
* libguile/gc.c:
* libguile/gdbint.c:
* libguile/init.c:
* libguile/ioext.c:
* libguile/load.c:
* libguile/mallocs.c:
* libguile/mkstemp.c:
* libguile/ports.c:
* libguile/posix.c:
* libguile/r6rs-ports.c:
* libguile/random.c:
* libguile/rw.c:
* libguile/scmsigs.c:
* libguile/script.c:
* libguile/simpos.c:
* libguile/socket.c:
* libguile/stime.c:
* libguile/strports.c:
* libguile/threads.c: Unconditionally include <unistd.h>.
2014-02-27 22:38:48 -05:00
Mark H Weaver
28d5d2537c Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	libguile/keywords.c
	libguile/vm.c
2013-07-16 01:33:27 -04:00
Ludovic Courtès
b16bf64639 Fix #ifdefery for `setegid'.
* libguile/posix.c (scm_setegid): Change to #ifdef HAVE_SETEGID.
2013-06-16 21:47:39 +02:00
Mark H Weaver
86cf4773ff Merge remote-tracking branch 'origin/stable-2.0' 2013-03-30 22:56:27 -04:00
Ludovic Courtès
df3d365a99 build: Build and check (ice-9 popen) only when --enable-posix and HAVE_FORK.
Fixes <http://bugs.gnu.org/13848>.
Reported by Jan Schukat <shookie@email.de>.

* configure.ac: Rename `HAVE_FORK' conditional to `BUILD_ICE_9_POPEN'.
  Set it when both $enable_posix and $ac_cv_func_fork are true.
* libguile/posix.c (scm_init_posix): Add the `fork' feature.
* doc/ref/api-options.texi (Common Feature Symbols): Add `fork'.
* doc/ref/posix.texi (Pipes): Add footnote mentioning the `fork'
  feature.
* module/Makefile.am (SCRIPTS_SOURCES): Make `scripts/autofrisk.scm' and
  `scripts/scan-api.scm' conditional on `BUILD_ICE_9_POPEN'.
* test-suite/tests/popen.test (if-supported): New macro.
  Wrap body in `if-supported'.
2013-03-29 19:20:01 +01:00
Mark H Weaver
26d148066f Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	configure.ac
	libguile/deprecated.c
	libguile/deprecated.h
	libguile/filesys.h
	libguile/fluids.c
	libguile/fports.c
	libguile/gc.c
	libguile/guile.c
	libguile/numbers.c
	libguile/objcodes.c
	libguile/r6rs-ports.c
	libguile/smob.c
	libguile/socket.c
	libguile/threads.h
	module/language/scheme/decompile-tree-il.scm
	module/language/tree-il/peval.scm
	test-suite/tests/syncase.test
2013-03-28 05:09:53 -04:00
Andy Wingo
94c53e0601 provide getlogin declaration if needed.
* configure.ac: Check for getlogin decl.
* libguile/posix.c: Declare getlogin if needed.
2013-03-09 23:55:01 +01:00
Andy Wingo
aa59904eae fix mingw issues with posix.c
* libguile/posix.c (scm_execl, scm_execlp, scm_execle)
  (scm_open_process): Remove casts for ancient mingw.
  (scm_utime): If we fall back to utime, assert that flags is 0.
  (scm_getlogin): Rely on gnulib.
2013-03-09 23:12:51 +01:00
Andy Wingo
d3c88f1826 simplify posix.c
* libguile/posix.c: Reorder includes to fix mingw include-order
  problem.  Remove ttyname shims; gnulib is the place to fix that.
  Remove winsock2 include, as gnulib seems to handle that OK.  Rely on
  the new pipe-posix gnulib module.  Don't bother shimming getlogin, etc
  on mingw; gnulib is the place for shims.
2013-03-09 22:42:17 +01:00
Andy Wingo
9b977c836b Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	libguile/array-handle.c
	libguile/deprecated.h
	libguile/inline.c
	libguile/inline.h
	module/ice-9/deprecated.scm
	module/language/tree-il/peval.scm
2013-02-18 17:59:38 +01:00
Ludovic Courtès
3d2b2676e3 Fix `getgroups' for when zero supplementary group IDs exist.
* libguile/posix.c (scm_getgroups): Return the empty vector when NGROUPS
  is zero.  Reported by Mike Gran <spk121@yahoo.com>.
2013-02-16 18:41:15 +01:00
Andy Wingo
a796d0a954 warn on multithreaded fork
* libguile/posix.c (scm_fork): Issue a warning on a multithreaded fork.
* doc/ref/posix.texi (Processes): Add note about multithreaded fork.

* test-suite/tests/00-socket.test: Moved here, from socket.test, so as
  to run before any threads are created.
* test-suite/Makefile.am: Adapt.
2013-01-17 12:38:56 +01:00
Andy Wingo
22cdf986db warning instead of error on multithreaded fork
* libguile/posix.c (scm_fork): Issue a warning instead of an error on a
  multithreaded fork.
* doc/ref/posix.texi (Processes): Add note about multithreaded fork.
2013-01-17 12:25:52 +01:00
Andy Wingo
b4fa6cc909 Merge remote-tracking branch 'origin/stable-2.0'
There is a failing test due to a scm_from_utf8_stringn bug brought out
by the iconv test that will be fixed in the next commit.

Conflicts:
	libguile/deprecated.h
	module/ice-9/deprecated.scm
2013-01-15 10:45:39 +01:00
Andy Wingo
03a2f59851 slight open-pipe* / open-process refactor
* libguile/posix.c (scm_open_process): Return the ports as values
  instead of calling out to Scheme again to make-rw-port.  This
  function is private to (ice-9 popen).

* module/ice-9/popen.scm (open-pipe*): Adapt to change.
2013-01-08 12:58:05 +01:00
Mark H Weaver
e0c211bb2e Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	GUILE-VERSION
	libguile/posix.c
	module/ice-9/eval.scm
	test-suite/tests/cse.test
2013-01-07 17:23:26 -05:00
Ludovic Courtès
712ca51ffe Remove reference to scm_init_popen' when fork' is unavailable.
Fixes <http://bugs.gnu.org/12477>.
Reported by lin ray <lin.wei.ray@gmail.com>.

* configure.ac: Define the `HAVE_FORK' Automake conditional.
* module/Makefile.am (ICE_9_SOURCES): Add `ice-9/popen.scm' only when
  HAVE_FORK.
* libguile/posix.c (scm_init_posix): Register `scm_init_popen' only when
  HAVE_FORK.
2012-11-23 23:37:29 +01:00
Andy Wingo
eaf99988ae run finalizers asynchronously (in asyncs and/or pthreads)
* libguile/finalizers.c: New excitement!  We'll be running finalizers in
  threads, if that's available.  If it's not available, during early
  boot, we can run finalizers in asyncs.  This will make it safer to
  allocate while holding a mutex.

* libguile/posix.c (scm_fork): Shut down the finalizer thread before
  forking.

* libguile/init.c (scm_i_init_guile): Init the async finalizer mechanism
  during boot and, if available, initialialize the finalizer thread at
  the very end.

* libguile/gc.c (scm_storage_prehistory): Tell libgc we'll be finalizing
  on demand.
  (scm_gc): Explicitly run finalizers here.  If you're calling this
  function, you probably want synchronous GC.
2012-02-24 13:33:02 +01:00
Andy Wingo
415e00fc57 signal an error on multithreaded fork
* libguile/posix.c (scm_fork): Signal an error if a `fork' is attempted
  after threads have been spawned.

* test-suite/tests/00-socket.test: Moved here, from socket.test, so as
  to run before any threads are created.
* test-suite/Makefile.am: Adapt.
2012-02-24 11:20:21 +01:00
Andy Wingo
44b76a785c Revert "install pthread_atfork handlers for guile's static mutexen"
This reverts commit 6a97b1f93a.
2012-02-23 14:18:56 +01:00
Andy Wingo
9d15db65ff Merge remote-tracking branch 'local-2.0/stable-2.0'
Conflicts:
	module/language/tree-il/analyze.scm
2012-02-23 14:10:22 +01:00
Andy Wingo
a2e946f1ef rewrite open-process in C, for robustness
* libguile/posix.c (scm_open_process): Rewrite in C, so as to avoid
  allocations and other calls that are not async-signal-safe.
  (scm_init_popen, scm_init_posix): Register popen extension.

* module/ice-9/popen.scm: Load the popen extension, to get open-process.
2012-02-23 13:56:54 +01:00
Andy Wingo
6a97b1f93a install pthread_atfork handlers for guile's static mutexen
* libguile/async.c:
* libguile/deprecation.c:
* libguile/fluids.c:
* libguile/gc.c:
* libguile/instructions.c:
* libguile/ports.c:
* libguile/posix.c:
* libguile/strings.c:
* libguile/threads.c: Use the SCM_PTHREAD_ATFORK_LOCK_STATIC_MUTEX
  mechanism to lock a number of static mutexen.
2012-02-17 12:11:14 +01:00
Bake Timmons
b7e64f8b26 Improve the usage of variable names in C docstrings.
* libguile/alist.c:
* libguile/array-map.c:
* libguile/arrays.c:
* libguile/bitvectors.c:
* libguile/filesys.c:
* libguile/foreign.c:
* libguile/generalized-arrays.c:
* libguile/hashtab.c:
* libguile/ioext.c:
* libguile/load.c:
* libguile/numbers.c:
* libguile/ports.c:
* libguile/posix.c:
* libguile/print.c:
* libguile/procprop.c:
* libguile/promises.c:
* libguile/simpos.c:
* libguile/socket.c:
* libguile/srfi-1.c:
* libguile/srfi-13.c:
* libguile/srfi-14.c:
* libguile/stacks.c:
* libguile/stime.c:
* libguile/strings.c:
* libguile/struct.c:
* libguile/symbols.c:
* libguile/threads.c:
* libguile/weak-table.c:
* libguile/weak-vector.c: Make the variable names in the C docstrings more
  consistent.  Replace a few instances of @var with @code when appropriate.
2012-02-02 12:22:10 +01:00
Andy Wingo
81bda963e9 fix scm_tmpfile leak
* libguile/posix.c (scm_tmpfile): Fix to actually close the new
  tmpfile, causing its deletion, while keeping an fd to the file open.
  Fixes a leak both in memory and disk space on POSIX systems; MINGW
  systems will leak however.  A FIXME for later.
2011-08-17 23:54:58 +02:00
Andy Wingo
393baa8a44 scm_is_false instead of == SCM_BOOL_F; also is_null, is_true, etc
* libguile/deprecation.c (scm_issue_deprecation_warning)
* libguile/eval.c (CAPTURE_ENV):
* libguile/goops.c (make_dispatch_procedure, make_class_from_symbol):
  (create_smob_classes):
* libguile/guardians.c (finalize_guarded, scm_i_get_one_zombie):
* libguile/hashtab.c (scm_fixup_weak_alist, scm_internal_hash_fold):
* libguile/i18n.c (scm_nl_langinfo)
* libguile/load.c (scm_primitive_load)
* libguile/posix.c (scm_setrlimit)
* libguile/socket.c (scm_to_sockaddr):
* libguile/srcprop.c (scm_make_srcprops): Use scm_is_false / scm_is_true
  / scm_is_null instead of comparing against SCM_BOOL_F et al.
2011-05-13 15:28:41 +02:00
Andy Wingo
d223c3fcdd scm_is_eq for SCM vals, not == or !=
* libguile/bytevectors.c (scm_make_bytevector, STRING_TO_UTF)
  (UTF_TO_STRING):
* libguile/continuations.c (scm_i_check_continuation):
* libguile/expand.h (SCM_EXPANDED_P):
* libguile/fluids.c (scm_i_make_with_fluids):
* libguile/generalized-vectors.c (scm_make_generalized_vector):
* libguile/goops.c (SCM_GOOPS_UNBOUNDP, slot_definition_using_name):
  (scm_c_extend_primitive_generic, more_specificp, scm_make)
* libguile/i18n.c (SCM_VALIDATE_OPTIONAL_LOCALE_COPY):
  (scm_locale_string_to_integer)
* libguile/modules.c (resolve_duplicate_binding):
  (scm_module_reverse_lookup)
* libguile/posix.c (scm_to_resource):
* libguile/r6rs-ports.c (scm_put_bytevector):
* libguile/socket.c (scm_connect, scm_bind, scm_sendto
* libguile/stacks.c (find_prompt):
* libguile/variable.c (scm_variable_ref, scm_variable_bound_p):
* libguile/vm-engine.h (ASSERT_BOUND_VARIABLE, ASSERT_BOUND)
* libguile/vm-i-system.c (VARIABLE_BOUNDP, local_bound)
  (long_local_bound, fluid_ref): Use scm_is_eq to compare, not == / !=.
2011-05-13 13:49:32 +02:00
Ludovic Courtès
d20912e67d Move {total,current}-processor-count' outside of posix.c'.
* libguile/posix.c (scm_total_processor_count,
  scm_current_processor_count): Move to...
* libguile/threads.c: ... here.

* libguile/posix.h (scm_total_processor_count,
  scm_current_processor_count): Move declarations to...
* libguile/threads.h: ... here.

* test-suite/tests/posix.test ("nproc"): Move tests to...
* test-suite/tests/threads.test: ... here.
2011-04-25 22:41:58 +02:00
Ludovic Courtès
073167ef7b Allow compilation with `--disable-posix'.
Reported by Dmitry Dzhus <dima@dzhus.org>.

* configure.ac: Remove `AC_LIBOBJ([filesys])'.  Document
  `--disable-posix' as omitting non-essential POSIX interfaces.

* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
  Add `filesys.c'.
  (DOT_DOC_FILES): Add `filesys.doc'.
  (EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): Remove
  `filesys.c'.

* libguile/posix.c (scm_mkstemp, scm_access): Move to `filesys.c'.
  (scm_init_posix): Move `R_OK' etc. to `filesys.c'.

* libguile/filesys.c (scm_chown, scm_chmod, scm_umask, scm_open_fdes,
  scm_open, scm_close, scm_close_fdes, scm_link, scm_tc16_dir,
  scm_directory_stream_p, scm_opendir, scm_readdir, scm_rewinddir,
  scm_closedir, scm_dir_print, scm_dir_free, scm_chdir, scm_getcwd,
  set_element, fill_select_type, get_element, retrieve_select_type,
  scm_select, scm_fcntl, scm_fsync, scm_symlink, scm_readlink,
  scm_lstat, scm_copy_file): Conditionalize on HAVE_POSIX.
  (scm_mkstemp, scm_access): New functions.
  (scm_init_filesys): Conditionalize `scm_tc16_dir', `O_RDONLY', etc. on
  HAVE_POSIX.  Define `R_OK', `W_OK', etc.

* libguile/fports.c (fport_print): Use `scm_ttyname' only when
  HAVE_POSIX.

* libguile/i18n.c (lock_locale_mutex, unlock_locale_mutex): New
  functions.  Update users of `scm_i_locale_mutex' to use them.

* libguile/init.c (scm_i_init_guile): Always call `scm_init_filesys'.

* meta/guile-tools.in (main): Use `setlocale' only when it is defined.

* module/ice-9/boot-9.scm: Always load `ice-9/posix'.
2011-04-15 00:09:16 +02:00
Ludovic Courtès
22072f2155 Include <sched.h> in `posix.c'.
* configure.ac: Check for <sched.h>.

* libguile/posix.c [HAVE_SCHED_H]: Include <sched.h>, for
  `sched_setaffinity' & co.
  Reported by Marco Maggi <marco.maggi-ipsu@poste.it>.
2011-04-14 23:16:21 +02:00
Andy Wingo
03976fee3b fix code that causes warnings on gcc 4.6
* libguile/arrays.c (scm_i_read_array):
* libguile/backtrace.c (display_backtrace_body):
* libguile/filesys.c (scm_readdir)
* libguile/i18n.c (chr_to_case):
* libguile/ports.c (register_finalizer_for_port):
* libguile/posix.c (scm_nice):
* libguile/stacks.c (scm_make_stack): Clean up a number of
  set-but-unused vars.  Thanks to Douglas Mencken for the report.

* libguile/numbers.c (scm_log, scm_exp): Fix a few #if cases that should
  be #ifdef.
2011-03-17 12:39:53 +01:00
Ludovic Courtès
9d9c66ba82 Add scm_i_set_default_port_encoding' and scm_i_default_port_encoding'.
* libguile/ports.c (scm_i_set_default_port_encoding,
  scm_i_default_port_encoding): New function.  Replace
  `scm_i_set_port_encoding_x' and `scm_i_get_port_encoding' with
  PORT == SCM_BOOL_F.
  (scm_i_set_port_encoding_x): Assume PORT is a port.
  (scm_i_get_port_encoding): Remove.
  (scm_port_encoding): Adjust accordingly.
  (scm_new_port_table_entry): Use `scm_i_default_port_encoding'.

* libguile/ports.h (scm_i_get_port_encoding): Remove declarations.
  (scm_i_default_port_encoding, scm_i_set_default_port_encoding): New
  declarations.

* libguile/posix.c (setlocale): Use `scm_i_set_default_port_encoding'.
2011-02-10 23:04:43 +01:00
Mark H Weaver
b56c252b52 Fix incorrect FUNC_NAME for scm_current_processor_count
* libguile/posix.c (scm_current_processor_count):
  Fix incorrect FUNC_NAME (was s_scm_total_processor_count)
2011-01-28 12:16:16 +01:00