File: texlive_svn_r75793.diff

package info (click to toggle)
texlive-bin 2025.20250727.75242%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 209,764 kB
  • sloc: ansic: 893,576; cpp: 156,185; perl: 101,166; sh: 37,697; python: 13,679; javascript: 9,754; makefile: 8,930; xml: 8,361; lex: 5,176; pascal: 3,814; java: 3,569; yacc: 2,935; tcl: 2,903; exp: 2,031; ruby: 712; lisp: 687; sed: 375; asm: 140; csh: 46; awk: 30
file content (49 lines) | stat: -rw-r--r-- 1,984 bytes parent folder | download
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
41
42
43
44
45
46
47
48
49
From: Karl Berry <karl@freefriends.org>
Subject: Remove (incompatible) getenv declaration.

 * c-std.h (getenv) [! HAVE_STDLIB_H]: remove declaration,
   since evince (et al.?) don't bother to check for <stdlib.h>,
   and C23 broke () declarations.
   https://tug.org/pipermail/tex-live/2025-July/051609.html

Origin: upstream, https://svn.tug.org:8369/texlive?revision=75793&view=revision
Bug-Debian: http://bugs.debian.org/1109256

Index: texk/kpathsea/c-std.h
===================================================================
--- texlive-bin.orig/texk/kpathsea/c-std.h	(revision 75792)
+++ texlive-bin/texk/kpathsea/c-std.h	(revision 75793)
@@ -43,20 +43,24 @@
    redefinitions on some systems.  (We don't include <stddef.h>
    ourselves any more, but FYI.)  */
 #else
-/* It's impossible to say for sure what the system will deign to put in
-   <stdlib.h>, but let's hope it's at least this.  */
-extern char *getenv ();
+/* We used to declare char *getenv() here, but since C23 decided to break
+   historical () declarations, and evince (et al.?) have decided not to
+   check for <stdlib.h> any more, that caused errors, e.g.:
+   https://tug.org/pipermail/tex-live/2025-July/051609.html
+   So eliding the declaration and hoping for the best.  */
+  /* extern char *getenv (); */
 #endif /* not HAVE_STDLIB_H */
 
 #ifdef WIN32
 #include <malloc.h>
 #else
-#ifndef STDC_HEADERS
-#ifndef ALLOC_RETURN_TYPE
-#define ALLOC_RETURN_TYPE void
-#endif /* not ALLOC_RETURN_TYPE */
-extern ALLOC_RETURN_TYPE *calloc (), *malloc (), *realloc ();
-#endif /* not STDC_HEADERS */
+/* As with above getenv, don't try to declare the alloc fns.  */
+/* #ifndef STDC_HEADERS */
+/* #ifndef ALLOC_RETURN_TYPE */
+/* #define ALLOC_RETURN_TYPE void */
+/* #endif */ /* not ALLOC_RETURN_TYPE */
+/* extern ALLOC_RETURN_TYPE *calloc (), *malloc (), *realloc (); */
+/* #endif */ /* not STDC_HEADERS */
 #endif /* not WIN32 */
 
 /* SunOS 4.1.1 gets STDC_HEADERS defined, but it doesn't provide