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

 
 

bug #36848: FreeBSD support

Submitted by:  None
Submitted on:  Sat 14 Jul 2012 06:38:37 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Colin Watson <cjwatson>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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 File(s):
   
   
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
  • -unavailable- added by cjwatson (Posted a comment)
  • -unavailable- added by fernandotcl (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 05 Jun 2013 07:33:23 PM UTCcjwatsonStatusNone=>Fixed
      Assigned toNone=>cjwatson
      Open/ClosedOpen=>Closed
    Sat 01 Dec 2012 09:46:03 PM UTCfernandotclAttached File-=>Added clearenv-fbsd+osx.patch, #27020
      Attached File-=>Added program_name_no_glibc.patch, #27021
    Sat 01 Dec 2012 08:38:57 PM UTCNoneAttached File-=>Added libpipeline-1.2.2-freebsd+osx.patch, #27018
    Sat 14 Jul 2012 06:38:37 PM UTCNoneAttached File-=>Added libpipeline-1.2.1-freebsd.patch, #26201

    Back to the top


    Powered by Savane 3.1-cleanup1