PostgreSQL 7.2.1 and Sun's C compiler under Solaris8

Started by Stefan Lindnerover 24 years ago10 messagespatches
Jump to latest
#1Stefan Lindner
lindner@visionet.de

Hi,

PostgreSQL works well with this combination but with one modification:

It will not compile with SunC Version 5.3 (no experience with other
versions) unless
you make the following change in file psqlodbc.c: remove the functions
"_init" and "_fini". The crt.o library of Sun's C compiler contains this
functions.
This could be done by adding lines like

#if !defined (__SUNPRO_C)
...
#endif

The attachement is a modified version of psqlodbc according to this
suggestion

Stefan Lindner
---
Visionet GmbH, Am Weichselgarten 7, 91058 Erlangen
Tel.: 09131/691230, FAX:09131/691111
mailto:lindner@visionet.de, http://www.visionet.de

Beware of bugs in the above code; I have only proved it correct, not
tried it. (Donald E. Knuth)

Attachments:

psqlodbc.capplication/octet-stream; name=psqlodbc.cDownload
#2Peter Eisentraut
peter_e@gmx.net
In reply to: Stefan Lindner (#1)
Re: [PATCHES] PostgreSQL 7.2.1 and Sun's C compiler under Solaris8

I think we should get rid of the _init and _fini functions altogether,
because Solaris is not the only platform where this is a problem.
Evidently, there are already workarounds in place in case they don't work,
so it shouldn't be a problem to remove them. Let's see what the ODBC guys
say.

Stefan Lindner writes:

Hi,

PostgreSQL works well with this combination but with one modification:

It will not compile with SunC Version 5.3 (no experience with other
versions) unless
you make the following change in file psqlodbc.c: remove the functions
"_init" and "_fini". The crt.o library of Sun's C compiler contains this
functions.
This could be done by adding lines like

#if !defined (__SUNPRO_C)
...
#endif

The attachement is a modified version of psqlodbc according to this
suggestion

Stefan Lindner
---
Visionet GmbH, Am Weichselgarten 7, 91058 Erlangen
Tel.: 09131/691230, FAX:09131/691111
mailto:lindner@visionet.de, http://www.visionet.de

Beware of bugs in the above code; I have only proved it correct, not
tried it. (Donald E. Knuth)

--
Peter Eisentraut peter_e@gmx.net

#3Bruce Momjian
bruce@momjian.us
In reply to: Peter Eisentraut (#2)
Re: [PATCHES] PostgreSQL 7.2.1 and Sun's C compiler under Solaris8

Can I get an ODBC opinion on this?

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

Peter Eisentraut wrote:

I think we should get rid of the _init and _fini functions altogether,
because Solaris is not the only platform where this is a problem.
Evidently, there are already workarounds in place in case they don't work,
so it shouldn't be a problem to remove them. Let's see what the ODBC guys
say.

Stefan Lindner writes:

Hi,

PostgreSQL works well with this combination but with one modification:

It will not compile with SunC Version 5.3 (no experience with other
versions) unless
you make the following change in file psqlodbc.c: remove the functions
"_init" and "_fini". The crt.o library of Sun's C compiler contains this
functions.
This could be done by adding lines like

#if !defined (__SUNPRO_C)
...
#endif

The attachement is a modified version of psqlodbc according to this
suggestion

Stefan Lindner
---
Visionet GmbH, Am Weichselgarten 7, 91058 Erlangen
Tel.: 09131/691230, FAX:09131/691111
mailto:lindner@visionet.de, http://www.visionet.de

Beware of bugs in the above code; I have only proved it correct, not
tried it. (Donald E. Knuth)

--
Peter Eisentraut peter_e@gmx.net

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#4Bruce Momjian
bruce@momjian.us
In reply to: Peter Eisentraut (#2)
Re: [PATCHES] PostgreSQL 7.2.1 and Sun's C compiler under Solaris8

Did we ever get a reply to this from the ODBC folks?

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

Peter Eisentraut wrote:

I think we should get rid of the _init and _fini functions altogether,
because Solaris is not the only platform where this is a problem.
Evidently, there are already workarounds in place in case they don't work,
so it shouldn't be a problem to remove them. Let's see what the ODBC guys
say.

Stefan Lindner writes:

Hi,

PostgreSQL works well with this combination but with one modification:

It will not compile with SunC Version 5.3 (no experience with other
versions) unless
you make the following change in file psqlodbc.c: remove the functions
"_init" and "_fini". The crt.o library of Sun's C compiler contains this
functions.
This could be done by adding lines like

#if !defined (__SUNPRO_C)
...
#endif

The attachement is a modified version of psqlodbc according to this
suggestion

Stefan Lindner
---
Visionet GmbH, Am Weichselgarten 7, 91058 Erlangen
Tel.: 09131/691230, FAX:09131/691111
mailto:lindner@visionet.de, http://www.visionet.de

Beware of bugs in the above code; I have only proved it correct, not
tried it. (Donald E. Knuth)

--
Peter Eisentraut peter_e@gmx.net

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#5Peter Eisentraut
peter_e@gmx.net
In reply to: Bruce Momjian (#4)
Re: [PATCHES] PostgreSQL 7.2.1 and Sun's C compiler under

Bruce Momjian writes:

Did we ever get a reply to this from the ODBC folks?

Nope. Still open.

I'd really like to fix this and make the ODBC compile the default so we
can get more testing.

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

Peter Eisentraut wrote:

I think we should get rid of the _init and _fini functions altogether,
because Solaris is not the only platform where this is a problem.
Evidently, there are already workarounds in place in case they don't work,
so it shouldn't be a problem to remove them. Let's see what the ODBC guys
say.

Stefan Lindner writes:

Hi,

PostgreSQL works well with this combination but with one modification:

It will not compile with SunC Version 5.3 (no experience with other
versions) unless
you make the following change in file psqlodbc.c: remove the functions
"_init" and "_fini". The crt.o library of Sun's C compiler contains this
functions.
This could be done by adding lines like

#if !defined (__SUNPRO_C)
...
#endif

The attachement is a modified version of psqlodbc according to this
suggestion

Stefan Lindner
---
Visionet GmbH, Am Weichselgarten 7, 91058 Erlangen
Tel.: 09131/691230, FAX:09131/691111
mailto:lindner@visionet.de, http://www.visionet.de

Beware of bugs in the above code; I have only proved it correct, not
tried it. (Donald E. Knuth)

--
Peter Eisentraut peter_e@gmx.net

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

--
Peter Eisentraut peter_e@gmx.net

#6Bruce Momjian
bruce@momjian.us
In reply to: Peter Eisentraut (#5)
Re: [PATCHES] PostgreSQL 7.2.1 and Sun's C compiler under Solaris8

Peter Eisentraut wrote:

Bruce Momjian writes:

Did we ever get a reply to this from the ODBC folks?

Nope. Still open.

I'd really like to fix this and make the ODBC compile the default so we
can get more testing.

Well, I am working together a list of open items and will put them up on
a website soon so we can address all of them.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#5)
Re: [PATCHES] PostgreSQL 7.2.1 and Sun's C compiler under

Peter Eisentraut <peter_e@gmx.net> writes:

I'd really like to fix this and make the ODBC compile the default so we
can get more testing.

Is it possible to do that, considering the ODBC compile depends on
having ODBC software present?

I didn't object to expecting readline and zlib to be present by default,
but I'm not happy about expecting ODBC stuff to be present by default.
That seems too far off the beaten path.

regards, tom lane

#8Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#7)
Re: [PATCHES] PostgreSQL 7.2.1 and Sun's C compiler under

Tom Lane wrote:

Peter Eisentraut <peter_e@gmx.net> writes:

I'd really like to fix this and make the ODBC compile the default so we
can get more testing.

Is it possible to do that, considering the ODBC compile depends on
having ODBC software present?

I didn't object to expecting readline and zlib to be present by default,
but I'm not happy about expecting ODBC stuff to be present by default.
That seems too far off the beaten path.

I have no odbc here at all and have always compiled odbc to check for
patch errors. You need ODBC to test the software, but not for compile.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#9Bruce Momjian
bruce@momjian.us
In reply to: Stefan Lindner (#1)
Re: [PATCHES] PostgreSQL 7.2.1 and Sun's C compiler under Solaris8

Have we dealt with this? I still see _fini and _init in the code.

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

Stefan Lindner wrote:

Hi,

PostgreSQL works well with this combination but with one modification:

It will not compile with SunC Version 5.3 (no experience with other
versions) unless
you make the following change in file psqlodbc.c: remove the functions
"_init" and "_fini". The crt.o library of Sun's C compiler contains this
functions.
This could be done by adding lines like

#if !defined (__SUNPRO_C)
...
#endif

The attachement is a modified version of psqlodbc according to this
suggestion

Stefan Lindner
---
Visionet GmbH, Am Weichselgarten 7, 91058 Erlangen
Tel.: 09131/691230, FAX:09131/691111
mailto:lindner@visionet.de, http://www.visionet.de

Beware of bugs in the above code; I have only proved it correct, not
tried it. (Donald E. Knuth)

Content-Description: psqlodbc.c

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#10Bruce Momjian
bruce@momjian.us
In reply to: Peter Eisentraut (#2)
Re: [PATCHES] PostgreSQL 7.2.1 and Sun's C compiler under Solaris8

ODBC guys, comment?

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

Peter Eisentraut wrote:

I think we should get rid of the _init and _fini functions altogether,
because Solaris is not the only platform where this is a problem.
Evidently, there are already workarounds in place in case they don't work,
so it shouldn't be a problem to remove them. Let's see what the ODBC guys
say.

Stefan Lindner writes:

Hi,

PostgreSQL works well with this combination but with one modification:

It will not compile with SunC Version 5.3 (no experience with other
versions) unless
you make the following change in file psqlodbc.c: remove the functions
"_init" and "_fini". The crt.o library of Sun's C compiler contains this
functions.
This could be done by adding lines like

#if !defined (__SUNPRO_C)
...
#endif

The attachement is a modified version of psqlodbc according to this
suggestion

Stefan Lindner
---
Visionet GmbH, Am Weichselgarten 7, 91058 Erlangen
Tel.: 09131/691230, FAX:09131/691111
mailto:lindner@visionet.de, http://www.visionet.de

Beware of bugs in the above code; I have only proved it correct, not
tried it. (Donald E. Knuth)

--
Peter Eisentraut peter_e@gmx.net

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073