Re: AIX check in datetime.h

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Joachim Wieland <joe(at)mcknight(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: AIX check in datetime.h
Date: 2006-06-06 15:52:19
Message-ID: 200606061552.k56FqJ800746@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Wow, that is strange. We could remove it for 8.2 and see how testing goes.

---------------------------------------------------------------------------

Joachim Wieland wrote:
> Can someone please explain why in include/utils/datetime.h (struct datetkn)
> there is a check for _AIX that either initializes a char* pointer or a char
> array? Is there any advantage of a char-array except for warnings of some
> compilers if the initilization string is too long?
>
> Apart from that I doubt that AIX cannot handle token[TOKMAXLEN] because
> similar declarations can be found in other headers without the _AIX check.
>
> The struct definition is more than 9 years old and seems to show up first in
> Attic/dt.h.
>
>
> #define TOKMAXLEN 10 /* only this many chars are stored in
> * datetktbl */
>
> /* keep this struct small; it gets used a lot */
> typedef struct
> {
> #if defined(_AIX)
> char *token;
> #else
> char token[TOKMAXLEN];
> #endif /* _AIX */
> char type;
> char value; /* this may be unsigned, alas */
> } datetkn;
>
>
> Joachim
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-06-06 16:13:02 Re: AIX check in datetime.h
Previous Message Travis Cross 2006-06-06 15:32:04 Re: Duplicate rows sneaking in despite PRIMARY KEY / UNIQUE