Mail Archives: djgpp-workers/1997/10/22/05:13:28
This is a multi-part message in MIME format.
--------------355636BB2137
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I've got again a few patches, that avoid the compiler to generate
warnings for some situations:
- all redundant declarations were removed (in header files and src/*)
- the exec[vl][ep] functions are declared in both unistd.h and
process.h. I added a #ifndef construct to avoid that they are both
processed when the user includes both header files. I hope I did this
right. Anyone?
Applying the patch:
Make sure you have installed all include/* and all src/* files in the
$(DJDIR) directory or similar.
Change to the $(DJDIR) directory
Then apply the patch:
patch -p1 < fname
That's all folks.
--
+----------------+
| Vik Heyndrickx |
+----------------+
--------------355636BB2137
Content-Type: text/plain; charset=us-ascii; name="src02_03.dif"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="src02_03.dif"
diff -u -r -N 02/include/math.h 03/include/math.h
--- 02/include/math.h Tue Sep 10 02:28:04 1996
+++ 03/include/math.h Wed Oct 22 00:09:50 1997
@@ -58,10 +58,6 @@
#define PI M_PI
#define PI2 M_PI_2
-double acosh(double _a);
-double asinh(double _a);
-double atanh(double _a);
-double hypot(double _x, double _y);
double log2(double _x);
long double modfl(long double _x, long double *_pint);
double pow10(double _x);
diff -u -r -N 02/include/process.h 03/include/process.h
--- 02/include/process.h Sun Nov 19 06:42:00 1995
+++ 03/include/process.h Wed Oct 22 00:18:46 1997
@@ -14,14 +14,18 @@
int _dos_exec(const char *program, const char *args, char *const _envp[]);
+/* The following #if is necessary because these exec[lv]* functions are also
+ declared in unistd.h */
+#ifndef _EXEC_LEP_PROTO
+#define _EXEC_LEP_PROTO
int execl(const char *_path, const char *_argv0, ...);
int execle(const char *_path, const char *_argv0, ... /*, char *const _envp[] */);
int execlp(const char *_path, const char *_argv0, ...);
-int execlpe(const char *_path, const char *_argv0, ... /*, char *const _envp[] */);
-
int execv(const char *_path, char *const _argv[]);
int execve(const char *_path, char *const _argv[], char *const _envp[]);
int execvp(const char *_path, char *const _argv[]);
+#endif /* _EXEC_LEP_PROTO */
+int execlpe(const char *_path, const char *_argv0, ... /*, char *const _envp[] */);
int execvpe(const char *_path, char *const _argv[], char *const _envp[]);
int spawnl(int _mode, const char *_path, const char *_argv0, ...);
diff -u -r -N 02/include/unistd.h 03/include/unistd.h
--- 02/include/unistd.h Sun Oct 6 02:34:18 1996
+++ 03/include/unistd.h Wed Oct 22 00:18:38 1997
@@ -76,12 +76,17 @@
char * ctermid(char *_s);
int dup(int _fildes);
int dup2(int _fildes, int _fildes2);
-int execl(const char *_path, const char *_arg, ...);
-int execle(const char *_path, const char *_arg, ...);
-int execlp(const char *_file, const char *_arg, ...);
-int execv(const char *_path, char *const _argv[]);
-int execve(const char *_path, char *const _argv[], char *const _envp[]);
-int execvp(const char *_file, char *const _argv[]);
+/* The following #if is necessary because these exec[lv]* functions are also
+ declared in process.h */
+#ifndef _EXEC_LEP_PROTO
+#define _EXEC_LEP_PROTO
+int execl(const char *_path, const char *_argv0, ...);
+int execle(const char *_path, const char *_argv0, ... /*, char *const _envp[] */);
+int execlp(const char *_path, const char *_argv0, ...);
+int execv(const char *_path, char *const _argv[]);
+int execve(const char *_path, char *const _argv[], char *const _envp[]);
+int execvp(const char *_path, char *const _argv[]);
+#endif /* _EXEC_LEP_PROTO */
pid_t fork(void);
long fpathconf(int _fildes, int _name);
char * getcwd(char *_buf, size_t _size);
diff -u -r -N 02/src/libc/crt0/crt1.c 03/src/libc/crt0/crt1.c
--- 02/src/libc/crt0/crt1.c Sun Aug 31 22:00:56 1997
+++ 03/src/libc/crt0/crt1.c Wed Oct 22 00:22:48 1997
@@ -126,7 +126,6 @@
strcpy(__dos_argv0, cp+3);
}
-extern void __main(void);
extern int main(int, char **, char **);
extern void _crt0_init_mcount(void); /* For profiling */
diff -u -r -N 02/src/libc/crt0/mcount.c 03/src/libc/crt0/mcount.c
--- 02/src/libc/crt0/mcount.c Sun Aug 31 05:20:48 1997
+++ 03/src/libc/crt0/mcount.c Wed Oct 22 00:24:48 1997
@@ -146,7 +146,6 @@
extern unsigned start __asm__ ("start");
#define START (unsigned)&start
-extern int etext;
/* ARGSUSED */
static void
diff -u -r -N 02/src/libc/posix/sys/stat/fstat.c 03/src/libc/posix/sys/stat/fstat.c
--- 02/src/libc/posix/sys/stat/fstat.c Sun Aug 31 20:31:32 1997
+++ 03/src/libc/posix/sys/stat/fstat.c Wed Oct 22 00:35:54 1997
@@ -103,6 +103,7 @@
#include <dpmi.h>
#include <go32.h>
+#include <dos.h>
#include <libc/farptrgs.h>
#include <libc/bss.h>
diff -u -r -N 02/src/libc/posix/sys/stat/stat.c 03/src/libc/posix/sys/stat/stat.c
--- 02/src/libc/posix/sys/stat/stat.c Sun Aug 31 19:08:42 1997
+++ 03/src/libc/posix/sys/stat/stat.c Wed Oct 22 00:34:20 1997
@@ -115,10 +115,6 @@
#include "xstat.h"
-int __getdisk(void);
-int __findfirst(const char *, struct ffblk *, int);
-int __findnext(struct ffblk *);
-
#define ALL_FILES (FA_RDONLY|FA_HIDDEN|FA_SYSTEM|FA_DIREC|FA_ARCH)
#define _STAT_INODE 1 /* should we bother getting inode numbers? */
diff -u -r -N 02/src/libc/posix/sys/stat/xstat.h 03/src/libc/posix/sys/stat/xstat.h
--- 02/src/libc/posix/sys/stat/xstat.h Tue Aug 13 04:58:18 1996
+++ 03/src/libc/posix/sys/stat/xstat.h Wed Oct 22 00:34:00 1997
@@ -34,9 +34,6 @@
#define MAX_TRUE_NAME FILENAME_MAX
-extern unsigned short _osmajor, _osminor;
-extern const char * _os_flavor;
-
/* Bits to flag f?stat() failed to use individual undocumented features. */
#define _STFAIL_SDA 1 /* Get SDA call failed */
#define _STFAIL_OSVER 2 /* Unsupported DOS version */
@@ -51,21 +48,12 @@
#define _STFAIL_SFTIDX 0x400 /* bad SFT index in JFT */
#define _STFAIL_SFTNF 0x800 /* file entry not found in SFT array */
-extern unsigned short _djstat_fail_bits;
-
-extern unsigned short _djstat_flags;
-
extern time_t _file_time_stamp(unsigned int);
extern ino_t _invent_inode(const char *, unsigned, unsigned long);
-extern unsigned short _get_magic(const char *, int);
-extern unsigned short _get_dos_version(int);
-extern char * _truename(const char *, char *);
extern int _is_remote_drive(int);
-extern int _is_executable(const char *, int, const char *);
extern short _get_dev_info(int);
extern long __filelength(int);
extern int _is_remote_handle(int);
-extern void _djstat_describe_lossage(FILE *);
extern int _getftime(int, unsigned int *);
#endif /* __XSTAT_H */
--------------355636BB2137--
- Raw text -