bdb_crs_compat.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * $Id$
  3. *
  4. * BDB Compatibility layer for SIP-router
  5. *
  6. * Copyright (C) 2010 Marius Zbihlei marius.zbihlei at 1and1 dot ro
  7. *
  8. * This file is part of SIP-router, a free SIP server.
  9. *
  10. * SIP-router is free software; you can redistribute it and/or modify it under the
  11. * terms of the GNU General Public License as published by the Free Software
  12. * Foundation; either version 2 of the License, or (at your option) any later
  13. * version.
  14. *
  15. * SIP-router is distributed in the hope that it will be useful, but WITHOUT ANY
  16. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  17. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  18. * details.
  19. *
  20. * You should have received a copy of the GNU General Public License along
  21. * with this program; if not, write to the Free Software Foundation, Inc.,
  22. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  23. */
  24. #ifndef BDB_CRS_COMPAT_H
  25. #define BDB_CRS_COMPAT_H
  26. #include <db.h>
  27. /* this is a compatibility layer for cursor close function
  28. * Historically, the function was called c_close() but it became deprecated
  29. * starting with version 4.6
  30. */
  31. #if DB_VERSION_MAJOR < 4
  32. # define CLOSE_CURSOR c_close
  33. #else
  34. #if (DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR < 6)
  35. # define CLOSE_CURSOR c_close
  36. #else
  37. # define CLOSE_CURSOR close
  38. #endif
  39. #endif
  40. #endif //BDB_CRS_COMPAT_H