Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

If at first you don't succeed, you must be a programmer.


devel / comp.os.msdos.djgpp / How to use pth207b.zip?

SubjectAuthor
* How to use pth207b.zip?gnufan42 (gnufan42@protonmail.com) [via djgpp@delorie.com]
`- Re: How to use pth207b.zip?mingd...@gmail.com

1
How to use pth207b.zip?

<GpsWHLVmNduvFCp7RY7_iXsLFC1zgKe2XrybOvSiJkx61mLotY5bnJ3OsOLGJOSPtc_ZBlUCWHR_QWo8eOgD0rrddWSluumhqpT8zv_jl4A=@protonmail.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=116&group=comp.os.msdos.djgpp#116

 copy link   Newsgroups: comp.os.msdos.djgpp
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 16 Nov 2021 08:55:25 -0600
X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp@delorie.com
Date: Tue, 16 Nov 2021 14:55:05 +0000
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
s=protonmail; t=1637074507;
bh=mOaztt5ejPb6GzeItXZyW5TIYa0DUY2SNUgTwG2ys6Q=;
h=Date:To:From:Reply-To:Subject:From;
b=gyBvBGVV9kADHQHGvjSsQhD50MDuqnE92ASioV5Xgru1rnelLOpcTDmjmKZR/gvpu
TfrqTyGUE+flwJb01TiQJw0fonsA90xVW2r2lmkYuojATYZnStJqaOrHLjG8nw5/vh
RG/HB6hOO1Op+wyYyq+j+0IGvnfFg7t8d17LmUQo=
To: "djgpp@delorie.com" <djgpp@delorie.com>
From: djg...@delorie.com (gnufan42 (gnufan42@protonmail.com) [via djgpp@delorie.com])
Subject: How to use pth207b.zip?
Message-ID: <GpsWHLVmNduvFCp7RY7_iXsLFC1zgKe2XrybOvSiJkx61mLotY5bnJ3OsOLGJOSPtc_ZBlUCWHR_QWo8eOgD0rrddWSluumhqpT8zv_jl4A=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
X-Spam-Status: No, score=-0.7 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,
FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT shortcircuit=no
autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
mailout.protonmail.ch
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 1AGEtBZ5013768
Reply-To: djgpp@delorie.com
Errors-To: nobody@delorie.com
X-Mailing-List: djgpp@delorie.com
X-Unsubscribes-To: listserv@delorie.com
Precedence: bulk
Newsgroups: comp.os.msdos.djgpp
Organization: None provided
DJ-Gateway: from mailing list djgpp@delorie.com
Lines: 215
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-yzg9LmfMlua8ID202mv4DhB/AyQO+jcajmDtcmnNC0b/yRHwt7x5Pvtz4kYirk+51R5Q20Dl6zK0rBJ!DosZQXkQk/1MJWQE+ZZ/1ie9gKAAQczhaNzLcHGfQppJYiZTvDjdO75QYot76FxHMDSlzijHm22w!GDf+ezOwM8vKV9J+OnPSNuIHGQVmGpd4DudbKqeL0StUUGAmYw8eXmi7TvTfSjrZfe7CWT9a5TCt!wBXj5WzHmsgBv+obN5ThGi92+tE=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 15200
 by: gnufan42 (gnufan42@p - Tue, 16 Nov 2021 14:55 UTC

I must use pthread library to port a program to DOS. I'm using cygwin and I'm cross-compiling. The djgpp-gcc cygwin provided didn't come up with the library so I downloaded pth207b.zip. I'm sure I extracted the files to correct places. After I've done that I tried to compile a simple test program, but gcc said that it can't find sys/socket.h and it is included by pthread.h. I have no idea why on earth a thread library needs network but according to the FAQ (https://www.delorie.com/djgpp/v2faq/faq22_4.html). I chose WATTCP library and downloaded tcplib.zip. Then the gcc said that it can't find sys/wtime.h. I found that file in wat3222br2.zip so I copied wat3222br2.zip/net/watt/inc to /usr/i586-msdosdjgpp/include and wat3222br2.zip/net/watt/lib to /usr/i586-msdosdjgpp/lib. I thought that should solve the problem but no. The gcc popped up with a bunch of errors about redefinition and conflicting declaration.
So what I did wrong?
Thanks,
Gnufan

$ gcc ./pth_test.c
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/socket.h:14:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:113,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/sys/osdep.h:143:16: error: redefinition of ‘struct fd_set’
typedef struct fd_set {
^
In file included from /usr/i586-pc-msdosdjgpp/include/pthread.h:111:0,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/sys/types.h:76:16: error: previous definition of ‘struct fd_set’
typedef struct fd_set {
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/socket.h:14:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:113,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/sys/osdep.h:145:3: error: conflicting declaration ‘typedef int fd_set’
} fd_set;
^
In file included from /usr/i586-pc-msdosdjgpp/include/pthread.h:111:0,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/sys/types.h:78:3: note: previous declaration as ‘typedef struct fd_set fd_set’
} fd_set;
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/select.h:6:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:117,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/tcp.h:35:22: error: conflicting declaration ‘typedef unsigned int word’
typedef unsigned int word;
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/socket.h:12:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:113,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/sys/wattcp.h:68:24: note: previous declaration as ‘typedef short unsigned int word’
typedef unsigned short word; /* 16 bits */
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/select.h:6:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:117,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/tcp.h:43:3: error: conflicting declaration ‘typedef struct tcp_Socket tcp_Socket’
} tcp_Socket;
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/socket.h:12:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:113,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/sys/wattcp.h:277:3: note: previous declaration as ‘typedef struct _tcp_socket tcp_Socket’
} tcp_Socket;
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/select.h:6:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:117,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/tcp.h:47:3: error: conflicting declaration ‘typedef struct udp_Socket udp_Socket’
} udp_Socket;
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/socket.h:12:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:113,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/sys/wattcp.h:211:3: note: previous declaration as ‘typedef struct _udp_socket udp_Socket’
} udp_Socket;
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/tcp.h:49:0,
from /usr/i586-pc-msdosdjgpp/sys-include/sys/select.h:6,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:117,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/extsock.h:5:3: error: conflicting declaration ‘typedef union sock_type sock_type’
} sock_type;
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/wattcp.h:279:0,
from /usr/i586-pc-msdosdjgpp/sys-include/sys/socket.h:12,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:113,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/extsock.h:5:3: note: previous declaration as ‘typedef union sock_type sock_type’
} sock_type;
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/tcp.h:49:0,
from /usr/i586-pc-msdosdjgpp/sys-include/sys/select.h:6,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:117,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/extsock.h:17:3: error: conflicting declaration ‘typedef struct _ext_socket _ext_socket’
} _ext_socket;
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/wattcp.h:279:0,
from /usr/i586-pc-msdosdjgpp/sys-include/sys/socket.h:12,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:113,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/extsock.h:17:3: note: previous declaration as ‘typedef struct _ext_socket _ext_socket’
} _ext_socket;
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/select.h:6:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:117,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/tcp.h:51:16: error: redefinition of ‘struct sockaddr_wat’
typedef struct sockaddr_wat {
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/socket.h:12:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:113,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/sys/wattcp.h:310:16: error: previous definition of ‘struct sockaddr_wat’
typedef struct sockaddr_wat {
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/select.h:6:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:117,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/tcp.h:58:16: error: redefinition of ‘struct in_addr’
typedef struct in_addr {
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/socket.h:9:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:113,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/sys/sockaddr.h:19:8: error: previous definition of ‘struct in_addr’
struct in_addr {
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/select.h:6:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:117,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/tcp.h:73:18: error: ambiguating new declaration of ‘int sock_init()’
extern sock_init();
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/socket.h:12:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:113,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/sys/wattcp.h:415:13: note: old declaration ‘void sock_init()’
extern void sock_init( void );
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/select.h:6:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:117,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/tcp.h:112:31: error: ambiguating new declaration of ‘int isaddr(char*)’
extern int isaddr( char *text );
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/socket.h:12:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:113,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/sys/wattcp.h:378:13: note: old declaration ‘word isaddr(char*)’
extern word isaddr( char *string );
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/select.h:6:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:117,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/tcp.h:238:23: error: ambiguating new declaration of ‘void _eth_init()’
extern void _eth_init();
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/socket.h:12:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:113,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/sys/wattcp.h:321:13: note: old declaration ‘int _eth_init()’
extern int _eth_init( void );
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/select.h:6:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:117,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/tcp.h:240:32: error: ambiguating new declaration of ‘void _eth_send(word)’
extern void _eth_send( word len);
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/socket.h:12:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:113,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/sys/wattcp.h:323:14: note: old declaration ‘int _eth_send(word)’
extern int _eth_send( word len);
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/select.h:6:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:117,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/tcp.h:259:37: error: ambiguating new declaration of ‘char* psocket(tcp_Socket*)’
extern char *psocket( tcp_Socket *s );
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/socket.h:12:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:113,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/sys/wattcp.h:401:13: note: old declaration ‘void psocket(tcp_Socket*)’
extern void psocket( tcp_Socket *s );
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/select.h:6:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:117,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/tcp.h:265:27: error: ambiguating new declaration of ‘longword gethostid()’
extern longword gethostid();
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/socket.h:12:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:113,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/sys/wattcp.h:407:6: note: old declaration ‘long int gethostid()’
long gethostid( void );
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/select.h:6:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:117,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/tcp.h:269:50: error: ambiguating new declaration of ‘char* gethostname(char*, int)’
extern char *gethostname( char *name, int length );
^
In file included from /usr/i586-pc-msdosdjgpp/include/pthread.h:116:0,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/unistd.h:172:6: note: old declaration ‘int gethostname(char*, int)’
int gethostname(char *buf, int size);
^
In file included from /usr/i586-pc-msdosdjgpp/sys-include/sys/select.h:6:0,
from /usr/i586-pc-msdosdjgpp/include/pthread.h:117,
from pth_test.cpp:2:
/usr/i586-pc-msdosdjgpp/sys-include/tcp.h:279:8: error: ‘_survivebootp’ does not name a type
extern _survivebootp;
^
pth_test.cpp: In function ‘void* {anonymous}::start_routine(void*)’:
pth_test.cpp:32:27: error: ‘nullptr’ was not declared in this scope
void* no_status = nullptr;
^
pth_test.cpp: In function ‘bool a11c()’:
pth_test.cpp:80:27: error: ‘nullptr’ was not declared in this scope
{ void* no_status = nullptr;
^


Click here to read the complete article
Re: How to use pth207b.zip?

<cb145cdd-940e-4642-acf0-96dd0eff629fn@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=117&group=comp.os.msdos.djgpp#117

 copy link   Newsgroups: comp.os.msdos.djgpp
X-Received: by 2002:a05:620a:f8b:: with SMTP id b11mr11488515qkn.81.1637130027916;
Tue, 16 Nov 2021 22:20:27 -0800 (PST)
X-Received: by 2002:a25:324d:: with SMTP id y74mr14772414yby.526.1637130027717;
Tue, 16 Nov 2021 22:20:27 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.msdos.djgpp
Date: Tue, 16 Nov 2021 22:20:27 -0800 (PST)
In-Reply-To: <GpsWHLVmNduvFCp7RY7_iXsLFC1zgKe2XrybOvSiJkx61mLotY5bnJ3OsOLGJOSPtc_ZBlUCWHR_QWo8eOgD0rrddWSluumhqpT8zv_jl4A=@protonmail.com>
Injection-Info: google-groups.googlegroups.com; posting-host=173.14.238.113; posting-account=4965IgoAAAAClMkbNOYNk_CXjMMorQi3
NNTP-Posting-Host: 173.14.238.113
References: <GpsWHLVmNduvFCp7RY7_iXsLFC1zgKe2XrybOvSiJkx61mLotY5bnJ3OsOLGJOSPtc_ZBlUCWHR_QWo8eOgD0rrddWSluumhqpT8zv_jl4A=@protonmail.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cb145cdd-940e-4642-acf0-96dd0eff629fn@googlegroups.com>
Subject: Re: How to use pth207b.zip?
From: mingdais...@gmail.com (mingd...@gmail.com)
Injection-Date: Wed, 17 Nov 2021 06:20:27 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 9
 by: mingd...@gmail.com - Wed, 17 Nov 2021 06:20 UTC

G4> I must use pthread library to port a program to DOS. ...so I downloaded
G4> pth207b.zip. ...but gcc said that it can't find sys/socket.h. I chose
G4> WATTCP library and downloaded tcplib.zip. Then the gcc said that it can't
G4> find sys/wtime.h. I found that file in wat3222br2.zip

WatTCP appears fairly incompatible, though I've had some success with
ls080s.zip dated 08jul2002 from v2tk/.

regards,
- Mdasoh Kyaeppd.

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor