Changes of Revision 44
libosmocore.spec
Changed
x
1
2
3
Name: libosmocore
4
Requires: osmocom-master
5
-Version: 1.7.0.93.e709b
6
+Version: 1.7.0.94.9470
7
Release: 0
8
Summary: The Open Source Mobile Communications Core Library
9
License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND AGPL-3.0-or-later
10
Group: Productivity/Telephony/Utilities
11
Url: https://osmocom.org/projects/libosmocore/wiki/Libosmocore
12
-Source: libosmocore_1.7.0.93.e709b.tar.xz
13
+Source: libosmocore_1.7.0.94.9470.tar.xz
14
Source1: rpmlintrc
15
BuildRequires: automake >= 1.6
16
BuildRequires: libtool >= 2
17
commit_94705d042a94d40585414d83d446889a087dae05.txt
Added
commit_e709bd4814020146baff2538ea50dbbc96432ff0.txt
Deleted
libosmocore_1.7.0.93.e709b.dsc -> libosmocore_1.7.0.94.9470.dsc
Changed
22
1
2
Source: libosmocore
3
Binary: libosmocore, libosmocodec0, libosmocodec-doc, libosmocoding0, libosmocoding-doc, libosmocore19, libosmocore-doc, libosmogb14, libosmogb-doc, libosmogsm18, libosmogsm-doc, libosmovty9, libosmovty-doc, libosmoctrl0, libosmoctrl-doc, libosmosim2, libosmousb0, libosmocore-dev, libosmocore-utils, libosmocore-dbg
4
Architecture: any all
5
-Version: 1.7.0.93.e709b
6
+Version: 1.7.0.94.9470
7
Maintainer: Osmocom team <openbsc@lists.osmocom.org>
8
Homepage: https://projects.osmocom.org/projects/libosmocore
9
Standards-Version: 3.9.8
10
11
libosmovty-doc deb doc optional arch=all
12
libosmovty9 deb libs optional arch=any
13
Checksums-Sha1:
14
- df4e2310cd0907042c7e7171185c21bf38b64c60 1005608 libosmocore_1.7.0.93.e709b.tar.xz
15
+ fdb21123e3bbe53ef9499e9cc8e604004ba6ad8c 1005452 libosmocore_1.7.0.94.9470.tar.xz
16
Checksums-Sha256:
17
- 8fe86935a241d9ce6bd112b4ba1c551a7617bba2e42930a36f72ace0c288df94 1005608 libosmocore_1.7.0.93.e709b.tar.xz
18
+ 473a03572296b0683791b1d26275c60efd4448610715c5d32d6452a18fdf1c8f 1005452 libosmocore_1.7.0.94.9470.tar.xz
19
Files:
20
- 0b970dbb5632944612b865e7cea65b20 1005608 libosmocore_1.7.0.93.e709b.tar.xz
21
+ 763dddee69cca088c8bf16d34b5a8122 1005452 libosmocore_1.7.0.94.9470.tar.xz
22
libosmocore_1.7.0.93.e709b.tar.xz/.tarball-version -> libosmocore_1.7.0.94.9470.tar.xz/.tarball-version
Changed
4
1
2
-1.7.0.93-e709b
3
+1.7.0.94-9470
4
libosmocore_1.7.0.93.e709b.tar.xz/debian/changelog -> libosmocore_1.7.0.94.9470.tar.xz/debian/changelog
Changed
12
1
2
-libosmocore (1.7.0.93.e709b) unstable; urgency=medium
3
+libosmocore (1.7.0.94.9470) unstable; urgency=medium
4
5
* Automatically generated changelog entry for building the Osmocom master feed
6
7
- -- Osmocom OBS scripts <info@osmocom.org> Wed, 11 Jan 2023 15:37:38 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org> Thu, 12 Jan 2023 09:37:36 +0000
9
10
libosmocore (1.7.0) unstable; urgency=medium
11
12
libosmocore_1.7.0.93.e709b.tar.xz/include/osmocom/core/utils.h -> libosmocore_1.7.0.94.9470.tar.xz/include/osmocom/core/utils.h
Changed
20
1
2
3
uint32_t osmo_isqrt32(uint32_t x);
4
5
+/*! Floored Modulo (See also: Daan Leijen, Division and Modulus for Computer Scientists).
6
+ * \paramin x dividend.
7
+ * \paramin y divisor.
8
+ * \returns remainder of x divided by y. */
9
+#define OSMO_MOD_FLR(x, y) (((x) > 0 && (y) < 0) || ((x) < 0 && (y) > 0) ? (x) % (y) + (y) : (x) % (y))
10
+
11
+/*! Euclidean Modulo (See also: Daan Leijen, Division and Modulus for Computer Scientists).
12
+ * \paramin x dividend.
13
+ * \paramin y divisor.
14
+ * \returns remainder of x divided by y. */
15
+#define OSMO_MOD_EUC(x, y) ((x) % (y) < 0 ? (y) > 0 ? (x) % (y) + (y) : (x) % (y) - (y) : (x) % (y))
16
+
17
char osmo_luhn(const char* in, int in_len);
18
19
/*! State for OSMO_STRBUF_APPEND() and OSMO_STRBUF_PRINTF(). See there for examples. */
20
libosmocore_1.7.0.93.e709b.tar.xz/tests/utils/utils_test.c -> libosmocore_1.7.0.94.9470.tar.xz/tests/utils/utils_test.c
Changed
75
1
2
}
3
}
4
5
+static void mod_test_mod(int x, int y, int expected_result)
6
+{
7
+ int result;
8
+ result = x % y;
9
+ printf(" %d mod %d = %d = %d\n", x, y, result, expected_result);
10
+ OSMO_ASSERT(result == expected_result);
11
+}
12
+
13
+static void mod_test_mod_flr(int x, int y, int expected_result)
14
+{
15
+ int result;
16
+ result = OSMO_MOD_FLR(x, y);
17
+ printf(" %d mod_flr %d = %d = %d\n", x, y, result, expected_result);
18
+ OSMO_ASSERT(result == expected_result);
19
+}
20
+
21
+static void mod_test_mod_euc(int x, int y, int expected_result)
22
+{
23
+ int result;
24
+ result = OSMO_MOD_EUC(x, y);
25
+ printf(" %d mod_euc %d = %d = %d\n", x, y, result, expected_result);
26
+ OSMO_ASSERT(result == expected_result);
27
+}
28
+
29
+static void mod_test(void)
30
+{
31
+ /* See also: Daan Leijen, Division and Modulus for Computer
32
+ * Scientists, section 1.3 */
33
+
34
+ printf("\nTesting built in truncated modulo for comparison:\n");
35
+ mod_test_mod(8, 3, 2);
36
+ mod_test_mod(8, -3, 2);
37
+ mod_test_mod(-8, 3, -2);
38
+ mod_test_mod(-8, -3, -2);
39
+ mod_test_mod(1, 2, 1);
40
+ mod_test_mod(1, -2, 1);
41
+ mod_test_mod(-1, 2, -1);
42
+ mod_test_mod(-1, -2, -1);
43
+
44
+ printf("\nTesting OSMO_MOD_FLR():\n");
45
+ mod_test_mod_flr(8, 3, 2);
46
+ mod_test_mod_flr(8, -3, -1);
47
+ mod_test_mod_flr(-8, 3, 1);
48
+ mod_test_mod_flr(-8, -3, -2);
49
+ mod_test_mod_flr(1, 2, 1);
50
+ mod_test_mod_flr(1, -2, -1);
51
+ mod_test_mod_flr(-1, 2, 1);
52
+ mod_test_mod_flr(-1, -2, -1);
53
+
54
+ printf("\nTesting OSMO_MOD_EUC():\n");
55
+ mod_test_mod_euc(8, 3, 2);
56
+ mod_test_mod_euc(8, -3, 2);
57
+ mod_test_mod_euc(-8, 3, 1);
58
+ mod_test_mod_euc(-8, -3, 1);
59
+ mod_test_mod_euc(1, 2, 1);
60
+ mod_test_mod_euc(1, -2, 1);
61
+ mod_test_mod_euc(-1, 2, 1);
62
+ mod_test_mod_euc(-1, -2, 1);
63
+}
64
65
struct osmo_sockaddr_to_str_and_uint_test_case {
66
uint16_t port;
67
68
str_escape3_test();
69
str_quote3_test();
70
isqrt_test();
71
+ mod_test();
72
osmo_sockaddr_to_str_and_uint_test();
73
osmo_str_tolowupper_test();
74
strbuf_test();
75
libosmocore_1.7.0.93.e709b.tar.xz/tests/utils/utils_test.ok -> libosmocore_1.7.0.94.9470.tar.xz/tests/utils/utils_test.ok
Changed
38
1
2
3
Testing integer square-root
4
5
+Testing built in truncated modulo for comparison:
6
+ 8 mod 3 = 2 = 2
7
+ 8 mod -3 = 2 = 2
8
+ -8 mod 3 = -2 = -2
9
+ -8 mod -3 = -2 = -2
10
+ 1 mod 2 = 1 = 1
11
+ 1 mod -2 = 1 = 1
12
+ -1 mod 2 = -1 = -1
13
+ -1 mod -2 = -1 = -1
14
+
15
+Testing OSMO_MOD_FLR():
16
+ 8 mod_flr 3 = 2 = 2
17
+ 8 mod_flr -3 = -1 = -1
18
+ -8 mod_flr 3 = 1 = 1
19
+ -8 mod_flr -3 = -2 = -2
20
+ 1 mod_flr 2 = 1 = 1
21
+ 1 mod_flr -2 = -1 = -1
22
+ -1 mod_flr 2 = 1 = 1
23
+ -1 mod_flr -2 = -1 = -1
24
+
25
+Testing OSMO_MOD_EUC():
26
+ 8 mod_euc 3 = 2 = 2
27
+ 8 mod_euc -3 = 2 = 2
28
+ -8 mod_euc 3 = 1 = 1
29
+ -8 mod_euc -3 = 1 = 1
30
+ 1 mod_euc 2 = 1 = 1
31
+ 1 mod_euc -2 = 1 = 1
32
+ -1 mod_euc 2 = 1 = 1
33
+ -1 mod_euc -2 = 1 = 1
34
+
35
osmo_sockaddr_to_str_and_uint_test
36
0 0.0.0.0:0 addr_len=20 --> 0.0.0.0:0 rc=7
37
1 255.255.255.255:65535 addr_len=20 --> 255.255.255.255:65535 rc=15
38