summaryrefslogtreecommitdiffhomepage
path: root/contrib/lar/lar.h
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-04-06 18:16:04 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-04-06 18:16:04 +0000
commitbf1cbdd8389d5e7067b03c1f10e9fbcb3756ccf4 (patch)
treec17407058f43b580716608dadf4978122003b632 /contrib/lar/lar.h
parentbfa91018ace069edf3deb6c7e0bbe235ed6ecd3f (diff)
contrib/lar: fix buffer overflow check, define os dir seperator
Diffstat (limited to 'contrib/lar/lar.h')
-rw-r--r--contrib/lar/lar.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/lar/lar.h b/contrib/lar/lar.h
index c5b429b9f..59e6fa620 100644
--- a/contrib/lar/lar.h
+++ b/contrib/lar/lar.h
@@ -1,3 +1,6 @@
+#ifndef __LAR_H
+#define __LAR_H
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -25,6 +28,12 @@ int errno;
#define LAR_FNAME_BUFFER 1024
#define LAR_FNAME(s) char s[LAR_FNAME_BUFFER]
+#ifdef __WIN32__
+#define LAR_DIRSEP '\\'
+#else
+#define LAR_DIRSEP '/'
+#endif
+
struct lar_index_item {
uint32_t noffset;
@@ -76,3 +85,6 @@ int lar_close( lar_archive *ar );
lar_archive * lar_find_archive( const char *package );
lar_member * lar_find_member( lar_archive *ar, const char *package );
+
+#endif
+