#if (defined(__IBMC__) || defined(__IBMCPP__))
#pragma info( none )
#ifndef __CHKHDR__
   #pragma info( none )
#endif
#pragma info( restore )
#endif

#ifndef __wchar_h
   #define __wchar_h

   #ifdef __cplusplus
      extern "C" {
   #endif

   #ifndef  _LNK_CONV
     #ifdef _M_I386
         #define  _LNK_CONV   _Optlink
     #else
       #define  _LNK_CONV
     #endif
   #endif

   #ifndef _IMPORT
      #ifdef __IMPORTLIB__
         #define _IMPORT _Import
      #else
         #define _IMPORT
      #endif
   #endif

   /********************************************************************/
   /*  <wchar.h> header file                                           */
   /*                                                                  */
   /*  IBM VisualAge C++ for OS/2, Version 3.00                        */
   /*  (C) Copyright IBM Corp. 1991, 1995.                             */
   /*  - Licensed Material - Program-Property of IBM                   */
   /*  - All rights reserved                                           */
   /*                                                                  */
   /********************************************************************/

   #include <stdio.h>
   #include <stdarg.h>

   #ifndef NULL
      #ifdef __cplusplus
            #define NULL 0
      #else
            #define NULL ((void *)0)
      #endif
   #endif

   #ifndef __mbstate_t
      #define __mbstate_t
      typedef short      mbstate_t;
   #endif

   #ifndef __size_t
      typedef unsigned int size_t;
      #define __size_t 1
   #endif

   #ifndef __wchar_t
      typedef unsigned short wchar_t;
      #define __wchar_t 1
   #endif

   #ifndef __wint_t
      #define __wint_t
      typedef int        wint_t;
   #endif

   #ifndef __wctype_t
      #define __wctype_t
      typedef unsigned int        wctype_t;
   #endif

   #ifndef WEOF
      #define WEOF -1
   #endif

   struct tm;

  /* Wide character I/O functions */

extern  wint_t    _IMPORT _LNK_CONV fgetwc(FILE *);
extern  wchar_t * _IMPORT _LNK_CONV fgetws(wchar_t *, int, FILE *);
extern  wint_t    _IMPORT _LNK_CONV fputwc(wint_t, FILE *);
extern  int       _IMPORT _LNK_CONV fputws(const wchar_t *, FILE *);
extern  wint_t    _IMPORT _LNK_CONV getwc(FILE *);
extern  wint_t    _IMPORT _LNK_CONV getwchar(void);
extern  wint_t    _IMPORT _LNK_CONV putwc(wint_t, FILE *);
extern  wint_t    _IMPORT _LNK_CONV putwchar(wint_t);
extern  wint_t    _IMPORT _LNK_CONV ungetwc(wint_t, FILE *);
extern  int       _IMPORT _LNK_CONV fwprintf(FILE *, const wchar_t *, ...);
extern  int       _IMPORT _LNK_CONV swprintf(wchar_t *, size_t, const wchar_t *, ...);
extern  int       _IMPORT _LNK_CONV wprintf(const wchar_t *, ...);
extern  int       _IMPORT _LNK_CONV fwscanf(FILE *, const wchar_t *, ...);
extern  int       _IMPORT _LNK_CONV swscanf(const wchar_t *, const wchar_t *, ...);
extern  int       _IMPORT _LNK_CONV wscanf(const wchar_t *, ...);
extern  int       _IMPORT _LNK_CONV vfwprintf(FILE *, const wchar_t *, va_list);
extern  int       _IMPORT _LNK_CONV vswprintf(wchar_t *, size_t, const wchar_t *, va_list);
extern  int       _IMPORT _LNK_CONV vwprintf(const wchar_t *, va_list);

extern  double            _IMPORT _LNK_CONV wcstod(const wchar_t *, wchar_t **);
extern  long int          _IMPORT _LNK_CONV wcstol(const wchar_t *, wchar_t **, int);
extern  unsigned long int _IMPORT _LNK_CONV wcstoul(const wchar_t *, wchar_t **, int);

  /* Wide Character String handling */

extern  wchar_t * _IMPORT _LNK_CONV wcscpy (wchar_t *, const wchar_t *);
extern  wchar_t * _IMPORT _LNK_CONV wcsncpy (wchar_t *, const wchar_t *, size_t);
extern  wchar_t * _IMPORT _LNK_CONV wcscat (wchar_t *, const wchar_t *);
extern  wchar_t * _IMPORT _LNK_CONV wcsncat (wchar_t *, const wchar_t *, size_t);
extern  int       _IMPORT _LNK_CONV wcscoll(const wchar_t *, const wchar_t *);
extern  int       _IMPORT _LNK_CONV wcscmp (const wchar_t *, const wchar_t *);
extern  int       _IMPORT _LNK_CONV wcsncmp (const wchar_t *, const wchar_t *, size_t);
extern  size_t    _IMPORT _LNK_CONV wcsxfrm(wchar_t *, const wchar_t *, size_t);
extern  wchar_t * _IMPORT _LNK_CONV wcschr (const wchar_t *, wchar_t);
extern  size_t    _IMPORT _LNK_CONV wcscspn (const wchar_t *, const wchar_t *);
extern  wchar_t * _IMPORT _LNK_CONV wcspbrk (const wchar_t *, const wchar_t *);
extern  wchar_t * _IMPORT _LNK_CONV wcsrchr (const wchar_t *, wchar_t);
extern  size_t    _IMPORT _LNK_CONV wcsspn (const wchar_t *, const wchar_t *);
extern  wchar_t * _IMPORT _LNK_CONV wcsstr (const wchar_t *, const wchar_t *);
#ifndef NO_PROTOTYPE
extern  wchar_t * _IMPORT _LNK_CONV _wcstok_iso (wchar_t *, const wchar_t *, wchar_t **);
extern  wchar_t * _IMPORT _LNK_CONV _wcstok_xpg (wchar_t *, const wchar_t  *);
  #ifdef _ISO_C_MSE
    #define wcstok _wcstok_iso
  #else
    #define wcstok _wcstok_xpg
  #endif
#endif

extern  size_t    _IMPORT _LNK_CONV wcslen (const wchar_t *);
extern  int       _IMPORT _LNK_CONV wcswidth(const wchar_t *, size_t);
extern  int       _IMPORT _LNK_CONV wcwidth(const wchar_t);

extern  size_t    _IMPORT _LNK_CONV wcsftime(wchar_t *, size_t, const char *, const struct tm *);

extern  int       _IMPORT _LNK_CONV (iswalnum) (wint_t);
extern  int       _IMPORT _LNK_CONV (iswalpha) (wint_t);
extern  int       _IMPORT _LNK_CONV (iswcntrl) (wint_t);
extern  int       _IMPORT _LNK_CONV (iswdigit) (wint_t);
extern  int       _IMPORT _LNK_CONV (iswgraph) (wint_t);
extern  int       _IMPORT _LNK_CONV (iswlower) (wint_t);
extern  int       _IMPORT _LNK_CONV (iswprint) (wint_t);
extern  int       _IMPORT _LNK_CONV (iswpunct) (wint_t);
extern  int       _IMPORT _LNK_CONV (iswspace) (wint_t);
extern  int       _IMPORT _LNK_CONV (iswupper) (wint_t);
extern  int       _IMPORT _LNK_CONV (iswxdigit) (wint_t);
extern  wint_t    _IMPORT _LNK_CONV (towlower) (wint_t);
extern  wint_t    _IMPORT _LNK_CONV (towupper) (wint_t);
extern  wctype_t  _IMPORT _LNK_CONV (wctype) (const char *);
extern  int       _IMPORT _LNK_CONV (iswctype) (wint_t, wctype_t);

extern  int       _IMPORT _LNK_CONV sisinit(const mbstate_t *);
extern  size_t    _IMPORT _LNK_CONV mbrlen (const char *, size_t, mbstate_t *);
extern  size_t    _IMPORT _LNK_CONV mbrtowc (wchar_t *, const char *, size_t, mbstate_t *);
extern  size_t    _IMPORT _LNK_CONV wcrtomb (char *, wchar_t, mbstate_t *);
extern  size_t    _IMPORT _LNK_CONV mbsrtowcs (wchar_t *, const char **, size_t, mbstate_t *);
extern  size_t    _IMPORT _LNK_CONV wcsrtombs (char *, const wchar_t **, size_t, mbstate_t *);
extern  int       _IMPORT _LNK_CONV wctob (wint_t);

#define mbsinit sisinit

   #if (defined(__EXTENDED__)  || defined( __cplusplus ))
    #if (defined(__IBMC__) || defined(__IBMCPP__))
      #pragma map( vfwprintf,"_vfwprintfieee" )
      #pragma map( vswprintf,"_vswprintfieee" )
      #pragma map( vwprintf,"_vwprintfieee" )

      #if defined(_M_I386) || !defined(NO_PROTOTYPE)
        #pragma map( fwprintf, "_fwprintfieee" )
        #pragma map( fwscanf,  "_fwscanfieee" )
        #pragma map( swprintf, "_swprintfieee" )
        #pragma map( swscanf,  "_swscanfieee" )
        #pragma map( wprintf, "_wprintfieee" )
        #pragma map( wscanf,  "_wscanfieee" )
      #endif
    #else
        #pragma Alias( vfwprintf,"_vfwprintfieee" )
        #pragma Alias( vswprintf,"_vswprintfieee" )
        #pragma Alias( vwprintf,"_vwprintfieee" )
      #ifndef NO_PROTOTYPE
        #pragma Alias( fwprintf, "_fwprintfieee" )
        #pragma Alias( fwscanf,  "_fwscanfieee" )
        #pragma Alias( swprintf, "_swprintfieee" )
        #pragma Alias( swscanf,  "_swscanfieee" )
        #pragma Alias( wprintf, "_wprintfieee" )
        #pragma Alias( wscanf,  "_wscanfieee" )
      #endif
    #endif
   #else
    #if (defined(__IBMC__) || defined(__IBMCPP__))
      #if defined(_M_I386) || !defined(NO_PROTOTYPE)
        #pragma map( fwprintf, "_fwprintf_ansi"  )
        #pragma map( fwscanf,  "_fwscanf_ansi"  )
        #pragma map( swprintf, "_swprintf_ansi"  )
        #pragma map( swscanf,  "_swscanf_ansi"  )
        #pragma map( wprintf, "_wprintf_ansi"  )
        #pragma map( wscanf,  "_wscanf_ansi"  )
      #endif
    #else
      #ifndef NO_PROTOTYPE
        #pragma Alias( fwprintf, "_fwprintf_ansi"  )
        #pragma Alias( fwscanf,  "_fwscanf_ansi"  )
        #pragma Alias( swprintf, "_swprintf_ansi"  )
        #pragma Alias( swscanf,  "_swscanf_ansi"  )
        #pragma Alias( wprintf, "_wprintf_ansi"  )
        #pragma Alias( wscanf,  "_wscanf_ansi"  )
      #endif
    #endif
   #endif


   #ifdef __cplusplus
      }
   #endif

#endif

#if (defined(__IBMC__) || defined(__IBMCPP__))
#pragma info( none )
#ifndef __CHKHDR__
   #pragma info( restore )
#endif
#pragma info( restore )
#endif
