Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4f4edb8

Browse files
committed
Thanks to Vince Vielhaber <vev@michvhf.com>Here is an os2 psql client, with libpq.a library
1 parent5854421 commit4f4edb8

File tree

7 files changed

+998
-0
lines changed

7 files changed

+998
-0
lines changed

‎contrib/os2client/Makefile

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
#-------------------------------------------------------------------------
2+
#
3+
# Makefile
4+
# Makefile for libpq library
5+
#
6+
# Copyright (c) 1994, Regents of the University of California
7+
#
8+
#
9+
# IDENTIFICATION
10+
# $Header: /cvsroot/pgsql/contrib/os2client/Attic/Makefile,v 1.1 1998/10/31 04:10:52 scrappy Exp $
11+
#
12+
#-------------------------------------------------------------------------
13+
14+
SO_MAJOR_VERSION=1
15+
SO_MINOR_VERSION=1
16+
17+
SRCDIR= ../../src
18+
19+
INTERFACES=$(SRCDIR)/interfaces/libpq
20+
21+
PORTNAME=OS2
22+
23+
CC=gcc
24+
CFLAGS=-I. -I$(SRCDIR)/include
25+
CFLAGS+=-DFRONTEND -DTCPIPV4 -DHAVE_CRYPT_H
26+
27+
CP= copy
28+
29+
AR=ar
30+
31+
AROPT=rc
32+
33+
RANLIB= ar s
34+
35+
LDFLAGS= -L.
36+
37+
OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-lobj.o fe-print.o \
38+
dllist.o pqsignal.o pqcomprim.o
39+
40+
EXEOBJS= psql.o stringutils.o
41+
42+
all: libpq.a c.h psql
43+
44+
fe-auth.o:$(INTERFACES)/fe-auth.c
45+
$(CC)$(CFLAGS) -c$(INTERFACES)/fe-auth.c
46+
47+
fe-connect.o:$(INTERFACES)/fe-connect.c
48+
$(CC)$(CFLAGS) -c$(INTERFACES)/fe-connect.c
49+
50+
fe-exec.o:$(INTERFACES)/fe-exec.c
51+
$(CC)$(CFLAGS) -c$(INTERFACES)/fe-exec.c
52+
53+
fe-lobj.o:$(INTERFACES)/fe-lobj.c
54+
$(CC)$(CFLAGS) -c$(INTERFACES)/fe-lobj.c
55+
56+
fe-misc.o:$(INTERFACES)/fe-misc.c
57+
$(CC)$(CFLAGS) -c$(INTERFACES)/fe-misc.c
58+
59+
fe-print.o:$(INTERFACES)/fe-print.c
60+
$(CC)$(CFLAGS) -c$(INTERFACES)/fe-print.c
61+
62+
pqsignal.o:$(INTERFACES)/pqsignal.c
63+
$(CC)$(CFLAGS) -c$(INTERFACES)/pqsignal.c
64+
65+
dllist.o:$(SRCDIR)/backend/lib/dllist.c
66+
$(CC)$(CFLAGS) -c$(SRCDIR)/backend/lib/dllist.c
67+
68+
pqcomprim.o:$(SRCDIR)/backend/libpq/pqcomprim.c
69+
$(CC)$(CFLAGS) -c$(SRCDIR)/backend/libpq/pqcomprim.c
70+
71+
libpq.a:$(OBJS)
72+
$(AR)$(AROPT) libpq.a$(OBJS)
73+
$(RANLIB) libpq.a
74+
75+
psql:$(EXEOBJS)
76+
$(CC) -o psql.exe$(EXEOBJS)$(LDFLAGS) -llibpq -lsocket -lufc
77+
78+
psql.o:$(SRCDIR)/bin/psql/psql.c
79+
$(CC)$(CFLAGS) -I$(INTERFACES) -c$(SRCDIR)/bin/psql/psql.c
80+
81+
stringutils.o:$(SRCDIR)/bin/psql/stringutils.c
82+
$(CC)$(CFLAGS) -I$(INTERFACES) -c$(SRCDIR)/bin/psql/stringutils.c
83+
84+
c.h:$(SRCDIR)/include/c.h
85+
rm -f c.h
86+
$(CP) portname c.h
87+
cat$(SRCDIR)/include/c.h>> c.h
88+
89+
clean:
90+
rm -f libpq.a$(OBJS)$(EXEOBJS) psql.exe c.h dllist.c pqcomprim.c
91+

‎contrib/os2client/README

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
19981029 libpq.a and psql.exe Version 6.4 for OS/2
3+
---------------------------------------------------
4+
5+
6+
Requirements:
7+
8+
emx 0.9c or newer under OS/2
9+
GNU crypt library for emx+gcc version 2.0.6 (available from
10+
ftp://ftp.leo.org/pub/comp/os/os2/leo/crypt/gnuufc.zip)
11+
12+
13+
Also a patch is needed for sys/socket.h around line 291. The lines
14+
with the pluses need to be added, the other lines are already there
15+
and are only for reference:
16+
17+
18+
#define MT_IFADDR 13
19+
20+
+#ifndef MAXSOCKETS
21+
+#define MAXSOCKETS 2048
22+
+#endif
23+
24+
struct mbstat {
25+
u_short m_mbufs;
26+
u_short m_clusters;
27+
28+
29+
Possible problems:
30+
31+
You will also need to #define TCPIPV4
32+
33+
Make sure both socket.a and ufc.a are linked in to the executable
34+
AFTER libpq.a.
35+
36+
The following include files will be needed in order to use the library.
37+
You only need to include one (libpq-fe.h) but these need to be present:
38+
39+
postgres_ext.h
40+
libpq/pqcomm.h
41+
lib/dllist.h"
42+
c.h
43+
44+
45+
Good luck and enjoy!!
46+
47+
Vince Vielhaber <vev@michvhf.com>
48+
49+
50+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp