Re: Now that SCM type is a union...

2011-08-14 Thread Ken Raeburn
On Aug 14, 2011, at 22:04, Ken Raeburn wrote: >>> * Shouldn't there be testing to catch this? (C89 mode, C99 mode, >>> different C++ specs, enabling various compiler warnings -- for >>> whatever compiler is in use -- and make them fatal, any interesting >>&g

Re: Now that SCM type is a union...

2011-08-14 Thread Ken Raeburn
On Aug 14, 2011, at 16:10, Andy Wingo wrote: >> * We should expect some Guile applications to be in C++. What >> versions of the C++ spec should Guile support? > > Dunno. What do other languages have to do with Guile's C interface? > Specifically what does C++ have to do with this? (Serious que

Re: Now that SCM type is a union...

2011-08-13 Thread Ken Raeburn
On Aug 13, 2011, at 08:23, Andy Wingo wrote: > I only have a draft copy of C99, from 7 September 2007, but it does > permit constant expressions to appear outside function bodies. How > could that happen except for in initializers? I do see the language in > the GCC docs though; it's confusing.

Re: Now that SCM type is a union...

2011-08-12 Thread Ken Raeburn
On Aug 12, 2011, at 08:44, ri...@happyleptic.org wrote: > Between stable-2.0 and master a patch changed the C representation > of the SCM type so that it is now a union. > > This code : > > static SCM foo = SCM_UNSPECIFIED; > > now expands to something similar to : > > static SCM foo = (SCM) {

Re: Reconsideration of MinGW work

2010-03-23 Thread Ken Raeburn
On Mar 22, 2010, at 20:04, Neil Jerram wrote: > Ken Raeburn writes: >> Yes... you then also need to decide if Guile is exposing GNU/POSIX >> functionality, whatever the native OS functionality is, or some >> abstraction... > > Ideally, yes, I think. In other words,

Re: Reconsideration of MinGW work

2010-03-21 Thread Ken Raeburn
On Mar 21, 2010, at 16:51, Neil Jerram wrote: > First, I've found that completing a successful build (i.e. autogen.sh, > configure and make) is not at all the end of the story; it's only the > first part of what is really needed - because at runtime some key pieces > of function can still be missin

Re: Need help to understand a macro

2010-03-19 Thread Ken Raeburn
On Mar 19, 2010, at 04:57, Josef Wolf wrote: > My next question is more related to the defstruct macro. > In line 11, defstruct stores the default initializers into the vv vector: > > (if (pair? f) (cadr f) '(if #f #f))) > > So if the field is a pair, the initializer is stored in vv. That's eas

Re: request tmpfile(3) wrapping in Guile 1.9 libguile

2010-02-08 Thread Ken Raeburn
On Feb 8, 2010, at 12:06, Andy Wingo wrote: >> But mkstemp doesn't guarantee that no one else will grab the file name >> in between the time mkstemp checks that the file doesn't exist, and when >> you actually open(O_CREAT) it. > > It does. The return value from mkstemp! is a port, and it mutates

Re: request tmpfile(3) wrapping in Guile 1.9 libguile

2010-02-08 Thread Ken Raeburn
On Feb 8, 2010, at 06:11, Andy Wingo wrote: > 1. tmpfile(3) returns a FILE*, whereas Guile's fports normally deal in > file descriptors. Will this be a problem? What about buffering? Do we > have to fclose() the FILE* to get deletion working? On POSIX systems you can use fileno(). The automatic d

Re: request: libguile to wrap getsid(2)

2009-12-27 Thread Ken Raeburn
On Dec 27, 2009, at 17:58, Thien-Thi Nguyen wrote: Can you point to a specific 1.4.x commit, to help with any extra bits that are needed, e.g. anything in configure.ac? No 1.4.x commit yet but i plan to do w/o configure checks since getsid(2) is POSIX.1-2001. And what about Windows? Ken

Re: Passing C pointers through guile

2008-07-22 Thread Ken Raeburn
On Jul 9, 2008, at 12:55, Kjetil S. Matheussen wrote: On Wed, 9 Jul 2008, Greg Troxel wrote: Does C guarantee that pointers fit in unsigned long? I don't know. But in practice: Yes. According to various sources, 64-bit Windows uses an LLP64 model -- meaning long is 32 bits, long long and po

Re: Newbie trying to use/install on Fedora 5

2006-04-19 Thread Ken Raeburn
On Apr 19, 2006, at 15:22, Olwe Bottorff wrote: I've apparently got basic guile (1.6.7) on my new Fed5, but it can't see/find anything else such as guile-config or libguile.h or, or, ori.e., can't follow along with the "book" on embedding guile in C. See if there's a "guile-devel" package y

Re: slib and scm_shell() conflicts

2006-02-21 Thread Ken Raeburn
On Feb 20, 2006, at 22:34, William Xu wrote: But don't know what does "Corrupted DWARF expression." mean... DWARF is the name of the new debug info format used in ELF object files. This suggests a bug in either gcc or gdb (or, possibly, binutils), and should be reported if you can figure o

Re: emacs+guile

2006-01-03 Thread Ken Raeburn
On Jan 3, 2006, at 11:10, Mikael Djurfeldt wrote: Emacs behavior is to a large extent controlled by the state of a set of global and buffer-local variables. Elisp code often uses dynamic binding to temporarily change some state, such as: Yep. Especially when (if?) it comes to a multithreaded E

emacs+guile

2006-01-03 Thread Ken Raeburn
Some of you may remember the guile-emacs project I started on years ago. I let it slide a bit when other things got in the way, but the last year or so I've been putting some work into it again. I've got a source tree tracking the Emacs CVS sources which can be configured to use Guile for

Re: Why won't this extension load?

2005-12-13 Thread Ken Raeburn
On Dec 13, 2005, at 11:01, Steve Juranich wrote: I'm fooling around trying to learn the Guile API. I'm following the example in the source distribution of v1.6.7. I've got a simple little C++ file (please try to ignore the bad style as it's not relevant to the problem at hand) that goes like th

Re: Exposing common type wrapping/unwrapping methods

2005-08-20 Thread Ken Raeburn
On Aug 20, 2005, at 08:40, Marius Vollmer wrote: My decision at that time was that we assume that there is only one malloc and one free. Okay. Basically, malloc and free referenced from a DLL, say libguile.dll, may be different instances of the functions than the application or other DLLs mig

Re: Exposing common type wrapping/unwrapping methods

2005-08-19 Thread Ken Raeburn
On Aug 19, 2005, at 03:57, Ludovic Courtès wrote: +/* Return a newly-allocated `sockaddr' structure that reflects ADDRESS, being + an address of family FAMILY, with the family-specific parameters ARGS (see + the description of `connect' for details). The returned structure may be + f

Re: SRFI-4's `scm_take_TAGvector ()'

2005-08-17 Thread Ken Raeburn
On Aug 17, 2005, at 10:16, Ludovic Courtès wrote: While the name of the `scm_take_TAGvector ()' function is pretty good at suggesting that it will take control over the data pointed to by the first argument, I find the prototype of these functions quite misleading. IMO, instead of: SCM scm_

Re: deprecated symbol warnings

2005-05-28 Thread Ken Raeburn
On May 26, 2005, at 14:58, Neil Jerram wrote: What is the extra benefit of link-time warnings over compile-time? Are there any cases where the user will see a link-time warning without a corresponding compile-time one? [...] All of which strike me as pretty marginal. Okay... Would link-t

Re: deprecated symbol warnings and Windows

2005-05-18 Thread Ken Raeburn
On May 14, 2005, at 08:40, Neil Jerram wrote: The warnings can be disabled while building guile (only while building deprecated.c, I hope) so that -Werror doesn't kill the build. In the header files, here's how it's taking shape, roughly: #if defined(SCM_DISABLE_DEPRECATION_WARNINGS) # define SCM

automated testing (was Re: deprecated symbol warnings)

2005-05-18 Thread Ken Raeburn
On May 18, 2005, at 08:20, Ludovic Courtès wrote: This sounds like a good idea. However, this would need to be somewhat automated, like Debian's build system, still without compromising on the user's privacy and control. I think that's a project of its own, isn't it? :-) Definitely. FWIW, I use

Re: deprecated symbol warnings

2005-05-17 Thread Ken Raeburn
On May 14, 2005, at 23:17, John W. Eaton wrote: [..."#define foo foo"...] Can you point to a widely used compiler that will actually have trouble with this? If not, then maybe it is not worth worrying about? Hmm... does anyone feel like setting up an array of test machines to automatically do fre

Re: deprecated symbol warnings

2005-05-14 Thread Ken Raeburn
On May 14, 2005, at 08:40, Neil Jerram wrote: This looks very useful. I'm not an expert in this kind of thing, but here are some comments. Thanks... #elif defined _WIN32 Does the __declspec syntax work for all Windows compilers? If it's actually specific to MSVC (which is the only compiler I'm

deprecated symbol warnings

2005-05-13 Thread Ken Raeburn
Some time back, I wrote: It might be a bit annoying to do in the source, but what about flagging deprecated symbols while still allowing their use, in the non-"--disable-deprecated" case? E.g., declare a function SCM_LENGTH, which is declared in the header file with a macro which under recent e