Re: [PATCHES] UW 713UP3 patch

2003-11-05 Thread Bruce Momjian
Peter Eisentraut wrote:
 Larry Rosenman writes:
 
  You can reduce the example down to
 
  extern char *strcpy(char *, const char *);
 
  static void f(char *p, int n){
 strcpy(p+n,);
  }
  void g(void){
 f(0, 0);
  }
 
  compile with cc -O -Kinline
 
 I've installed a test based on this and checked off UnixWare on the
 supported platforms list.

Another idea would have been to just grep the include file for the
version define.  :-)

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

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [PATCHES] UW 713UP3 patch

2003-11-05 Thread Larry Rosenman


--On Wednesday, November 05, 2003 04:23:35 -0500 Bruce Momjian 
[EMAIL PROTECTED] wrote:

Peter Eisentraut wrote:
Larry Rosenman writes:

 You can reduce the example down to

extern char *strcpy(char *, const char *);

static void f(char *p, int n){
   strcpy(p+n,);
}
void g(void){
   f(0, 0);
}

 compile with cc -O -Kinline
I've installed a test based on this and checked off UnixWare on the
supported platforms list.
Another idea would have been to just grep the include file for the
version define.  :-)
It's not in an include, it's done automagiclly by the compiler.

LER

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


--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


pgp0.pgp
Description: PGP signature


Re: [PATCHES] UW 713UP3 patch

2003-11-03 Thread Peter Eisentraut
Larry Rosenman writes:

  I'll try and write the patch as you suggest.
 Here's a patch as you suggested:

Isn't there a way to write a test that actually triggers the bug we're
trying to work around?

-- 
Peter Eisentraut   [EMAIL PROTECTED]


---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [PATCHES] UW 713UP3 patch

2003-11-02 Thread Peter Eisentraut
Larry Rosenman writes:

 The problem is MOST people will **NOT** be able to get the fixed compiler
 as it's on the Upgrade Pack path (PAY FOR), and **NOT** the Maintenance
 Pack path (Free).

Why did they upgrade to the broken compiler in the first place, and why
doesn't SCO provide free fixes for broken products?

-- 
Peter Eisentraut   [EMAIL PROTECTED]


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [PATCHES] UW 713UP3 patch

2003-11-02 Thread Larry Rosenman


--On Sunday, November 02, 2003 23:05:21 +0100 Peter Eisentraut 
[EMAIL PROTECTED] wrote:

Larry Rosenman writes:

The problem is MOST people will **NOT** be able to get the fixed compiler
as it's on the Upgrade Pack path (PAY FOR), and **NOT** the Maintenance
Pack path (Free).
Why did they upgrade to the broken compiler in the first place, and why
doesn't SCO provide free fixes for broken products?
The Broken Compiler is in EVERY version prior to the UP3 compiler.  We 
just started tripping it with the changes in 7.4.

I don't know why they didn't/haven't put this fix in the MP path, and I 
can't change that decision, therefore, we need to work around it.

It's not that big of a deal.  See the patch I posted that SHOULD meet your
requirements.

--
Peter Eisentraut   [EMAIL PROTECTED]


--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


pgp0.pgp
Description: PGP signature


Re: [PATCHES] UW 713UP3 patch

2003-11-02 Thread Tom Lane
Larry Rosenman [EMAIL PROTECTED] writes:
 +# version check for the 7.1.3UP3 compiler (version 401200310):
 +cat conftest.c __EOF__
 +int main(int argc, char **argv)
 +#if __SCO_VERSION__ =3D 401200310
 +#error good compiler
 +#else
 +#error bad compiler
 +#endif
 +__EOF__
 +  $CC conftest.c 2conftest.err 12
 +  grep -q good conftest.err
 +  if test $? =3D 0; then
 +CFLAGS=3D-O -Kinline
 +  else
 +CFLAGS=3D-O -Kinline,no_host
 +  fi

Couldn't this be simplified to

+cat conftest.c __EOF__
+int main(int argc, char **argv)
+{
+#if __SCO_VERSION__  401200310
+#error bad compiler
+#endif
+}
+__EOF__
+  $CC conftest.c /dev/null 21
+  if test $? = 0; then
+CFLAGS=-O -Kinline
+  else
+CFLAGS=-O -Kinline,no_host
+  fi

regards, tom lane

---(end of broadcast)---
TIP 8: explain analyze is your friend