Re: Building frozen pre-1.0.4

From: Paul Floyd (paulf@free.fr)
Date: Sun Dec 17 2000 - 09:48:09 PST

  • Next message: Henning Meier-Geinitz: "Re: Pb with listing devices when no root"

    > I'm not surprised. We haven't gotten any patches for OS/2 for a long
    > time.

    Perhaps you will again one day.
     
    > > Here's my list of things that are broken.
    > >
    > > PATH_MAX gets used when it isn't defined. Perhaps it should be in
    > > config.h.in?
    >
    > Most backends use this:
    >
    > #ifndef PATH_MAX
    > # define PATH_MAX 1024
    > #endif

    > Where does it break? Does it help to add these lines to the files?

    I can'remember in wgich backend it fails, but it does so in several of
    them. I don't think it's a good idea to have the same constant #defined
    in many files (it's currently defined in 8 c files in backend).
     
    > > sharp.c and nec.c use shm.c, which is only available on System V (and
    > > clone) platforms.
    >
    > We can detect the availibility of shm.h in configure and check in
    > nec.c/sharp.c. If both backends depend on shm (no alternative), they
    > can be excluded from compilation. Is OS/2 using the normal configure
    > script?

    I'm using autoconf and then running configure (though I edit it to
    compile with debug info).

    > > nec.c still includes constants defined in sharp.h
    > > (though they are #defined out by default).
    >
    > Could you go into more detail here?

    For instance, nec.h contains

    typedef enum
      {
        /* PCIN500, PCINXXX are used as array indices, so the corresponding
           numbers should start at 0
        */
        unknown = -1,
        PCIN500,
        PCINXXX
      }
    NEC_Model;

    and sharp.h contains

    typedef enum
      {
        /* JX250, JX330, JX350, JX610 are used as array indices, so the
           corresponding numbers should start at 0
        */
        unknown = -1,
        JX250,
        JX320,
        JX330,
        JX350,
        JX610
      }
    SHARP_Model;

    However, nec.c contains the string "JX" 17 times, mostly in comments,
    but otherwise:

    #ifdef ALLOW_AUTO_SELECT_ADF
      /* The JX330, but nut not the JX250 supports auto selection of
    ADF/FSU: */
      if (s->dev->info.adf_fsu_installed && (s->dev->sensedat.model ==
    JX330))
        s->dev->info->scansources[i++] = use_auto;
    #endif

    and

    #ifdef NOTUSE_PCIN500
      if (s->dev->sensedat.model != JX610)
        {
    ...

    > > Tell me, is SANE supposed to
    > > be cross platform or is it supposed to be Linux proprietary-style code?
    >
    > SANE is supposed to run on any Unix platform. It's tested on Linux,
    > FreeBSD, Solaris, AIX and Irix. We will be happy to make it run on all
    > platforms but someone must test them and send patches. I can only test
    > the mentioned platforms.

    Do all those platforms support System V APIs?

    [snip]
     
    > > By default, the warning options have changed, and this wouldn't compile
    > > sanei_scsi.c (the structure param around line 2900).

    > Are you talking about the warning parameters given to gcc? These have
    > been set to --disable-warnings by default for the realease. This
    > shouldn't break anything. If disabling warnings break compilation
    > something else must be broken. Please send the output of make / of the
    > compiler.

    ???

    configure --sysconfdir=. --program-suffix=.exe --disable-dynamic
    --without-x

    gives

    CFLAGS = -g -O0 -m486 -Zmt -W -Wall -Wstrict-prototypes -Wreturn-type
    -Wcast-align -Wpointer-arith -Wcast-qual -ansi -pedantic
    -DSCSIBUFFERSIZE=131072
    (in libs/Makefile)

    but

    configure --sysconfdir=. --program-suffix=.exe --disable-dynamic
    --without-x --disable-warnings

    gives

    CFLAGS = -g -O0 -m486 -Zmt -W -Wall -DSCSIBUFFERSIZE=131072

    i.e., if I don't explicitly use --disable-warnings, then the WARN_CFLAGS
    variable gets used (line 1547 of my configure), rather than
    NORMAL_CFLAGS.

     
    > What do you mean by "structure parameter"?

    param is the name of the structure.

    Things seem to be going better than I feared. I managed to run a scan
    (full colour) with the exe that I compiled.

    FWIW I haven't had too much problems compiling older version on Linux
    and FreeBSD (though for the latter, I've not managed to get the driver
    to recognise the SCSI host card, ditto for Solaris 7).

    A bientot
    Paul

    -- 
    Paul Floyd http://paulf.free.fr
    EMail = URL (after //), replacing first dot with @
    What's the point? The sharp bit on the end.
    

    -- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com



    This archive was generated by hypermail 2b29 : Sun Dec 17 2000 - 10:37:14 PST