summaryrefslogtreecommitdiff
path: root/Ports/python3/patches/tweak-unsupported-printf-format-specifiers.patch
blob: d390cf1fbc4b9a2be7dd10a943d8892268a62410 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
--- Python-3.9.4/Python/getversion.c	2021-02-21 20:22:44.092438528 +0100
+++ Python-3.9.4/Python/getversion.c	2021-02-21 20:36:51.249477963 +0100
@@ -9,7 +9,7 @@
 Py_GetVersion(void)
 {
     static char version[250];
-    PyOS_snprintf(version, sizeof(version), "%.80s (%.80s) %.80s",
+    PyOS_snprintf(version, sizeof(version), "%s (%s) %s",
                   PY_VERSION, Py_GetBuildInfo(), Py_GetCompiler());
     return version;
 }
--- Python-3.9.4/Modules/getbuildinfo.c	2021-02-21 20:22:43.945286288 +0100
+++ Python-3.9.4/Modules/getbuildinfo.c	2021-02-21 20:38:09.187987432 +0100
@@ -43,7 +43,7 @@
     if (!(*gitid))
         gitid = "default";
     PyOS_snprintf(buildinfo, sizeof(buildinfo),
-                  "%s%s%s, %.20s, %.9s", gitid, sep, revision,
+                  "%s%s%s, %s, %s", gitid, sep, revision,
                   DATE, TIME);
     return buildinfo;
 }
diff -Naur Python-3.9.4/Python/dynload_shlib.c Python-3.9.4.serenity/Python/dynload_shlib.c
--- Python-3.9.4/Python/dynload_shlib.c	2021-04-04 14:56:53.000000000 +0200
+++ Python-3.9.4.serenity/Python/dynload_shlib.c	2021-04-24 15:57:27.419824682 +0200
@@ -69,12 +69,12 @@
 
     if (strchr(pathname, '/') == NULL) {
         /* Prefix bare filename with "./" */
-        PyOS_snprintf(pathbuf, sizeof(pathbuf), "./%-.255s", pathname);
+        PyOS_snprintf(pathbuf, sizeof(pathbuf), "./%s", pathname);
         pathname = pathbuf;
     }
 
     PyOS_snprintf(funcname, sizeof(funcname),
-                  LEAD_UNDERSCORE "%.20s_%.200s", prefix, shortname);
+                  LEAD_UNDERSCORE "%s_%s", prefix, shortname);
 
     if (fp != NULL) {
         int i;