Files
harbour-core/harbour/tests/testdyn.c
Viktor Szakats 83bbb7b34d 2010-02-17 03:06 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/fstemp.c
    ! Using hb_fsTempDir() in HB_FTEMPCREATEEX() instead of
      old solution. This should fix it for some non-*nix
      platforms where *nix specific TEMPDIR envvar was used
      to determine temp directory.

  * contrib/hbwin/Makefile
  * include/Makefile
  * src/rtl/Makefile
  - contrib/hbwin/hbdyn.ch
  + include/hbdyn.ch
  - contrib/hbwin/hbdyn.c
  + src/rtl/hbdyn.c
  - contrib/hbwin/win_dllc.c
  + src/rtl/hbdynhb.c
  - contrib/hbwin/tests/testdll.c
  + tests/testdyn.c
  - contrib/hbwin/tests/testdll.prg
  + tests/testdyn.prg
  - contrib/hbwin/tests/testdll1.prg
  + tests/testdyn1.prg
  - contrib/hbwin/hbdyn.h
  * include/hbapi.h
    * Moved dynamic library call related functions to
      core (RTL).
    * Windows specific test code (currently all) guarded
      for platform.
    * Changed default calling convention to cdecl.
      Tests adaptd accordingly.
    * Terminology change: 'dll' -> 'dynamic library'
    ; HB_DYNCALL() is now part of core Harbour, and it's 
      platform independent. It's platform (ABI) dependent though,
      and currently x64 and x86/stdcall/syscall/cdecl 
      is supported and these were tested (except OS/2 syscall).

  * contrib/hbwin/hbwin.h
  * contrib/hbwin/win_misc.c
  * contrib/hbwin/legacycd.c
    * Low level hbwin_getprocaddress() function moved
      to legacy file and made static.

  * contrib/xpp/Makefile
  * contrib/xpp/dllx.c
  * contrib/xpp/xpp.hbc
    + Enabled DLL*() functions for all platforms.
    - Deleted dependence on hbwin library.

  * contrib/xpp/tests/testdll.prg
    * Windows specific parts (currently the whole test) guarded
      for platform.

  * contrib/hbct/Makefile
  - contrib/hbct/diskhb.prg
  * contrib/hbct/disk.c
  * contrib/xhb/Makefile
  + contrib/xhb/diskhb.prg
    * GETVOLINFO() moved from hbct to xhb.

  * ChangeLog
    * Marked some TODO/TOFIX items as DONE.
2010-02-17 02:09:17 +00:00

34 lines
1.7 KiB
C

/*
* $Id$
*/
/*
* Harbour Project source code:
* Dynamic library call test.
*
* Copyright 2010 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
*/
/* Build with:
hbmk2 -hbdyn testdyn.c -otest_x86
hbmk2 -hbdyn testdyn.c -otest_x64
*/
#include "hbapi.h"
HB_EXPORT double TESTD ( double value ) { printf( "DYN: %lf\n" , value ); return value; }
HB_EXPORT float TESTF ( float value ) { printf( "DYN: %f\n" , value ); return value; }
HB_EXPORT char TESTC ( char value ) { printf( "DYN: %d\n" , value ); return value; }
HB_EXPORT unsigned char TESTUC( unsigned char value ) { printf( "DYN: %d\n" , value ); return value; }
HB_EXPORT short TESTS ( short value ) { printf( "DYN: %hd\n" , value ); return value; }
HB_EXPORT unsigned short TESTUS( unsigned short value ) { printf( "DYN: %hu\n" , value ); return value; }
HB_EXPORT int TESTI ( int value ) { printf( "DYN: %d\n" , value ); return value; }
HB_EXPORT unsigned int TESTUI( unsigned int value ) { printf( "DYN: %u\n" , value ); return value; }
HB_EXPORT long TESTL ( long value ) { printf( "DYN: %ld\n" , value ); return value; }
HB_EXPORT unsigned long TESTUL( unsigned long value ) { printf( "DYN: %lu\n" , value ); return value; }
HB_EXPORT HB_LONGLONG TEST6 ( HB_LONGLONG value ) { printf( "DYN: %"PFLL"d\n" , value ); return value; }
HB_EXPORT HB_ULONGLONG TESTU6( HB_ULONGLONG value ) { printf( "DYN: %"PFLL"u\n" , value ); return value; }
HB_EXPORT char * TESTST( char * value ) { printf( "DYN: %s\n" , value ); return value; }