[msitools: 1/2] Improve portability
- From: Marc-André Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [msitools: 1/2] Improve portability
- Date: Tue, 14 Jan 2020 19:24:45 +0000 (UTC)
commit 248450a2f2a23df59428fa816865a26f7e2496e0
Author: Romain Tartière <romain blogreen org>
Date: Tue Jan 7 10:03:41 2020 -1000
Improve portability
FreeBSD does not have an endian.h file but the users functions are
provided by sys/endian.h. Also, do not hardcode bash(1) location which
is usualy found as /usr/local/bin/bash on FreeBSD. Use env(1) to find
bash(1).
libmsi/string.c | 6 +++++-
tools/msidiff.in | 2 +-
tools/msidump.in | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/libmsi/string.c b/libmsi/string.c
index 25d4162..2a696e3 100644
--- a/libmsi/string.c
+++ b/libmsi/string.c
@@ -22,7 +22,11 @@
#include <stdarg.h>
#include <assert.h>
-#include <endian.h>
+#ifdef __FreeBSD__
+# include <sys/endian.h>
+#else
+# include <endian.h>
+#endif
#include <gsf/gsf-msole-utils.h>
#include "debug.h"
diff --git a/tools/msidiff.in b/tools/msidiff.in
index cea70b2..7d54aac 100644
--- a/tools/msidiff.in
+++ b/tools/msidiff.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# -*- coding: utf-8 -*-
# msidiff - compare two MSI files table content with diff
diff --git a/tools/msidump.in b/tools/msidump.in
index 5edab46..a6e3b7c 100644
--- a/tools/msidump.in
+++ b/tools/msidump.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# -*- coding: utf-8 -*-
# msidump - dump raw MSI tables and stream content
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]