View previous topic :: View next topic |
Author |
Message |
mwarning
Joined: 16 Sep 2013 Posts: 1
|
Posted: Mon Sep 16, 2013 6:34 pm Post subject: how to distinguish between different upnpc versions |
|
|
Hi,
I wrote some code that uses e.g. upnpDiscover(), but the function signature changed between 1.5 and 1.6
Is there a nice way to distinguish between those versions?
#ifdef UPNPDISCOVER_SUCCESS
#define HAVE_MINIUPNP_16 1
#else
#define HAVE_MINIUPNP_15 1
#endif
This code above is somewhat cheap and brittle. |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Wed Sep 25, 2013 7:55 am Post subject: |
|
|
you can use something like
Code: |
#if defined(MINIUPNPC_API_VERSION) && (MINIUPNPC_API_VERSION >= 8)
...
#else
...
#endif
|
_________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
|