Thread: Digital Mars C++ - Clients

Digital Mars C++ - Clients

From
"Hans Oesterholt-Dijkema"
Date:
L.S.,

I've made a patch against PostgreSQL 7.4.3 to be able to
compile 'libpq'  and 'psql'  with Digital Mars C++.

As Digital Mars C++ doesn't support 'popen()' and 'pclose()'
calls yet, I was in need to patch some psql .c files to let
them work well with the Digital Mars C++ port.

One can apply the patch doing:

    tar xzf postgresql-7.4.3.tar.gz
    cd postgresql-7.4.3
    patch -p1 <pgsql-7.4.3-dmc.patch

Maybe someone can put this patch in the postgresql source
distribution somewhere?

Best whishes,
--
Hans Dijkema
Attachment

Re: Digital Mars C++ - Clients

From
Bruce Momjian
Date:
Uh, I have never heard of Digital Mars C++.  I see it here though:

    http://www.digitalmars.com/

Having never had anyone who uses it, it seems this patch would be better
kept where users of digital Mars could find it, like on their ftp
server.   I don't think there enough usage of Digital Mars for us to
adjust our source code at this time.  Do you agree?

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

Hans Oesterholt-Dijkema wrote:
> L.S.,
>
> I've made a patch against PostgreSQL 7.4.3 to be able to
> compile 'libpq'? and 'psql'? with Digital Mars C++.
>
> As Digital Mars C++ doesn't support 'popen()' and 'pclose()'
> calls yet, I was in need to patch some psql .c files to let
> them work well with the Digital Mars C++ port.
>
> One can apply the patch doing:
>
> ??? tar xzf postgresql-7.4.3.tar.gz
> ??? cd postgresql-7.4.3
> ??? patch -p1 <pgsql-7.4.3-dmc.patch
>
> Maybe someone can put this patch in the postgresql source
> distribution somewhere?
>
> Best whishes,
> --
> Hans Dijkema
>

[ Attachment, skipping... ]

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

--
  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

Re: Digital Mars C++ - Clients

From
"Walter"
Date:
"Bruce Momjian" <pgman@candle.pha.pa.us> wrote in message
news:200407052015.i65KFWn13238@candle.pha.pa.us...
>
> Uh, I have never heard of Digital Mars C++.  I see it here though:
>
> http://www.digitalmars.com/
>
> Having never had anyone who uses it, it seems this patch would be better
> kept where users of digital Mars could find it, like on their ftp
> server.   I don't think there enough usage of Digital Mars for us to
> adjust our source code at this time.  Do you agree?

Check out the www.download.com download statistics for DMC++, which is just
one portal one can download it from:

http://www.download.com/sort/3150-2069-0-1-5.html?

-Walter
www.digitalmars.com free C/C++/D compilers



Re: Digital Mars C++ - Clients

From
Bruce Momjian
Date:
Walter wrote:
>
> "Bruce Momjian" <pgman@candle.pha.pa.us> wrote in message
> news:200407052015.i65KFWn13238@candle.pha.pa.us...
> >
> > Uh, I have never heard of Digital Mars C++.  I see it here though:
> >
> > http://www.digitalmars.com/
> >
> > Having never had anyone who uses it, it seems this patch would be better
> > kept where users of digital Mars could find it, like on their ftp
> > server.   I don't think there enough usage of Digital Mars for us to
> > adjust our source code at this time.  Do you agree?
>
> Check out the www.download.com download statistics for DMC++, which is just
> one portal one can download it from:
>
> http://www.download.com/sort/3150-2069-0-1-5.html?

Looks good, but we have had no requests for it prior to this, and your
additions aren't trivial.  You also mentioned it doesn't have popen,
meaning it might still be in a state of flux, meaning we would have to
continue adjusting our patch --- for a compiler no one has asked about.

--
  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

Re: Digital Mars C++ - Clients

From
"Walter"
Date:
"Bruce Momjian" <pgman@candle.pha.pa.us> wrote in message
news:200407081648.i68GmYd22718@candle.pha.pa.us...
> Walter wrote:
> >
> > "Bruce Momjian" <pgman@candle.pha.pa.us> wrote in message
> > news:200407052015.i65KFWn13238@candle.pha.pa.us...
> > >
> > > Uh, I have never heard of Digital Mars C++.  I see it here though:
> > >
> > > http://www.digitalmars.com/
> > >
> > > Having never had anyone who uses it, it seems this patch would be
better
> > > kept where users of digital Mars could find it, like on their ftp
> > > server.   I don't think there enough usage of Digital Mars for us to
> > > adjust our source code at this time.  Do you agree?
> >
> > Check out the www.download.com download statistics for DMC++, which is
just
> > one portal one can download it from:
> >
> > http://www.download.com/sort/3150-2069-0-1-5.html?
>
> Looks good, but we have had no requests for it prior to this, and your
> additions aren't trivial.  You also mentioned it doesn't have popen,
> meaning it might still be in a state of flux, meaning we would have to
> continue adjusting our patch --- for a compiler no one has asked about.

