[#4858] Build fails on OSX Tiger 10.4 — noreply@...

Bugs item #1883, was opened at 2005-05-06 14:55

21 messages 2005/05/06
[#4862] Re: [ ruby-Bugs-1883 ] Build fails on OSX Tiger 10.4 — Yukihiro Matsumoto <matz@...> 2005/05/07

Hi,

[#4865] Re: [ ruby-Bugs-1883 ] Build fails on OSX Tiger 10.4 — Ryan Davis <ryand-ruby@...> 2005/05/07

[#4868] Re: [ ruby-Bugs-1883 ] Build fails on OSX Tiger 10.4 — nobu.nokada@... 2005/05/07

Hi,

[#5053] Re: [ ruby-Bugs-1883 ] Build fails on OSX Tiger 10.4 — Shugo Maeda <shugo@...> 2005/05/19

Hi,

[#5056] Re: [ ruby-Bugs-1883 ] Build fails on OSX Tiger 10.4 — Mark Hubbart <discordantus@...> 2005/05/19

On 5/19/05, Shugo Maeda <shugo@ruby-lang.org> wrote:

[#4874] - Need to reduce Ruby Sources to the Minimal — Ilias Lazaridis <ilias@...>

Hello all,

31 messages 2005/05/10
[#4879] Re: [THIN] - Need to reduce Ruby Sources to the Minimal — Pit Capitain <pit@...> 2005/05/11

Ilias Lazaridis schrieb:

[#4883] Re: [THIN] - Need to reduce Ruby Sources to the Minimal — Ilias Lazaridis <ilias@...> 2005/05/12

Pit Capitain wrote:

[#4884] Re: [THIN] - Need to reduce Ruby Sources to the Minimal — Ryan Davis <ryand-ruby@...> 2005/05/12

[#4888] Re: [THIN] - Need to reduce Ruby Sources to the Minimal — Ilias Lazaridis <ilias@...> 2005/05/12

Ryan Davis wrote:

[#4889] Re: [THIN] - Need to reduce Ruby Sources to the Minimal — ES <ruby-ml@...> 2005/05/12

[#4890] Re: [THIN] - Need to reduce Ruby Sources to the Minimal — Ilias Lazaridis <ilias@...> 2005/05/12

ES wrote:

[#4891] Re: [THIN] - Need to reduce Ruby Sources to the Minimal — Alexander Kellett <ruby-lists@...> 2005/05/12

On May 12, 2005, at 3:13 PM, Ilias Lazaridis wrote:

[#4911] Pointless argc check in Array#select — noreply@...

Patches item #1900, was opened at 2005-05-12 09:33

11 messages 2005/05/12

[#4919] - Hierarchical/Modular Directory Structure — Ilias Lazaridis <ilias@...>

The source-code structure should be simplified, lowering barriers for

20 messages 2005/05/12

[ ruby-Bugs-1903 ] prefer '#include <errno.h>' over 'extern int errno'

From: noreply@...
Date: 2005-05-12 22:57:34 UTC
List: ruby-core #4936
Bugs item #1903, was opened at 2005-05-12 15:50
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=1903&group_id=426

Category: Core
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Chris Pressey (cpressey)
Assigned to: Nobody (None)
Summary: prefer '#include <errno.h>' over 'extern int errno'

Initial Comment:
Several source files in the Ruby distribution declare

  extern int errno;

in several places.  This is bad style, since errno might not be declared that way.  (In fact, it is not declared that way on DragonFlyBSD, which is how I discovered this; it fails to build because of a declaration clash.)

The same source files do #include <errno.h> (which is the preferred way of declaring errno,) so the only fix needed is to remove the 'extern int errno' declarations.  The patch given below removes these declarations.

There may be (broken) platforms out there which still require an errno declaration, but I don't know what those platforms are; if this is desired, the proper fix would be to detect it in the autoconf script and do something like:

#ifdef NEEDS_ERRNO_DECL
extern int errno;
#else
#include <errno.h>
#endif

--- error.c.orig	2005-05-12 11:53:38.000000000 -0700
+++ error.c	2005-05-12 11:53:51.000000000 -0700
@@ -1108,7 +1108,6 @@
 rb_sys_fail(mesg)
     const char *mesg;
 {
-    extern int errno;
     int n = errno;
     VALUE arg;
 
--- process.c.orig	2005-05-12 12:07:57.000000000 -0700
+++ process.c	2005-05-12 12:08:47.000000000 -0700
@@ -2050,7 +2050,6 @@
 p_uid_change_privilege(obj, id)
     VALUE obj, id;
 {
-    extern int errno;
     int uid;
 
     check_uid_switch();
@@ -2602,7 +2601,6 @@
 p_gid_change_privilege(obj, id)
     VALUE obj, id;
 {
-    extern int errno;
     int gid;
 
     check_gid_switch();
@@ -3129,7 +3127,6 @@
 p_uid_switch(obj)
     VALUE obj;
 {
-    extern int errno;
     int uid, euid;
 
     check_uid_switch();
@@ -3171,7 +3168,6 @@
 p_uid_switch(obj)
     VALUE obj;
 {
-    extern int errno;
     int uid, euid;
 
     check_uid_switch();
@@ -3242,7 +3238,6 @@
 p_gid_switch(obj)
     VALUE obj;
 {
-    extern int errno;
     int gid, egid;
 
     check_gid_switch();
@@ -3283,7 +3278,6 @@
 p_gid_switch(obj)
     VALUE obj;
 {
-    extern int errno;
     int gid, egid;
 
     check_gid_switch();
--- ext/sdbm/_sdbm.c.orig	2005-05-12 15:21:49.000000000 -0700
+++ ext/sdbm/_sdbm.c	2005-05-12 15:22:10.000000000 -0700
@@ -101,13 +101,6 @@
 #endif
 
 /*
- * externals
- */
-#if !defined sun && !defined MSDOS && !defined _WIN32 && !defined __CYGWIN__
-extern int errno;
-#endif
-
-/*
  * forward
  */
 static int getdbit proto((DBM *, long));
--- ext/pty/pty.c.orig	2005-05-12 12:54:55.000000000 -0700
+++ ext/pty/pty.c	2005-05-12 12:55:03.000000000 -0700
@@ -103,8 +103,6 @@
 
 static char SlaveName[DEVICELEN];
 
-extern int errno;
-
 #ifndef HAVE_SETEUID
 # ifdef HAVE_SETREUID
 #  define seteuid(e)	setreuid(-1, (e))



----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=1903&group_id=426

In This Thread

Prev Next