Re: [PATCH] tmpdir: Add function to create a unique temp directory.

2020-12-17 Thread John Darrington
On Thu, Dec 17, 2020 at 12:26:20AM +0100, Bruno Haible wrote: So, it differs from 'create_temp_dir' only in the aspect that it does NOT do automatic cleanup. Since you are already aware of the 'clean-temp' module — you contributed to it 8 years ago :) — what could

[PATCH] tmpdir: Add function to create a unique temp directory.

2020-12-16 Thread John Darrington
* lib/tmpdir.c (create_tmp_dir): New function definition. * lib/tmpdir.h (create_tmp_dir): New function declaration. --- lib/tmpdir.c | 119 +++ lib/tmpdir.h | 20 + 2 files changed, 139 insertions(+) diff --git a/lib/tmpdir.c

Re: recent gnulib has problems with read, write and close within structs

2020-09-14 Thread John Darrington
On Sun, Sep 13, 2020 at 11:11:55PM +0200, Bruno Haible wrote: The workaround is simple: Make sure that you include the corresponding file - here - before the struct definition. That is, in this case, at the beginning of ags/object/ags_application_context.h, add

Re: [PATCH] tmpdir.c (path_search_alloc): New function.

2020-09-13 Thread John Darrington
On Sun, Sep 13, 2020 at 01:12:28PM +0200, Bruno Haible wrote: Hi John, As this is your first major contribution to Gnulib, can you please make sure you have signed a copyright assignment with the FSF regarding 'GNULIB'? Yes, I have. > * lib/tmpdir.c

[PATCH] tmpdir.c (path_search_alloc): New function.

2020-09-13 Thread John Darrington
* lib/tmpdir.c (path_search_alloc): Define new function similar to path_search, but which allocates the buffer for the result instead of relying on the caller to preallocate it. *lib/tmpdir.h (path_search_alloc): Declare it. --- lib/tmpdir.c | 127

Re: PSPP-BUG: PSPP make check errors [cross posting to bug-gnulib@gnu.org]

2020-08-29 Thread John Darrington
These are very valid and helpful points. I wasn't even aware of "platform-testers". Thanks to Ruth for reporting this problem and thanks to everyone else for diagnosing it. J' On Fri, Aug 28, 2020 at 06:20:26PM -0400, Jeffrey Walton wrote: The PSPP folks did not make an announcement

Re: PSPP-BUG: PSPP make check errors [cross posting to bug-gnulib@gnu.org]