Hans Oesterholt-Dijkema, who wrote the patch, is not affiliated with Digital
Mars. But it's been my experience that any requests for a feature tend to be
a tiny tip of the iceberg, 99% will just silently walk away from your
product if it doesn't do X. And you *do* have a request, from someone who
obviously cared enough to write a non-trivial patch for your product.

Other products, such as wxWindows, have seen quite a lot of Digital Mars
users embrace it once it started supporting DMC++.

-Walter
www.digitalmars.com free C/C++/D compilers


Re: Digital Mars C++ - Clients

From
Christopher Kings-Lynne
Date:
> Other products, such as wxWindows, have seen quite a lot of Digital Mars
> users embrace it once it started supporting DMC++.

That is an extremely poor allegory.  wxWindows is a GUI TOOLKIT.
PostgreSQL is an independent database server.  99.999% of our windows
installations will be from the binary that we will be distributing.

Chris


Re: Digital Mars C++ - Clients

From
Stephan Szabo
Date:
On Thu, 8 Jul 2004, Walter wrote:

>
> "Bruce Momjian" <pgman@candle.pha.pa.us> wrote in message
> news:200407081648.i68GmYd22718@candle.pha.pa.us...
> > Walter wrote:
> > >
> > > "Bruce Momjian" <pgman@candle.pha.pa.us> wrote in message
> > > news:200407052015.i65KFWn13238@candle.pha.pa.us...
> > > >
> > > > Uh, I have never heard of Digital Mars C++.  I see it here though:
> > > >
> > > > http://www.digitalmars.com/
> > > >
> > > > Having never had anyone who uses it, it seems this patch would be
> better
> > > > kept where users of digital Mars could find it, like on their ftp
> > > > server.   I don't think there enough usage of Digital Mars for us to
> > > > adjust our source code at this time.  Do you agree?
> > >
> > > Check out the www.download.com download statistics for DMC++, which is
> just
> > > one portal one can download it from:
> > >
> > > http://www.download.com/sort/3150-2069-0-1-5.html?
> >
> > Looks good, but we have had no requests for it prior to this, and your
> > additions aren't trivial.  You also mentioned it doesn't have popen,
> > meaning it might still be in a state of flux, meaning we would have to
> > continue adjusting our patch --- for a compiler no one has asked about.
>
> Hans Oesterholt-Dijkema, who wrote the patch, is not affiliated with Digital
> Mars. But it's been my experience that any requests for a feature tend to be
> a tiny tip of the iceberg, 99% will just silently walk away from your
> product if it doesn't do X. And you *do* have a request, from someone who
> obviously cared enough to write a non-trivial patch for your product.

Well, to be included in the core tree implies that we have some level of
confidence in the patch and some plan for maintaining it.

On the first, now that I've looked at it.  I'm a little worried about a
couple of pieces.

In the first #ifdef block of the patch, fopen is called with a file whose
name is known to start with a | character, is that really going to work?
Does DMC handle this case in some fashion? Just removing the | isn't going
to be good either since the user presumably asked for an executable after
that |.  This should almost certainly be an error, not an offer to do
something else.

I also think that warnings should be happening at places like \pset pager
since quietly allowing a user to turn on the non-usable pager seems bad to
me.

I'm not sure this is necessarily the right way to approach the patch in
the first place.  It might be better to make a port file with a
popen/pclose implementation (even if it simply acts as a failed open and
does nothing on close). This gets into maintenance issues as well. The
patch as is basically requires that anyone who is modifying psql know and
take care to wrap popen/pclose calls. I'm not sure that it's sufficiently
maintainable at the moment without DMC users around to keep it honest.

Re: Digital Mars C++ - Clients

From
"Walter"
Date:
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> wrote in message
news:40EDF8A7.5050309@familyhealth.com.au...
> > Other products, such as wxWindows, have seen quite a lot of Digital Mars
> > users embrace it once it started supporting DMC++.
>
> That is an extremely poor allegory.  wxWindows is a GUI TOOLKIT.
> PostgreSQL is an independent database server.  99.999% of our windows
> installations will be from the binary that we will be distributing.

There seem to be enough developers working with the source to keep this
newsgroup busy. <g>



Re: Digital Mars C++ - Clients

From
Tom Lane
Date:
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> I'm not sure this is necessarily the right way to approach the patch in
> the first place.  It might be better to make a port file with a
> popen/pclose implementation (even if it simply acts as a failed open and
> does nothing on close). This gets into maintenance issues as well. The
> patch as is basically requires that anyone who is modifying psql know and
> take care to wrap popen/pclose calls. I'm not sure that it's sufficiently
> maintainable at the moment without DMC users around to keep it honest.

I think Stephan is dead on here ... the patch as given is not
maintainable.  Even if there were enough DMC users around to catch
errors of this sort (a fact not in evidence), it's generally impolite
for platforms to expect everyone else to cope with their limitations.
A platform-specific coding of popen/pclose sounds much better.

            regards, tom lane