mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Remove WIN32 defines. They never worked.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.4 1996/11/10 03:03:05 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.5 1997/02/14 04:17:35 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This code is actually (almost) unused.
|
||||
@@ -855,16 +855,13 @@ text *
|
||||
timeofday(void)
|
||||
{
|
||||
|
||||
#ifndef WIN32
|
||||
struct timeval tp;
|
||||
struct timezone tpz;
|
||||
#endif /* WIN32 */
|
||||
char templ[500];
|
||||
char buf[500];
|
||||
text *tm;
|
||||
int len = 0;
|
||||
|
||||
#ifndef WIN32
|
||||
gettimeofday(&tp, &tpz);
|
||||
(void) strftime(templ, sizeof(templ), "%a %b %d %H:%M:%S.%%d %Y %Z",
|
||||
localtime((time_t *) &tp.tv_sec));
|
||||
@@ -875,9 +872,4 @@ timeofday(void)
|
||||
VARSIZE(tm) = len;
|
||||
strncpy(VARDATA(tm), buf, strlen(buf));
|
||||
return tm;
|
||||
#else
|
||||
len = len / len;
|
||||
return tm;
|
||||
#endif /* WIN32 */
|
||||
|
||||
}
|
||||
|
||||
@@ -7,16 +7,14 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.5 1996/11/08 05:59:43 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.6 1997/02/14 04:17:47 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#ifndef WIN32
|
||||
#include <pwd.h>
|
||||
#endif /* WIN32 */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
@@ -35,7 +33,6 @@ filename_in(char *file)
|
||||
* should let the shell do expansions (shexpand)
|
||||
*/
|
||||
|
||||
#ifndef WIN32
|
||||
str = (char *) palloc(MAXPATHLEN * sizeof(*str));
|
||||
str[0] = '\0';
|
||||
if (file[0] == '~') {
|
||||
@@ -103,9 +100,6 @@ filename_in(char *file)
|
||||
}
|
||||
strcat(str, file+ind);
|
||||
return(str);
|
||||
#else
|
||||
return(NULL);
|
||||
#endif /* WIN32 */
|
||||
}
|
||||
|
||||
char *
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.10 1997/01/24 18:17:06 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.11 1997/02/14 04:17:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -220,17 +220,10 @@ char *float8out(float64 num)
|
||||
if (!num)
|
||||
return strcpy(ascii, "(null)");
|
||||
|
||||
#ifndef WIN32
|
||||
if (isnan(*num))
|
||||
return strcpy(ascii, "NaN");
|
||||
if (isinf(*num))
|
||||
return strcpy(ascii, "Infinity");
|
||||
#else
|
||||
if (_isnan(*num))
|
||||
return strcpy(ascii, "NaN");
|
||||
if (!_finite(*num))
|
||||
return strcpy(ascii, "Infinity");
|
||||
#endif
|
||||
|
||||
sprintf(ascii, "%.*g", DBL_DIG, *num);
|
||||
return(ascii);
|
||||
|
||||
Reference in New Issue
Block a user