Re: [EXIM] version 1.91 patch for Debian 1.3.1 Linux

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: Jeffrey Goldberg
CC: Steven A. Reisman, exim-users
題目: Re: [EXIM] version 1.91 patch for Debian 1.3.1 Linux
On Wed, 29 Apr 1998, Jeffrey Goldberg wrote:

> On Tue, 28 Apr 1998, Steven A. Reisman wrote:
>
> > I copied "exim-1.90/OS/os.h-Linux" over to "exim-1.91/OS/os.h-Linux-libc5"
> > and 1.91 compiled cleanly. Here's a patch to put the #define back in:
>
> I haven't actually tried to compile exim on RedHat, but I can confirm that
> on RedHat 5.0 /usr/include/linux/ip.h does NOT contain a defintion
> for ip_options. Nor did a grep for ip_options in /usr/include/linux
> turn up anything.
>
> My guess is that that will be the case across Linucies. But maybe the
> os.h-Linux-* should be more like
>
> #ifndef ip_options
>    #define ...
> ....

>
> just in case.


That would not work for two reasons:

(1) os.h is #included before any other headers.

(2) In Linuxes where it exists, ip_options is not a macro, it is a structure.

The particular bit of code where this hits is an area where Linux
insists on being different to every other version of Unix, for some
reason. The comment in the code reads thus:

    Sadly, Linux is different to everyone else, so there has to be some
    conditional compilation here. Versions of Linux before 2.1.15 used a
    structure whose name was "options". Somebody finally realized that
    this name was silly, and it got changed to "ip_options". I use the
    newer name here, but there is a fudge in the script that sets up os.h
    to define a macro in older Linux systems.     


    Sigh. Linux is a fast-moving target. Another generation of Linux uses
    glibc 2, which has chosen ip_opts for the structure name.


All other Unixes use the structure name "ipoption".

-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



--
*** Exim information can be found at http://www.exim.org/ ***