Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37844423
en ru br
Репозитории ALT
4.0: 7.3.0-alt1
3.0: 6.8.2-alt18
+updates:6.8.2-alt24
www.altlinux.org/Changes

Группа :: Система/X11
Пакет: xorg-x11

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: xorg-x11-6.8.1.904-alt-imake-tmpdir.patch
Скачать


--- xc/config/imake/imake.c.orig	2005-02-10 17:13:03 +0300
+++ xc/config/imake/imake.c	2005-02-10 17:52:02 +0300
@@ -145,6 +145,11 @@
  *	#include INCLUDE_IMAKEFILE
  *	<add any global targets like 'clean' and long dependencies>
  */
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+
 #if defined(__FreeBSD__) || defined(__NetBSD__)
 /* This needs to be before _POSIX_SOURCE gets defined */
 # include <sys/param.h>
@@ -329,8 +334,8 @@
 
 char *cpp = NULL;
 
-char	*tmpMakefile = "/tmp/Imf.XXXXXX";
-char	*tmpImakefile = "/tmp/IIf.XXXXXX";
+char	*tmpMakefile;
+char	*tmpImakefile;
 char	*make_argv[ ARGUMENTS ] = {
 #ifdef WIN32
     "nmake"
@@ -391,11 +396,16 @@
 #endif
 boolean CrossCompiling = FALSE;
 
-
-
 boolean verbose = FALSE;
 boolean show = TRUE;
 
+static char *get_tmp_file_name (void)
+{
+    char *name = 0;
+    asprintf (&name, "%s/imake.XXXXXX", getenv("TMPDIR") ?: "/tmp");
+    return name;
+}
+
 int
 main(int argc, char *argv[])
 {
@@ -427,7 +437,7 @@
 #ifdef HAS_MKSTEMP
 		int fd;
 #endif
-		tmpMakefile = Strdup(tmpMakefile);
+		tmpMakefile = get_tmp_file_name();
 #ifndef HAS_MKSTEMP
 		if (mktemp(tmpMakefile) == NULL ||
 		    (tmpfd = fopen(tmpMakefile, "w+")) == NULL) {
@@ -974,7 +984,7 @@
 static void
 get_libc_version(FILE *inFile)
 {
-  char aout[] = "/tmp/imakeXXXXXX";
+  char *aout = get_tmp_file_name();
   FILE *fp;
   const char *format = "%s -o %s -x c -";
   char *cc;
@@ -1787,7 +1797,7 @@
 #ifdef HAS_MKSTEMP
 			int fd;
 #endif
-			tmpImakefile = Strdup(tmpImakefile);
+			tmpImakefile = get_tmp_file_name();
 #ifndef HAS_MKSTEMP
 			if (mktemp(tmpImakefile) == NULL ||
 			    (outFile = fopen(tmpImakefile, "w+")) == NULL) {
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin