Mercurial > hg > CbC > CbC_gcc
comparison libiberty/make-temp-file.c @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | 77e2b8dfacca |
children | 04ced10e8804 |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
1 /* Utility to pick a temporary filename prefix. | 1 /* Utility to pick a temporary filename prefix. |
2 Copyright (C) 1996, 1997, 1998, 2001, 2009 Free Software Foundation, Inc. | 2 Copyright (C) 1996, 1997, 1998, 2001, 2009, 2010 |
3 Free Software Foundation, Inc. | |
3 | 4 |
4 This file is part of the libiberty library. | 5 This file is part of the libiberty library. |
5 Libiberty is free software; you can redistribute it and/or | 6 Libiberty is free software; you can redistribute it and/or |
6 modify it under the terms of the GNU Library General Public | 7 modify it under the terms of the GNU Library General Public |
7 License as published by the Free Software Foundation; either | 8 License as published by the Free Software Foundation; either |
119 base = try_dir (getenv ("TMP"), base); | 120 base = try_dir (getenv ("TMP"), base); |
120 base = try_dir (getenv ("TEMP"), base); | 121 base = try_dir (getenv ("TEMP"), base); |
121 #endif | 122 #endif |
122 | 123 |
123 #ifdef P_tmpdir | 124 #ifdef P_tmpdir |
124 base = try_dir (P_tmpdir, base); | 125 /* We really want a directory name here as if concatenated with say \dir |
126 we do not end up with a double \\ which defines an UNC path. */ | |
127 if (strcmp (P_tmpdir, "\\") == 0) | |
128 base = try_dir ("\\.", base); | |
129 else | |
130 base = try_dir (P_tmpdir, base); | |
125 #endif | 131 #endif |
126 | 132 |
127 /* Try /var/tmp, /usr/tmp, then /tmp. */ | 133 /* Try /var/tmp, /usr/tmp, then /tmp. */ |
128 base = try_dir (vartmp, base); | 134 base = try_dir (vartmp, base); |
129 base = try_dir (usrtmp, base); | 135 base = try_dir (usrtmp, base); |