[PATCH] Fixed conkeror-spawn-helper.c for FreeBSD.

View: New views
7 Messages — Rating Filter:   Alert me  

[PATCH] Fixed conkeror-spawn-helper.c for FreeBSD.

by burin080 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

[PATCH] Fixed conkeror-spawn-helper.c for FreeBSD.

Hello list,

I had to add this include directive to compile the conkeror-spawn-helper under FreeBSD 7.2. Conkeror is running wonderfully and edit-current-field-in-external-editor now works as it did under Linux.

Cheers,

Ricardo Buring

---
 conkeror-spawn-helper.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/conkeror-spawn-helper.c b/conkeror-spawn-helper.c
index dcad86d..d3ffbc4 100644
--- a/conkeror-spawn-helper.c
+++ b/conkeror-spawn-helper.c
@@ -18,6 +18,7 @@
 #include <fcntl.h>
 #include <netinet/in.h>
 #include <dirent.h>
+#include <sys/resource.h>

 void fail(const char *msg) {
   fprintf(stderr, "%s\n", msg);
--
1.6.3.2


_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror

Re: [PATCH] Fixed conkeror-spawn-helper.c for FreeBSD.

by Jeremy Maitin-Shepard-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

burin080@... writes:

> Hello list,
> I had to add this include directive to compile the conkeror-spawn-helper under
> FreeBSD 7.2. Conkeror is running wonderfully and
> edit-current-field-in-external-editor now works as it did under Linux.

Thanks for the fix.  I'm curious: what error do you get without this
patch?

--
Jeremy Maitin-Shepard
_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror

Parent Message unknown Re: [PATCH] Fixed conkeror-spawn-helper.c for FreeBSD.

by burin080 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: Re: [Conkeror] [PATCH] Fixed conkeror-spawn-helper.c for FreeBSD.

> Thanks for the fix.  I'm curious: what error do you get without this
> patch?

---
conkeror-spawn-helper.c: In function 'main':
conkeror-spawn-helper.c:234: error: storage size of 'file_lim' isn't known
conkeror-spawn-helper.c:236: error: 'RLIMIT_NOFILE' undeclared (first use in this function)
conkeror-spawn-helper.c:236: error: (Each undeclared identifier is reported only once
conkeror-spawn-helper.c:236: error: for each function it appears in.)
*** Error code 1
---

The header file <sys/resource.h> defines rlimit related structs, functions and constants. It's not being #included on FreeBSD.

Digging deeper, I have found the reason for this:

On Slackware:
$ grep -n '#include <sys/resource.h>' /usr/include/sys/wait.h
32:#include <sys/resource.h>

On FreeBSD:
$ grep -n '#include <sys/resource.h>' /usr/include/sys/wait.h
(nothing)

My patch #includes the header file manually instead of relying on <sys/wait.h> to do it.

Cheers,

Ricardo Buring


_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror

Re: [PATCH] Fixed conkeror-spawn-helper.c for FreeBSD.

by Axel Beckert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Thu, Jun 18, 2009 at 11:06:08AM +0200, burin080@... wrote:

> The header file <sys/resource.h> defines rlimit related structs, functions and constants. It's not being #included on FreeBSD.
>
> Digging deeper, I have found the reason for this:
>
> On Slackware:
> $ grep -n '#include <sys/resource.h>' /usr/include/sys/wait.h
> 32:#include <sys/resource.h>
>
> On FreeBSD:
> $ grep -n '#include <sys/resource.h>' /usr/include/sys/wait.h
> (nothing)

So it shouldn't hurt to included it on Linux, too.

Just tested it on Debian Lenny. As expected, it still compiles fine on
Linux. I'll commit that change soon if nobody else does or objects.

                Regards, Axel
--
Axel Beckert - abe@..., abe@... - http://noone.org/abe/
_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror

Re: [PATCH] Fixed conkeror-spawn-helper.c for FreeBSD.

by Jeremy Maitin-Shepard-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

burin080@... writes:

>> Thanks for the fix.  I'm curious: what error do you get without this
>> patch?

> ---
> conkeror-spawn-helper.c: In function 'main':
> conkeror-spawn-helper.c:234: error: storage size of 'file_lim' isn't known
> conkeror-spawn-helper.c:236: error: 'RLIMIT_NOFILE' undeclared (first use in
> this function)
> conkeror-spawn-helper.c:236: error: (Each undeclared identifier is reported only
> once
> conkeror-spawn-helper.c:236: error: for each function it appears in.)
> *** Error code 1
> ---

Thanks.  I had forgotten that it uses getrlimit to determine the
max. number of file descriptors (so that it can close all file
descriptors) in the case that the proc filesystem is unavailable.

--
Jeremy Maitin-Shepard
_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror

Re: [PATCH] Fixed conkeror-spawn-helper.c for FreeBSD.

by Axel Beckert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Wed, Jun 17, 2009 at 08:37:40PM +0200, burin080@... wrote:
> I had to add this include directive to compile the
> conkeror-spawn-helper under FreeBSD 7.2. Conkeror is running
> wonderfully and edit-current-field-in-external-editor now works as
> it did under Linux.

Thanks! Patch is committed:

http://repo.or.cz/w/conkeror.git?a=commit;h=2237db5e9cbf36065c5db1c17d2da9f2b3fa788c

                Regards, Axel
--
Axel Beckert - abe@..., abe@... - http://noone.org/abe/
_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror

Parent Message unknown Re: [PATCH] Fixed conkeror-spawn-helper.c for FreeBSD.

by burin080 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: [Conkeror] [PATCH] Fixed conkeror-spawn-helper.c for FreeBSD.

> how did you install xulrunner 1.9 on freebsd? there's the libxul port
> but i can't seem to find the xulrunner binary (shell script) after
> installing libxul and the xulrunner port is still at version 1.8.
>
> thanks for you time and help
> toni

I removed the www/xulrunner port and installed www/libxul. Files are
installed to /usr/local/lib/libxul/. You can get xulrunner-stub (or
whatever you need) from there.

I'll add instructions for this to the Wiki later.

Cheers,

Ricardo Buring


_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror