Re: [hatari-devel] Patch for CAPS5 better support

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hello.

I downloaded CAPS5 from
http://www.kryoflux.com/download/spsdeclib_5.1_source.zip and there no
Caps[U]long types in headers.

When I try to compile with it I got these errors (with my patch it
compiles and runs fine):

[ 69%] Building C object src/CMakeFiles/hatari.dir/hd6301_cpu.c.o
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:64:2: error:
unknown type name 'CapsLong'
 CapsLong  CapsImage[ MAX_FLOPPYDRIVES ]; /* Image Id or -1 if drive empty */
 ^~~~~~~~
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:65:2: error:
unknown type name 'CapsLong'
 CapsLong  CapsImageType[ MAX_FLOPPYDRIVES ]; /* ImageType or -1 if not known */
 ^~~~~~~~
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:86:53: error:
unknown type name 'CapsULong'
static void IPF_CallBack_Trk ( struct CapsFdc *pc , CapsULong State );
                                                    ^~~~~~~~~
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:87:53: error:
unknown type name 'CapsULong'
static void IPF_CallBack_Irq ( struct CapsFdc *pc , CapsULong State );
                                                    ^~~~~~~~~
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:88:53: error:
unknown type name 'CapsULong'
static void IPF_CallBack_Drq ( struct CapsFdc *pc , CapsULong State );
                                                    ^~~~~~~~~
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c: In function
'IPF_MemorySnapShot_Capture':
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:170:26: error:
'IPF_CallBack_Irq' undeclared (first u
se in this function)
   IPF_State.Fdc.cbirq = IPF_CallBack_Irq;
                         ^~~~~~~~~~~~~~~~
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:170:26: note:
each undeclared identifier is reported
only once for each function it appears in
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:171:26: error:
'IPF_CallBack_Drq' undeclared (first u
se in this function); did you mean 'IPF_CallBack_Irq'?
   IPF_State.Fdc.cbdrq = IPF_CallBack_Drq;
                         ^~~~~~~~~~~~~~~~
                         IPF_CallBack_Irq
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:172:26: error:
'IPF_CallBack_Trk' undeclared (first u
se in this function); did you mean 'IPF_CallBack_Drq'?
   IPF_State.Fdc.cbtrk = IPF_CallBack_Trk;
                         ^~~~~~~~~~~~~~~~
                         IPF_CallBack_Drq
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c: In function 'IPF_Init':
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:386:24: error:
'IPF_CallBack_Irq' undeclared (first u
se in this function)
 IPF_State.Fdc.cbirq = IPF_CallBack_Irq;
                       ^~~~~~~~~~~~~~~~
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:387:24: error:
'IPF_CallBack_Drq' undeclared (first u
se in this function); did you mean 'IPF_CallBack_Irq'?
 IPF_State.Fdc.cbdrq = IPF_CallBack_Drq;
                       ^~~~~~~~~~~~~~~~
                       IPF_CallBack_Irq
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:388:24: error:
'IPF_CallBack_Trk' undeclared (first u
se in this function); did you mean 'IPF_CallBack_Drq'?
 IPF_State.Fdc.cbtrk = IPF_CallBack_Trk;
                       ^~~~~~~~~~~~~~~~
                       IPF_CallBack_Drq
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c: In function
'IPF_Insert':
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:422:2: error:
unknown type name 'CapsLong'
 CapsLong ImageId;
 ^~~~~~~~
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:423:2: error:
unknown type name 'CapsLong'
 CapsLong ImageType;
 ^~~~~~~~
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:483:55: error:
'CapsULong' undeclared (first use in t
his function)
 if ( CAPSLockImageMemory ( ImageId , pImageBuffer ,
(CapsULong)ImageSize , DI_LOCK_MEMREF ) == imgeOk )
                                                      ^~~~~~~~~
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:483:65: error:
expected ')' before 'ImageSize'
 if ( CAPSLockImageMemory ( ImageId , pImageBuffer ,
(CapsULong)ImageSize , DI_LOCK_MEMREF ) == imgeOk )
                                                                ^~~~~~~~~
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:483:7: error:
too few arguments to function 'CAPSLock
ImageMemory'
 if ( CAPSLockImageMemory ( ImageId , pImageBuffer ,
(CapsULong)ImageSize , DI_LOCK_MEMREF ) == imgeOk )
      ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/caps5/CapsLibAll.h:9:0,
                from /home/winterheart/playground/hg/hatari/src/floppy_ipf.c:33:
/usr/include/caps5/CapsLib.h:21:15: note: declared here
ExtSub SDWORD CAPSLockImageMemory(SDWORD id, PUBYTE buffer, UDWORD
length, UDWORD flag);
              ^~~~~~~~~~~~~~~~~~~
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c: At top level:
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:716:53: error:
unknown type name 'CapsULong'
static void IPF_CallBack_Trk ( struct CapsFdc *pc , CapsULong State )
                                                    ^~~~~~~~~
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:745:53: error:
unknown type name 'CapsULong'
static void IPF_CallBack_Irq ( struct CapsFdc *pc , CapsULong State )
                                                    ^~~~~~~~~
/home/winterheart/playground/hg/hatari/src/floppy_ipf.c:764:53: error:
unknown type name 'CapsULong'
static void IPF_CallBack_Drq ( struct CapsFdc *pc , CapsULong State )
                                                    ^~~~~~~~~
make[2]: *** [src/CMakeFiles/hatari.dir/build.make:519:
src/CMakeFiles/hatari.dir/floppy_ipf.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:167: src/CMakeFiles/hatari.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

вс, 12 авг. 2018 г. в 23:39, Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:
>
> Le 12/08/2018 à 00:25, Azamat Hackimov a écrit :
> > Hello.
> >
> > I'm working on porting Hatari 2.1.0 to one of Linux distributives. Here
> > patch with changes, that fixes some build failures with CAPS5 library
> > (or spsdeclib in my distribution).
>
> Hi
>
> I'm rot really sure about your patch bein required ; caps lib 5.1 was
> released in june 2014 (I worked on this with the SPS guys) and this
> version uses Caps[U]long, they were not dropped.
>
> Maybe it's in your linux distrib that they modified the headers ? But
> that's not how it was released upstream, and Hatari compile fines with
> caps lib 5.1.
>
> Nicolas



-- 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/