OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Programming => Topic started by: Jochen Schäfer on January 11, 2016, 10:17:36 am

Title: Multimedia with GCC
Post by: Jochen Schäfer on January 11, 2016, 10:17:36 am
Hi.

I'm building SDL with GCC.
My problem is the typedef PACB (pointer to struct ACB).
I can find no definition in the OS/2 toolkit 4.5, although some multimedia API needs it.
The only definition, I could find, was in a Watcom C header.
My question: Am I overlooking something? Is there some packages (rpm or something else) I need to install?
Or have I to set up a C header file for the definition.
Title: Re: Multimedia with GCC
Post by: Dave Yeo on January 11, 2016, 04:55:55 pm
Should be in the toolkit, here in \os2tk45\h\ssm.h for the 32 bit version.
There's a GCC port at http://bauxite.sakura.ne.jp/software/os2/ (http://bauxite.sakura.ne.jp/software/os2/) close to the bottom of the page.
Title: Re: Multimedia with GCC
Post by: Jochen Schäfer on January 11, 2016, 05:06:30 pm
Either I'm blind or jEdit doesn't find it, but I couldn't find the definition of (P)ACB. I will look at it again.

The SDL port is outdated and probably has not the libKai audio driver, I wrote ;-)
Title: Re: Multimedia with GCC
Post by: Jochen Schäfer on January 11, 2016, 08:22:46 pm
Ok, I looked again. There is no defintion of P(ACB) in the Toolkit 4.5, I have. It's the one that's included in eCS 2.0.
Has anyone an idea, what's the problem?
Title: Re: Multimedia with GCC
Post by: Andi B. on January 11, 2016, 08:54:58 pm
I've in my "P:\os2tk45\h\acb.h"
Code: [Select]
/**********************************************
 *
 * ACB - Associate Control Block
 *
 *       Each stream handler must define the
 *       ACB for each data object type that
 *       expect ACB's from the application.
 *
 **********************************************/
typedef struct _ACB { /* acb  -  Assoc. Control Block  */
   ULONG   ulACBLen;              /* length of structure                   */
   ULONG   ulObjType;
   ULONG   ulParm1;
   ULONG   ulParm2;
   } ACB;
typedef ACB  FAR  *PACB;          /* Ptr to an ACB        */

The same in older toolkits f.i. in "P:\IBMCPP3.65\TOOLKIT\H\ACB.H", "P:\IBMCPP40\ToolKit\H\ACB.H" or in the device driver kit in "P:\os2ddk\DDK\base\h\acb.h" or with OpenWatcom in "P:\Watcom\h\os2\acb.h"


Title: Re: Multimedia with GCC
Post by: Jochen Schäfer on January 12, 2016, 07:37:27 am
In OpenWatcom, I have the definition, I lifted my "patch" from there, but my OS2TK45\H\ACB.H seems to be some totally different beast. It begins with:
Code: [Select]
/************************* Module Header *******************************\
*                                                                      *
* Module Name: PDPUBLIC.H     (new file for 180062)                    *
*                                                                      *
* Process Dump public interface for DosDumpProcess API                 *
*                                                                      *
* Copyright (c) International Business Machines Corporation 1997       *
************************************************************************
*  Change                                                              *
                            *
*  Activity     Date            BY      Reason                         *
*  --------      ----                   ----------                     *
* 180062        09/01/97        LRN     New for DosDumpProcess and     *
*                                       DosQueryRasInfo enhancements   *
\***********************************************************************/
Title: Re: Multimedia with GCC
Post by: Andi B. on January 12, 2016, 08:09:50 am
I vaguely remember I had one or two corrupted/wrong files in my tookit years ago. Maybe there is still some info in on of the newsgroups. F.i. os2.programmer.miscellaneous?

IIRC the toolkit coming with eCS is the correct/complete one. But memory fades....
Title: Re: Multimedia with GCC
Post by: Dave Yeo on January 12, 2016, 09:01:31 am
It was a bug, #3508 on the eCS bugtracker. My notes say I worked around it by running TOOLKIT\install.exe after moving the olld one out of the way. Can't remember much except I noted that on eCS 2.1 cd#2 the header was correct besides being uppercase
Title: Re: Multimedia with GCC
Post by: Jochen Schäfer on January 13, 2016, 10:16:13 am
I reinstalled the Toolkit, but nothing changed. Can anybody having the correct file send me a copy?
Title: Re: Multimedia with GCC
Post by: Wim Brul on January 13, 2016, 01:30:20 pm
Quote
I reinstalled the Toolkit, but nothing changed. Can anybody having the correct file send me a copy?

The cause of the problem lies in \TOOLKIT\TOOLKT45.RSP where PDPUBLIC.H overrides ACB.H

You may copy these files yourself from your 2nd eComStation CD which contains the toolkit.

\TOOLKIT\OS2TK45\H\ACB.H
\TOOLKIT\OS2TK45\H\PDPUBLIC.H

Wim.
Title: Re: Multimedia with GCC
Post by: Jochen Schäfer on January 13, 2016, 03:43:17 pm
Thanks. I will try it.
Title: Re: Multimedia with GCC
Post by: Jochen Schäfer on January 14, 2016, 03:17:24 pm
Copying the files from the install CD has done it. Case closed.  ;)