ifaceExamples.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * PROGRAM: Object oriented API samples.
  3. * MODULE: ifaceExamples.h
  4. * DESCRIPTION: A number of common defines for all samples.
  5. *
  6. * The contents of this file are subject to the Initial
  7. * Developer's Public License Version 1.0 (the "License");
  8. * you may not use this file except in compliance with the
  9. * License. You may obtain a copy of the License at
  10. * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
  11. *
  12. * Software distributed under the License is distributed AS IS,
  13. * WITHOUT WARRANTY OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing rights
  15. * and limitations under the License.
  16. *
  17. * The Original Code was created by Alexander Peshkoff
  18. * for the Firebird Open Source RDBMS project.
  19. *
  20. * Copyright (c) 2014 Alexander Peshkoff <[email protected]>
  21. * and all contributors signed below.
  22. *
  23. * All Rights Reserved.
  24. * Contributor(s): ______________________________________.
  25. */
  26. #include <stdlib.h>
  27. #include <stdio.h>
  28. #include <string.h>
  29. #if defined(__cplusplus) && (__cplusplus >= 201103L)
  30. #include <atomic>
  31. typedef std::atomic_int FbSampleAtomic;
  32. #else
  33. typedef int FbSampleAtomic;
  34. #endif
  35. #include <firebird/Interface.h>
  36. #if defined(_WIN32)
  37. #define FB_DLL_EXPORT __declspec(dllexport)
  38. #elif defined(__APPLE__)
  39. #define FB_DLL_EXPORT __attribute__((visibility("default")))
  40. #else
  41. #define FB_DLL_EXPORT
  42. #endif
  43. using namespace Firebird;
  44. #define SAMPLES_DIALECT SQL_DIALECT_V6