home *** CD-ROM | disk | FTP | other *** search
- Return-Path: ljo@vger.EEAP.CWRU.Edu
- Return-Path: <ljo@vger.EEAP.CWRU.Edu>
- Received: from vger.EEAP.CWRU.Edu by cygnus.com (4.1/SMI-4.1)
- id AA12995; Sat, 12 Jun 93 07:05:29 PDT
- Received: by vger.EEAP.CWRU.Edu (4.1/CWRU-1.4-client)
- id AA04326; Sat, 12 Jun 93 09:29:22 EDT (from ljo for ljo@r2d2.EEAP.CWRU.Edu)
- Message-Id: <9306121329.AA04326@vger.EEAP.CWRU.Edu>
- Date: Sat, 12 Jun 93 09:29:22 EDT
- From: L Jonas Olsson <ljo@vger.EEAP.CWRU.Edu>
- To: bothner@cygnus.com
- Cc: ljo@vger.EEAP.CWRU.Edu, ats@bsd386.first.gmd.de
- Subject: libg++-2.3.90, complete 386BSD diffs
-
-
-
- Hej Per,
- Here are the complete diffs to make libg++-2.3.90 on 386BSD-0.1.
- I made it with gcc-2.4.3 snapshot 930604, and it passes all tests.
- (that's something new for 386BSD!)
-
- The diffs fixes:
-
- - libg++/g++-include/grp.h, libg++/g++-include/memory.h,
- libg++/g++-include/signal.h, libg++/g++-include/stdio.h,
- libg++/g++-include/sys/socket.h, libg++/g++-include/sys/wait.h,
- libg++/g++-include/time.h, libg++/g++-include/unistd.h.
- Made compatible with 386BSD's include files
- - libg++/iostream/procbuf.C. Made vfork compatible with 386BSD.
- - libg++/iostream/stdio/stdio.h. NET-2 has a special way of
- typedef'ing size_t.
- - libg++/src/Complex.h, libg++/src/Complex.cc. Moved the
- multiplication operator into the .cc file. Having it inline
- made tComplex fail.
- - libg++/utils/gen-params. For 386BSD we define ${macro_prefix}USE_PROTOS.
- The way it's done is ugly, how should it be done?
-
- I think that even though the include file diffs are long they should
- be included, as they will not break anything and the number of 386BSD
- users is pretty high. The include file diffs are basically the same
- as for libg++-2.2 and 2.3.
-
- If you still think that the include file diffs are to long, an alternative
- could be to include the complete diff file (after some modifications perhaps)
- in the distribution. Or in worst case have it be a separate file on prep.
-
- Jonas Olsson
- ljo@po.cwru.edu
-
- diff -rc libg++-2.3.90/libg++/g++-include/grp.h libg++-2.3.90.new/libg++/g++-include/grp.h
- *** libg++-2.3.90/libg++/g++-include/grp.h Wed Nov 18 00:47:13 1992
- --- libg++-2.3.90.new/libg++/g++-include/grp.h Thu Jun 10 23:30:39 1993
- ***************
- *** 28,34 ****
- extern struct group* fgetgrent(FILE*);
- extern struct group* getgrgid(int);
- extern struct group* getgrnam(const char*);
- ! #ifdef __OSF1__
- extern int setgrent();
- #else
- extern void setgrent();
- --- 28,34 ----
- extern struct group* fgetgrent(FILE*);
- extern struct group* getgrgid(int);
- extern struct group* getgrnam(const char*);
- ! #if defined(__OSF1__) || defined (__386BSD__)
- extern int setgrent();
- #else
- extern void setgrent();
- diff -rc libg++-2.3.90/libg++/g++-include/memory.h libg++-2.3.90.new/libg++/g++-include/memory.h
- *** libg++-2.3.90/libg++/g++-include/memory.h Wed Nov 18 00:47:14 1992
- --- libg++-2.3.90.new/libg++/g++-include/memory.h Thu Jun 10 23:30:39 1993
- ***************
- *** 15,21 ****
- void* memmove _G_ARGS((void*, const void*, _G_size_t));
- void* memset _G_ARGS((void*, int, _G_size_t));
- int ffs _G_ARGS((int));
- ! #ifdef __OSF1__
- int getpagesize _G_ARGS((void));
- #else
- _G_size_t getpagesize _G_ARGS((void));
- --- 15,21 ----
- void* memmove _G_ARGS((void*, const void*, _G_size_t));
- void* memset _G_ARGS((void*, int, _G_size_t));
- int ffs _G_ARGS((int));
- ! #if defined(__OSF1__) || defined(__386BSD__)
- int getpagesize _G_ARGS((void));
- #else
- _G_size_t getpagesize _G_ARGS((void));
- diff -rc libg++-2.3.90/libg++/g++-include/signal.h libg++-2.3.90.new/libg++/g++-include/signal.h
- *** libg++-2.3.90/libg++/g++-include/signal.h Wed Aug 12 03:44:52 1992
- --- libg++-2.3.90.new/libg++/g++-include/signal.h Thu Jun 10 23:30:39 1993
- ***************
- *** 45,51 ****
- extern SSignalHandler ssignal _G_ARGS((int sig, SSignalHandler action));
- extern int gsignal _G_ARGS((int sig));
- extern int kill _G_ARGS((_G_pid_t pid, int sig));
- ! extern int killpg _G_ARGS((int, int));
- extern int siginterrupt _G_ARGS((int, int));
- extern void psignal _G_ARGS((unsigned, const char*));
-
- --- 45,55 ----
- extern SSignalHandler ssignal _G_ARGS((int sig, SSignalHandler action));
- extern int gsignal _G_ARGS((int sig));
- extern int kill _G_ARGS((_G_pid_t pid, int sig));
- ! #ifndef __386BSD__
- ! extern int killpg _G_ARGS((short int, int));
- ! #else
- ! extern int killpg _G_ARGS((_G_pid_t, int));
- ! #endif
- extern int siginterrupt _G_ARGS((int, int));
- extern void psignal _G_ARGS((unsigned, const char*));
-
- diff -rc libg++-2.3.90/libg++/g++-include/stdio.h libg++-2.3.90.new/libg++/g++-include/stdio.h
- *** libg++-2.3.90/libg++/g++-include/stdio.h Fri Apr 16 19:21:13 1993
- --- libg++-2.3.90.new/libg++/g++-include/stdio.h Thu Jun 10 23:30:40 1993
- ***************
- *** 115,121 ****
- --- 115,125 ----
- FILE* fdopen(int, const char*);
- int fflush(FILE*);
- int fgetc(FILE*);
- + #ifndef __386BSD__
- char* fgets _G_ARGS((char*, int, FILE *));
- + #else
- + char* fgets _G_ARGS((char*, _G_size_t, FILE *));
- + #endif
- FILE* fopen(const char*, const char*);
- int fprintf(FILE*, const char* ...);
- int fputc(int, FILE*);
- diff -rc libg++-2.3.90/libg++/g++-include/sys/socket.h libg++-2.3.90.new/libg++/g++-include/sys/socket.h
- *** libg++-2.3.90/libg++/g++-include/sys/socket.h Thu Nov 12 18:55:19 1992
- --- libg++-2.3.90.new/libg++/g++-include/sys/socket.h Thu Jun 10 23:30:40 1993
- ***************
- *** 19,29 ****
- #define __libgxx_sys_socket_h 1
-
- // void* in select, since different systems use int* or fd_set*
- int select _G_ARGS((int, void*, void*, void*, struct timeval*));
-
- - int accept _G_ARGS((int, struct sockaddr*, int*));
- int bind _G_ARGS((int, const void*, int));
- int connect _G_ARGS((int, struct sockaddr*, int));
- int getsockname _G_ARGS((int, struct sockaddr*, int*));
- int getpeername _G_ARGS((int, struct sockaddr*, int*));
- int getsockopt(int, int, int, void*, int*);
- --- 19,36 ----
- #define __libgxx_sys_socket_h 1
-
- // void* in select, since different systems use int* or fd_set*
- + int accept _G_ARGS((int, struct sockaddr*, int*));
- + #ifndef __386BSD__
- int select _G_ARGS((int, void*, void*, void*, struct timeval*));
-
- int bind _G_ARGS((int, const void*, int));
- int connect _G_ARGS((int, struct sockaddr*, int));
- + #else
- + int select _G_ARGS((int, struct fd_set*, struct fd_set*, struct fd_set*, struct timeval*));
- +
- + int bind _G_ARGS((int, const struct sockaddr *, int));
- + int connect _G_ARGS((int, const struct sockaddr*, int));
- + #endif
- int getsockname _G_ARGS((int, struct sockaddr*, int*));
- int getpeername _G_ARGS((int, struct sockaddr*, int*));
- int getsockopt(int, int, int, void*, int*);
- ***************
- *** 32,48 ****
- int rcmd _G_ARGS((char**, int, const char*, const char*, const char*, int*));
- #endif
- int recv(int, void*, int, int);
- - int recvfrom _G_ARGS((int, void*, int, int, void*, int *));
- int recvmsg(int, struct msghdr*, int);
- int rexec(char**, int, const char*, const char*, const char*, int*);
- int rresvport(int*);
- int send _G_ARGS((int, const void*, int, int));
- - int sendto _G_ARGS((int, const void*, int, int, void*, int));
- int sendmsg _G_ARGS((int, const struct msghdr*, int));
- - int setsockopt _G_ARGS((int, int, int, const char*, int));
- int shutdown(int, int);
- int socket(int, int, int);
- int socketpair(int, int, int, int sv[2]);
- #endif
- }
-
- --- 39,62 ----
- int rcmd _G_ARGS((char**, int, const char*, const char*, const char*, int*));
- #endif
- int recv(int, void*, int, int);
- int recvmsg(int, struct msghdr*, int);
- int rexec(char**, int, const char*, const char*, const char*, int*);
- int rresvport(int*);
- int send _G_ARGS((int, const void*, int, int));
- int sendmsg _G_ARGS((int, const struct msghdr*, int));
- int shutdown(int, int);
- int socket(int, int, int);
- int socketpair(int, int, int, int sv[2]);
- +
- + #ifndef __386BSD__
- + int recvfrom _G_ARGS((int, void*, int, int, void*, int *));
- + int sendto _G_ARGS((int, const void*, int, int, void*, int));
- + int setsockopt _G_ARGS((int, int, int, const char*, int));
- + #else
- + int recvfrom _G_ARGS((int, void*, int, int, struct sockaddr*, int *));
- + int sendto _G_ARGS((int, const void*, int, int, const struct sockaddr*, int));
- + int setsockopt _G_ARGS((int, int, int, const void*, int));
- + #endif
- #endif
- }
-
- diff -rc libg++-2.3.90/libg++/g++-include/sys/wait.h libg++-2.3.90.new/libg++/g++-include/sys/wait.h
- *** libg++-2.3.90/libg++/g++-include/sys/wait.h Thu Jun 4 02:23:06 1992
- --- libg++-2.3.90.new/libg++/g++-include/sys/wait.h Thu Jun 10 23:30:40 1993
- ***************
- *** 31,37 ****
- --- 31,41 ----
- extern _G_pid_t wait _G_ARGS((int*));
- extern _G_pid_t waitpid _G_ARGS((_G_pid_t, int*, int));
- extern _G_pid_t wait3 _G_ARGS((int*, int options, struct rusage*));
- + #ifndef __386BSD__
- extern _G_pid_t wait4 _G_ARGS((int, int*, int, struct rusage*));
- + #else
- + extern _G_pid_t wait4 _G_ARGS((_G_pid_t, int*, int, struct rusage*));
- + #endif
- #endif
- }
-
- diff -rc libg++-2.3.90/libg++/g++-include/time.h libg++-2.3.90.new/libg++/g++-include/time.h
- *** libg++-2.3.90/libg++/g++-include/time.h Mon May 3 17:35:18 1993
- --- libg++-2.3.90.new/libg++/g++-include/time.h Thu Jun 10 23:30:40 1993
- ***************
- *** 95,102 ****
- #endif
- _G_time_t time(_G_time_t*);
- unsigned ualarm(unsigned, unsigned);
- ! unsigned usleep(unsigned);
- ! void profil _G_ARGS((unsigned short*, _G_size_t, unsigned int, unsigned));
-
- #endif
- }
- --- 95,107 ----
- #endif
- _G_time_t time(_G_time_t*);
- unsigned ualarm(unsigned, unsigned);
- ! #ifndef __386BSD__
- ! unsigned usleep(unsigned);
- ! void profil _G_ARGS((unsigned short*, _G_size_t, unsigned int, unsigned));
- ! #else
- ! void usleep(unsigned);
- ! int profil _G_ARGS((char*, int, int, int));
- ! #endif
-
- #endif
- }
- diff -rc libg++-2.3.90/libg++/g++-include/unistd.h libg++-2.3.90.new/libg++/g++-include/unistd.h
- *** libg++-2.3.90/libg++/g++-include/unistd.h Sun May 30 19:50:01 1993
- --- libg++-2.3.90.new/libg++/g++-include/unistd.h Thu Jun 10 23:30:41 1993
- ***************
- *** 65,71 ****
- --- 65,75 ----
- #endif
-
- extern unsigned alarm _G_ARGS((unsigned));
- + #ifndef __386BSD__
- extern int brk _G_ARGS((void*));
- + #else
- + extern char* brk _G_ARGS((const char*));
- + #endif
- extern int chdir _G_ARGS((const char*));
- extern int chmod _G_ARGS((const char*, _G_mode_t));
- extern int chown (const char*, _G_uid_t, _G_gid_t);
- ***************
- *** 73,87 ****
- --- 77,103 ----
- extern char* crypt _G_ARGS((const char*, const char*));
- extern int dup _G_ARGS((int));
- extern int dup2 _G_ARGS((int, int));
- + #ifndef __386BSD__
- extern void encrypt _G_ARGS((char*, int));
- + #else
- + extern int encrypt _G_ARGS((char*, int));
- + #endif
- extern int execl (const char*, const char *, ...);
- extern int execle (const char*, const char *, ...);
- extern int execlp (const char*, const char*, ...);
- + #ifndef __386BSD__
- extern int exect _G_ARGS((const char*, const char**, char**));
- extern int execv _G_ARGS((const char*, const char * const *));
- extern int execve _G_ARGS((const char*, const char * const *, const char * const *));
- extern int execvp _G_ARGS((const char*, const char * const *));
- extern int fchown (int, _G_uid_t, _G_gid_t);
- + #else
- + extern int exect _G_ARGS((const char*, char * const*, char * const *));
- + extern int execv _G_ARGS((const char*, char * const *));
- + extern int execve _G_ARGS((const char*, char * const *, char * const *));
- + extern int execvp _G_ARGS((const char*, char * const *));
- + extern int fchown (int, int, int);
- + #endif
- extern _G_pid_t fork _G_ARGS((void));
- extern int fsync _G_ARGS((int));
- extern int ftruncate _G_ARGS((int, _G_off_t));
- ***************
- *** 88,94 ****
- --- 104,114 ----
- extern char* getcwd _G_ARGS((char*, _G_size_t));
- extern int getdomainname _G_ARGS((char*, int));
- extern int getdtablesize _G_ARGS((void));
- + #ifndef __386BSD__
- extern int getgroups _G_ARGS((int, _G_gid_t*));
- + #else
- + extern int getgroups _G_ARGS((int, int*));
- + #endif
- extern _G_uid_t geteuid _G_ARGS((void));
- extern _G_gid_t getegid _G_ARGS((void));
- extern _G_gid_t getgid _G_ARGS((void));
- ***************
- *** 100,106 ****
- --- 120,130 ----
- extern char* getlogin _G_ARGS((void));
- extern char* getpass _G_ARGS((const char*));
- extern _G_uid_t getuid _G_ARGS((void));
- + #ifndef __386BSD__
- extern int ioctl (int, int, ... );
- + #else
- + extern int ioctl (int, unsigned long, ... );
- + #endif
- extern int isatty _G_ARGS((int));
- extern int link _G_ARGS((const char*, const char*));
- extern int lockf _G_ARGS((int, int, long));
- ***************
- *** 112,118 ****
- extern int readlink _G_ARGS((const char*, char*, int));
- extern int rename _G_ARGS((const char*, const char*));
- extern int rmdir _G_ARGS((const char*));
- ! #ifdef __OSF1__
- extern char* sbrk _G_ARGS((int));
- #else
- extern void* sbrk _G_ARGS((int));
- --- 136,142 ----
- extern int readlink _G_ARGS((const char*, char*, int));
- extern int rename _G_ARGS((const char*, const char*));
- extern int rmdir _G_ARGS((const char*));
- ! #if defined( __OSF1__ ) || defined (__386BSD__)
- extern char* sbrk _G_ARGS((int));
- #else
- extern void* sbrk _G_ARGS((int));
- ***************
- *** 124,131 ****
- --- 148,160 ----
- extern _G_pid_t setpgrp _G_ARGS((void));
- extern _G_pid_t setsid _G_ARGS((void));
- #else
- + #ifndef __386BSD__
- extern _G_pid_t setpgrp _G_ARGS((_G_pid_t, _G_pid_t));
- + #else
- + extern _G_pid_t setsid _G_ARGS((void));
- + extern int setpgrp _G_ARGS((_G_pid_t, _G_pid_t));
- #endif
- + #endif
- extern int setregid _G_ARGS((int, int));
- extern int setreuid _G_ARGS((int, int));
- extern int setuid (_G_uid_t);
- ***************
- *** 138,144 ****
- --- 167,177 ----
- extern int ttyslot _G_ARGS((void));
- //extern int umask _G_ARGS((int)); /* commented out for now; wrong for SunOs4.1 */
- extern int unlink _G_ARGS((const char*));
- + #ifndef __386BSD__
- extern _G_pid_t vfork _G_ARGS((void));
- + #else
- + extern int vfork _G_ARGS((void));
- + #endif
- extern int vadvise _G_ARGS((int));
- extern int vhangup _G_ARGS((void));
- extern _G_off_t lseek _G_ARGS((int, long, int));
- diff -rc libg++-2.3.90/libg++/iostream/procbuf.C libg++-2.3.90.new/libg++/iostream/procbuf.C
- *** libg++-2.3.90/libg++/iostream/procbuf.C Fri May 28 18:58:04 1993
- --- libg++-2.3.90.new/libg++/iostream/procbuf.C Thu Jun 10 23:30:41 1993
- ***************
- *** 25,31 ****
- --- 25,35 ----
-
- #ifndef FORK
- #define FORK vfork
- + #ifndef __386BSD__
- extern "C" _G_pid_t vfork(void);
- + #else
- + extern "C" int vfork(void);
- + #endif
- #endif
-
- procbuf::procbuf(const char *command, int mode) : filebuf()
- diff -rc libg++-2.3.90/libg++/iostream/stdio/stdio.h libg++-2.3.90.new/libg++/iostream/stdio/stdio.h
- *** libg++-2.3.90/libg++/iostream/stdio/stdio.h Fri May 28 19:06:42 1993
- --- libg++-2.3.90.new/libg++/iostream/stdio/stdio.h Thu Jun 10 23:30:41 1993
- ***************
- *** 49,58 ****
- #include <stdarg.h>
- #endif
-
- /* define size_t. Crud in case <sys/types.h> has defined it. */
- #if !defined(_SIZE_T) && !defined(_T_SIZE_) && !defined(_T_SIZE)
- #if !defined(__SIZE_T) && !defined(_SIZE_T_) && !defined(___int_size_t_h)
- ! #if !defined(_GCC_SIZE_T) && !defined(_SIZET_)
- #define _SIZE_T
- #define _T_SIZE_
- #define _T_SIZE
- --- 49,66 ----
- #include <stdarg.h>
- #endif
-
- + #ifdef __386BSD__
- + #include <machine/ansi.h>
- + #ifdef _SIZE_T_
- + typedef _SIZE_T_ size_t;
- + #undef _SIZE_T_
- + #endif
- + #endif
- +
- /* define size_t. Crud in case <sys/types.h> has defined it. */
- #if !defined(_SIZE_T) && !defined(_T_SIZE_) && !defined(_T_SIZE)
- #if !defined(__SIZE_T) && !defined(_SIZE_T_) && !defined(___int_size_t_h)
- ! #if !defined(_GCC_SIZE_T) && !defined(_SIZET_) && !defined(_ANSI_H_)
- #define _SIZE_T
- #define _T_SIZE_
- #define _T_SIZE
- diff -rc libg++-2.3.90/libg++/src/Complex.cc libg++-2.3.90.new/libg++/src/Complex.cc
- *** libg++-2.3.90/libg++/src/Complex.cc Tue Jun 1 19:17:26 1993
- --- libg++-2.3.90.new/libg++/src/Complex.cc Thu Jun 10 23:30:42 1993
- ***************
- *** 254,256 ****
- --- 254,262 ----
- return s;
- }
-
- + Complex operator * (const Complex& x, const Complex& y)
- + {
- + return Complex(x.real() * y.real() - x.imag() * y.imag(),
- + x.real() * y.imag() + x.imag() * y.real());
- + }
- +
- diff -rc libg++-2.3.90/libg++/src/Complex.h libg++-2.3.90.new/libg++/src/Complex.h
- *** libg++-2.3.90/libg++/src/Complex.h Tue Jun 1 19:17:30 1993
- --- libg++-2.3.90.new/libg++/src/Complex.h Thu Jun 10 23:30:42 1993
- ***************
- *** 227,238 ****
- return Complex(x - y.real(), -y.imag());
- }
-
- - inline Complex operator * (const Complex& x, const Complex& y)
- - {
- - return Complex(x.real() * y.real() - x.imag() * y.imag(),
- - x.real() * y.imag() + x.imag() * y.real());
- - }
- -
- inline Complex operator * (const Complex& x, double y)
- {
- return Complex(x.real() * y, x.imag() * y);
- --- 227,232 ----
- diff -rc libg++-2.3.90/libg++/utils/gen-params libg++-2.3.90.new/libg++/utils/gen-params
- *** libg++-2.3.90/libg++/utils/gen-params Tue Jun 1 19:58:41 1993
- --- libg++-2.3.90.new/libg++/utils/gen-params Fri Jun 11 23:51:34 1993
- ***************
- *** 310,315 ****
- --- 310,328 ----
- #define ${macro_prefix}NULL ${NULL-0 /* default */}
- !EOF!
-
- + cat >dummy.c <<!EOF!
- + #if !defined (__386BSD__)
- + this should fail
- + #endif
- + main()
- + {}
- + !EOF!
- +
- + if ${CC} -c dummy.c >/dev/null 2>&1 ; then
- + echo "#define ${macro_prefix}USE_PROTOS"
- + else
- + echo "/* #define ${macro_prefix}USE_PROTOS */"
- + fi
-
- cat <<!EOF!
- #ifdef ${macro_prefix}USE_PROTOS
-