Package: minicom / 2.7-1.1

Add-ARRAY_SIZE-macro.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# HG changeset patch
# User Adam Lackorzynski <adam@os.inf.tu-dresden.de>
# Date 1440364600 -7200
# Node ID 4eff7b4cde33a56d9caf64e44722186c89e26922
# Parent  3cb4335d5819099c85a30dae714f0a213fa4a44c
Add ARRAY_SIZE macro

diff -r 3cb4335d5819 -r 4eff7b4cde33 src/minicom.h
--- a/src/minicom.h	Mon Jun 29 21:16:14 2015 +0200
+++ b/src/minicom.h	Sun Aug 23 23:16:40 2015 +0200
@@ -303,6 +303,7 @@
 int lockfile_create(int no_msgs);
 void lockfile_remove(void);
 
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
 
 
 /* We want the ANSI offsetof macro to do some dirty stuff. */