2020-08-27 Thread John Darrington
ke[1]: Leaving directory `/home/ad/ad36/ad3658/Downloads/pspp-1.4.0' make: *** [all] Error 2 [ad3658@cus-survox1 pspp-1.4.0]$ From: John Darrington Sent: Thursday, August 27, 2020 3:30 PM To: Ruth Waite Cc: John Darringt

[PATCH] version-etc.c: Do not include URLS in translatable strings.

2019-05-06 Thread John Darrington
This method is better for several reasons: 1. It avoids the danger of cut and paste errors. 2. Naive translators can't translate the urls (it's amazing how many do things like that!) 3. Should the urls ever change, only this file has to be updated rather than every single translation. *

Gnulib breaks CC_FOR_BUILD

2018-12-22 Thread John Darrington
I'm trying to use gnulib in the same project as ax_prog_cc_for_build.m4 from the autoconf archive[1]. But it seems that they do not play nicely together. Specifically, gnulibs std-gnu11.m4 seems to negate the effect of the former, resulting in CC_FOR_BUILD always getting defined as the empty

PATCH: numerous warnings from gnulib header files.

2013-02-06 Thread John Darrington
Using gcc 4.4.5 I get *tons* of warnings from gnulib headers: Eg: In file included from ./SOURCE/src/libpspp/argv-parser.c:26: ./SOURCE/gl/xalloc.h:176: error: no previous prototype for 'x2nrealloc' Apparently this doesn't happen on gcc 4.7.2 The following patch fixes the problem for me. I

Re: Non-recursive building?

2013-01-19 Thread John Darrington
On Thu, Jan 17, 2013 at 09:31:39AM -0700, Eric Blake wrote: On 01/17/2013 08:52 AM, John Darrington wrote: Can gnulib's automake environment be used in a non-recursive manner? That is to say can I include the gnulib modules from my project's Makefile.am or is there no other

Non-recursive building?

2013-01-17 Thread John Darrington
Can gnulib's automake environment be used in a non-recursive manner? That is to say can I include the gnulib modules from my project's Makefile.am or is there no other way that using SUBDIRS= Would a patch to make it possible be considered if I were to offer one? J' -- PGP Public key ID:

Re: C locale *printf functions ?

2012-12-10 Thread John Darrington
I gave it a rudimentary test and it seems to do what I want. I will also need other related functions, though, Eg xasprintf, vsnformat, etc. J' On Thu, Dec 06, 2012 at 10:59:44PM -0800, Ben Pfaff wrote: John Darrington j...@darrington.wattle.id.au writes: Gnulib has a number

[PATCH] memory leak in clean_temp

2012-07-28 Thread John Darrington
From: John Darrington j...@darrington.wattle.id.au Date: Sat, 28 Jul 2012 08:36:34 +0200 Subject: [PATCH] Fix memory leak in clean-temp.c The two lists subdirs and files were never being freed. This change fixes that. --- lib/clean-temp.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions

[PATCH] supports_delete_on_close

2012-06-20 Thread John Darrington
2001 From: John Darrington j...@darrington.wattle.id.au Date: Tue, 19 Jun 2012 18:26:55 +0200 Subject: [PATCH] supports_delete_on_close: Initialise OSVIERSIONINFO struct per documentation The microsoft documentation says that dwOSVersionInfoSize must be initialised with the size of the struct

Re: [PATCH] directory separator

2012-06-07 Thread John Darrington
On Wed, Jun 06, 2012 at 01:07:41PM -0700, Paul Eggert wrote: On 06/06/2012 12:43 PM, John Darrington wrote: If as you say, windows prefers \ is there a good reason NOT to use it? Mostly to avoid the maintenance hassle. Surely using a symbol instead of a literal constant

Re: [PATCH] directory separator

2012-06-07 Thread John Darrington
On Thu, Jun 07, 2012 at 12:29:03AM -0700, Paul Eggert wrote: On 06/07/2012 12:19 AM, John Darrington wrote: Surely using a symbol instead of a literal constant makes maintenance easier not harder? I don't see why. For example: remove (a/b

[PATCH] directory separator

2012-06-06 Thread John Darrington
. From 7597c055a47a06a10f8f8d4e64cf2fd8131df7fe Mon Sep 17 00:00:00 2001 From: John Darrington j...@darrington.wattle.id.au Date: Wed, 6 Jun 2012 20:46:45 +0200 Subject: [PATCH] Use the macro DIRECTORY_SEPARATOR instead of a literal / when building pathnames --- lib/tempname.c |4 +++- lib

Re: [PATCH] directory separator

2012-06-06 Thread John Darrington
On Wed, Jun 06, 2012 at 01:10:09PM -0600, Eric Blake wrote: On 06/06/2012 12:54 PM, John Darrington wrote: I'm offering this patch which ensures that the paths of tempfiles are created with the appropriate separator for the machine. What platform did you need

tmpdir on windows

2011-08-20 Thread John Darrington
In PSPP we are using the path_search function from the tmpdir module to determine the path for temporary files. Windows users have complained that it puts temporary files in places they consider to be inappropriate. I did a bit of research, and found that the normal path on windows depends on

include_next fails on cross-compiling

2011-05-22 Thread John Darrington
Cross compiling to host=i586-mingw32msvc I encountered 2 problems related to include_next.m4. Firstly I had to apply the attached patch to avoid configure complaining about missing operands. Secondly, I had to put gl_INCLUDE_NEXT in configure.ac which I was rather surprised about. Since

Re: return values of test programs in *.m4 macros

2010-12-01 Thread John Darrington
On Tue, Nov 30, 2010 at 04:07:27AM +0100, Bruno Haible wrote: Hi, For a long time, we've written our test programs in *.m4 macros in such a way that when they fail, the return code is 1. But often we have several tests, combined in a single program. Example:

Message string vs Coding Standards

2010-12-01 Thread John Darrington
This line in lib/siglist.h: init_sig (SIGILL, ILL, N_(Illegal instruction)) contradicts the GNU Coding Standards which says: `Please do not use the term illegal to refer to erroneous input to a computer program. Please use invalid for this, and reserve the term illegal for activities

Erroneous assumption in isblank.c

2010-10-05 Thread John Darrington
In lib/isblank.c I see the following: /* The blank characters are '\t', ' ', U+1680, U+180E, U+2000..U+2006, U+2008..U+200A, U+205F, U+3000, and none except the first two is present in a common 8-bit encoding. Therefore the substitute for other platforms is not more complicated

Re: Feature request: c-snprintf

2009-03-25 Thread John Darrington
On Tue, Mar 24, 2009 at 11:18:12PM +0100, Bruno Haible wrote: So, for numbers to strings, there are four ways to proceed: 1) Use the snprintf_l function available on MacOS X 10.5. Drawback: Unportable, and gnulib cannot provide an easy replacement for

Feature request: c-snprintf

2009-03-24 Thread John Darrington
In pspp, we've been using the c-ctype module. Would it also be possible to produce a snprintf function and friends which ignores locale settings and always formats strings in the C locale? J' -- PGP Public key ID: 1024D/2DE827B3 fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8

Re: Error trying to compile pspp using up-to-date gnulib

2008-10-22 Thread John Darrington
The pspp build system includes the line gnulib-tool ... --import ... unilbrk/ulc-width-linebreaks ... My guess is that mingw is trying and failing to quote the unilbrk/ulc-width-linebreaks string. J' On Wed, Oct 22, 2008 at 11:02:04AM -0300, Michel Boaventura wrote: Hi Simon,

Re: licence text as string?

2007-09-27 Thread John Darrington
On Fri, Sep 28, 2007 at 12:59:09AM +0200, Bruno Haible wrote: Hi, John Darrington wrote: Would it be possible to add a feature to the gpl-[23].0 modules which provides the text of the GPL as a const char * ? This would be useful for user interfaces which

licence text as string?

2007-09-26 Thread John Darrington
Would it be possible to add a feature to the gpl-[23].0 modules which provides the text of the GPL as a const char * ? This would be useful for user interfaces which need to display the licence text, such as http://www.gtk.org/api/2.6/gtk/GtkAboutDialog.html#gtk-about-dialog-set-license It

Re: new module 'iconv_open'

2007-04-02 Thread John Darrington
On Tue, Apr 03, 2007 at 12:43:19AM +0200, Bruno Haible wrote: Simon Josefsson wrote: Well, at least after I installed gperf, before that I got this error during build: make[2]: Entering directory `/home/jas/src/libidn/lib/gl' gperf -m 10 iconv_open-aix.gperf

progname.h contradicts gnu coding standards

2007-03-19 Thread John Darrington
The instructions in progname.h say: /* Programs using this file should do the following in main(): set_program_name (argv[0]); */ /* Set program_name, based on argv[0]. */ extern void set_program_name (const char *argv0); but the GNU coding standards say: The program's name should be

Non const global in mbchar.c

2006-10-25 Thread John Darrington
I've been auditing our project for constness. One that shows up from gnulib is is_basic_table from mbchar.c This symbol should be const? J' -- PGP Public key ID: 1024D/2DE827B3 fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://pgp.mit.edu or any PGP keyserver for