bugPipeline manipulation library - Bugs: bug #36848, FreeBSD support

 
 

bug #36848: FreeBSD support

Submitter:  None
Submitted:  Sat 14 Jul 2012 06:38:37 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  cjwatson
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 05 Jun 2013 07:33:23 PM UTC, comment #4: 

OK, after discussion on bug-gnulib I've gone for an approach similar in spirit to yours although different in details.

Wed Jun  5 20:28:59 BST 2013  Colin Watson  <cjwatson@debian.org>

        Provide a replacement clearenv for non-glibc systems that lack it
        (Savannah bug #36848).

        * gnulib: Import environ module.
        * configure.ac: Check for clearenv.
        * lib/pipeline.c [!HAVE_CLEARENV] (clearenv): New replacement
          function.
        * lib/pipeline-private.h [!HAVE_CLEARENV] (clearenv): Add prototype.

I'll be releasing libpipeline 1.2.4 shortly with this.  Thanks!

Colin Watson <cjwatson>
Group administrator
Wed 05 Jun 2013 09:20:13 AM UTC, comment #3: 

For program_name, I prefer the approach in your first patch, and have applied something similar in bzr.  Thanks.

For the rest, this ideally needs to be fixed in gnulib; that is externally maintained and I don't want to apply patches to it in libpipeline unless I have absolutely no alternative.  I've forwarded this issue there:

  http://lists.gnu.org/archive/html/bug-gnulib/2013-06/msg00014.html

Colin Watson <cjwatson>
Group administrator
Sat 01 Dec 2012 09:46:03 PM UTC, comment #2: 

Ok, so how about a different approach. I've split up the patch. The first patch fixes the missing clearenv() in OS X (and probably FreeBSD as well). The second patch fixes program_name, by assigning it a generic name ("gnulib") if libc != glibc.

@cjwatson: any thoughts if something like this would ever be accepted?

PS: Signed up now, no need to directly e-mail me.

(file #27020, file #27021)

Fernando Lemos <fernandotcl>
Sat 01 Dec 2012 08:38:57 PM UTC, comment #1: 

I'm attaching a patch based on the original patch that also adds support for OS X.

Working around clearenv() is really a mess. There seems to be a better way to handle this at:

http://www.opensource.apple.com/source/dovecot/dovecot-239/dovecot/src/lib/env-util.c

I don't now what cjwatson's instance on this is, but I'd rather have the macros wrapped in do { } while (0).

Please feel free to contact me at fernandotcl AT gmail.com, as I'm not logged in.

(file #27018)

Anonymous
Sat 14 Jul 2012 06:38:37 PM UTC, original submission:  

There are two issue building libpipeline on FreeBSD.

- clearenv() is not availale on FreeBSD libc.
- all test programs should define its program_name
  (with GNU libc, program_name is #define'd to use (GNU libc only) program_invocation_name())

Attahced patch include fix for these two issues.

It check if clearenv() is available or not and if not available use "environ = NULL" instead.

Also it set "const char* program_name" for all test progrmas as gnulib/lib/error.c is suggesting.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #27020:  clearenv-fbsd+osx.patch added by fernandotcl (901B - application/octet-stream)
file #27021:  program_name_no_glibc.patch added by fernandotcl (595B - application/octet-stream)
file #27018:  libpipeline-1.2.2-freebsd+osx.patch added by None (3KiB - application/octet-stream - Patch that should work both on FreeBSD and OS X)
file #26201:  libpipeline-1.2.1-freebsd.patch added by None (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cjwatson (Posted a comment)
  • -email is unavailable- added by fernandotcl (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-06-05 cjwatson StatusNone Fixed
        Assigned toNone cjwatson
        Open/ClosedOpen Closed
    2012-12-01 fernandotcl Attached File- Added clearenv-fbsd+osx.patch, #27020
        Attached File- Added program_name_no_glibc.patch, #27021
    2012-12-01 None Attached File- Added libpipeline-1.2.2-freebsd+osx.patch, #27018
    2012-07-14 None Attached File- Added libpipeline-1.2.1-freebsd.patch, #26201

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code