summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-01-17 02:13:19 +0000
committerDavid Robillard <d@drobilla.net>2012-01-17 02:13:19 +0000
commit33b20e5c20b0bbac5db9d8022ee5499b8cb95b5c (patch)
tree8017b89fe372677d21d73782ab0b2a6a4cdb99b6 /utils
parent012e8a8785abcbf403d842d67303d7470b33694c (diff)
downloadlilv-33b20e5c20b0bbac5db9d8022ee5499b8cb95b5c.tar.gz
lilv-33b20e5c20b0bbac5db9d8022ee5499b8cb95b5c.tar.bz2
lilv-33b20e5c20b0bbac5db9d8022ee5499b8cb95b5c.zip
Support compilation as C++ under MSVC++,
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3955 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'utils')
-rw-r--r--utils/lv2info.c11
-rw-r--r--utils/lv2ls.c1
2 files changed, 8 insertions, 4 deletions
diff --git a/utils/lv2info.c b/utils/lv2info.c
index 162a12b..d3a2ade 100644
--- a/utils/lv2info.c
+++ b/utils/lv2info.c
@@ -14,6 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@@ -23,6 +24,10 @@
#include "lilv-config.h"
+#ifdef _MSC_VER
+# define isnan _isnan
+#endif
+
LilvNode* applies_to_pred = NULL;
LilvNode* control_class = NULL;
LilvNode* event_class = NULL;
@@ -307,9 +312,9 @@ print_plugin(LilvWorld* world,
/* Ports */
const uint32_t num_ports = lilv_plugin_get_num_ports(p);
- float* mins = calloc(num_ports, sizeof(float));
- float* maxes = calloc(num_ports, sizeof(float));
- float* defaults = calloc(num_ports, sizeof(float));
+ float* mins = (float*)calloc(num_ports, sizeof(float));
+ float* maxes = (float*)calloc(num_ports, sizeof(float));
+ float* defaults = (float*)calloc(num_ports, sizeof(float));
lilv_plugin_get_port_ranges_float(p, mins, maxes, defaults);
for (uint32_t i = 0; i < num_ports; ++i)
diff --git a/utils/lv2ls.c b/utils/lv2ls.c
index 5432f37..3ccbcc6 100644
--- a/utils/lv2ls.c
+++ b/utils/lv2ls.c
@@ -14,7 +14,6 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdbool.h>
#include <stdio.h>
#include <string.h>