summaryrefslogtreecommitdiff
path: root/dmake/unix/solaris/tempnam.c
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2013-02-25 11:56:21 +0100
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-02-28 02:37:34 +0000
commit2b791f1cc51eaad25bd3464f94231fe4b236fae6 (patch)
tree64dd6453b3ce0487cb0aa7676545859388508edc /dmake/unix/solaris/tempnam.c
parent9133cc452c9e473164755a2177b7a2285c09cb22 (diff)
remove dmake, build.pl, deliver.pl and zipdep.pl
This is writing history: LibreOffice builds in ONE non-recursive make process with full dependencies. We will now be able to really move forward without the old build system. A big 'Thank you!' goes out to everyone contributing to solenv/gbuild, especially: - David Tardon - Norbert Thiebaud - Tor Lillqvist - Michael Stahl - Matúš Kukan - Stephan Bergmann - Luboš Luňák - Caolán McNamara - Mathias Bauer - Jan Holesovsky - Peter Foley - Andras Timar - Hans-Joachim Lankenau and all the heroes migrating all the modules of LibreOffice to gbuild. By explicit request this commit has to be completed with this quote: I say we take off and nuke the entire site from orbit. It's the only way to be sure. Hold on a second. This installation has a substantial dollar value attached to it. They can bill me. Change-Id: I72fa17cfb24fae00ca78cfe0eb5782c1788d2dcc Reviewed-on: https://gerrit.libreoffice.org/2445 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Niko Rönkkö <ronkko@iki.fi> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'dmake/unix/solaris/tempnam.c')
-rw-r--r--dmake/unix/solaris/tempnam.c103
1 files changed, 0 insertions, 103 deletions
diff --git a/dmake/unix/solaris/tempnam.c b/dmake/unix/solaris/tempnam.c
deleted file mode 100644
index 56f23fbe21d4..000000000000
--- a/dmake/unix/solaris/tempnam.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* RCS $Id: tempnam.c,v 1.1.1.1 2000-09-22 15:33:35 hr 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>
-
-#define max(A,B) (((A)<(B))?(B):(A))
-
-extern char *mktemp();
-extern int access();
-
-static char *cpdir();
-static char seed[4]="AAA";
-
-/* BSD stdio.h doesn't define P_tmpdir, so let's do it here */
-#ifndef P_tmpdir
-static char *P_tmpdir = "/tmp";
-#endif
-
-char *
-tempnam(dir, prefix)
-const char *dir; /* use this directory please (if non-NULL) */
-const char *prefix; /* use this (if non-NULL) as filename prefix */
-{
- register char *p, *q, *tmpdir;
- int tl=0, dl=0, pl;
-
- pl = strlen(P_tmpdir);
-
- if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
- if( dir != NULL ) dl = strlen(dir);
-
- if( (p = malloc((unsigned)(max(max(dl,tl),pl)+16))) == NULL )
- return(NULL);
-
- *p = '\0';
-
- if( (tl == 0) || (access( cpdir(p, tmpdir), 3) != 0) )
- if( (dl == 0) || (access( cpdir(p, dir), 3) != 0) )
- if( access( cpdir(p, P_tmpdir), 3) != 0 )
- if( access( cpdir(p, "/tmp"), 3) != 0 )
- return(NULL);
-
- (void) strcat(p, "/");
- if(prefix)
- {
- *(p+strlen(p)+5) = '\0';
- (void)strncat(p, prefix, 5);
- }
-
- (void)strcat(p, seed);
- (void)strcat(p, "XXXXXX");
-
- q = seed;
- while(*q == 'Z') *q++ = 'A';
- ++*q;
-
- if(*mktemp(p) == '\0') return(NULL);
- return(p);
-}
-
-
-
-static char *
-cpdir(buf, str)
-char *buf;
-char *str;
-{
- char *p;
-
- if(str != NULL)
- {
- (void) strcpy(buf, str);
- p = buf - 1 + strlen(buf);
- if(*p == '/') *p = '\0';
- }
-
- return(buf);
-}