Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
6b0600f3
Kaydet (Commit)
6b0600f3
authored
Şub 23, 2001
tarafından
Patrick Luby
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Correct Mac OS X "tempnam" bug
üst
826e4f97
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
1 deletion
+106
-1
make.sh
dmake/unix/macosx/gnu/make.sh
+4
-1
tempnam.c
dmake/unix/macosx/tempnam.c
+102
-0
No files found.
dmake/unix/macosx/gnu/make.sh
Dosyayı görüntüle @
6b0600f3
...
...
@@ -51,10 +51,13 @@ cc -c -I. -Iunix -Iunix/macosx -Iunix/macosx/gnu -O unix/runargv.c
mv
runargv.o objects
cc
-c
-I
.
-Iunix
-Iunix
/macosx
-Iunix
/macosx/gnu
-O
unix/dcache.c
mv
dcache.o objects
cc
-c
-I
.
-Iunix
-Iunix
/macosx
-Iunix
/macosx/gnu
-O
unix/macosx/tempnam.c
mv
tempnam.o objects
cc
-O
-o
dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o
\
objects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o
\
objects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o
\
objects/quit.o objects/state.o objects/dmdump.o objects/macparse.o
\
objects/rulparse.o objects/percent.o objects/function.o objects/arlib.o
\
objects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o objects/dcache.o
objects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o
\
objects/dcache.o objects/tempnam.o
cp
unix/macosx/gnu/template.mk startup/config.mk
dmake/unix/macosx/tempnam.c
0 → 100644
Dosyayı görüntüle @
6b0600f3
/* RCS $Id: tempnam.c,v 1.1 2001-02-23 03:44:30 pluby Exp $
--
-- SYNOPSIS
-- tempnam
--
-- DESCRIPTION
-- temp file name generation routines.
--
-- AUTHOR
-- Dennis Vadura, dvadura@dmake.wticorp.com
--
-- WWW
-- http://dmake.wticorp.com/
--
-- COPYRIGHT
-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
--
-- This program is NOT free software; you can redistribute it and/or
-- modify it under the terms of the Software License Agreement Provided
-- in the file <distribution-root>/readme/license.txt.
--
-- LOG
-- Use cvs log to obtain detailed change logs.
*/
/*LINTLIBRARY*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#if defined(max)
# undef max
#endif
#define max(A,B) (((A)<(B))?(B):(A))
extern
char
*
mktemp
();
extern
int
access
();
int
d_access
();
char
*
dtempnam
(
dir
,
prefix
)
char
*
dir
;
/* use this directory please (if non-NULL) */
char
*
prefix
;
/* use this (if non-NULL) as filename prefix */
{
static
int
count
=
0
;
register
char
*
p
,
*
q
,
*
tmpdir
;
int
tl
=
0
,
dl
=
0
,
pl
;
char
buf
[
30
];
pl
=
strlen
(
P_tmpdir
);
if
(
(
tmpdir
=
getenv
(
"TMPDIR"
))
!=
NULL
)
tl
=
strlen
(
tmpdir
);
else
if
(
(
tmpdir
=
getenv
(
"TMP"
))
!=
NULL
)
tl
=
strlen
(
tmpdir
);
if
(
dir
!=
NULL
)
dl
=
strlen
(
dir
);
if
(
(
p
=
malloc
((
unsigned
)(
max
(
max
(
dl
,
tl
),
pl
)
+
13
)))
==
NULL
)
return
(
NULL
);
*
p
=
'\0'
;
if
(
(
tl
==
0
)
||
(
d_access
(
strcpy
(
p
,
tmpdir
),
0
)
!=
0
)
)
if
(
(
dl
==
0
)
||
(
d_access
(
strcpy
(
p
,
dir
),
0
)
!=
0
)
)
if
(
d_access
(
strcpy
(
p
,
P_tmpdir
),
0
)
!=
0
)
if
(
!
prefix
)
prefix
=
"tp"
;
if
(
prefix
)
{
*
(
p
+
strlen
(
p
)
+
2
)
=
'\0'
;
(
void
)
strncat
(
p
,
prefix
,
2
);
}
sprintf
(
buf
,
"%08x"
,
getpid
()
);
buf
[
6
]
=
'\0'
;
(
void
)
strcat
(
p
,
buf
);
sprintf
(
buf
,
"%04d"
,
count
++
);
q
=
p
+
strlen
(
p
)
-
6
;
*
q
++
=
buf
[
0
];
*
q
++
=
buf
[
1
];
*
q
++
=
buf
[
2
];
*
q
++
=
buf
[
3
];
if
(
(
q
=
strrchr
(
p
,
'.'
))
!=
NULL
)
*
q
=
'\0'
;
return
(
p
);
}
d_access
(
name
,
flag
)
char
*
name
;
int
flag
;
{
extern
char
*
DirSepStr
;
char
*
p
;
int
r
;
if
(
name
==
NULL
||
!*
name
)
return
(
1
);
/* NULL dir means current dir */
r
=
access
(
name
,
flag
);
p
=
name
+
strlen
(
name
)
-
1
;
if
(
*
p
!=
'/'
&&
*
p
!=
'\\'
)
strcat
(
p
,
DirSepStr
);
return
(
r
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment