summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/DynaLoader/dlutils.c2
-rw-r--r--ext/IO/lib/IO/File.pm2
-rw-r--r--ext/IO/lib/IO/Handle.pm2
-rw-r--r--ext/SDBM_File/sdbm/sdbm.c2
-rw-r--r--ext/SDBM_File/sdbm/sdbm.h38
5 files changed, 29 insertions, 17 deletions
diff --git a/ext/DynaLoader/dlutils.c b/ext/DynaLoader/dlutils.c
index 599dd37ea5..e13427a353 100644
--- a/ext/DynaLoader/dlutils.c
+++ b/ext/DynaLoader/dlutils.c
@@ -84,7 +84,7 @@ SaveError(pat, va_alist)
/* prepend underscore to s. write into buf. return buf. */
-char *
+static char *
dl_add_underscore(s, buf)
char *s;
char *buf;
diff --git a/ext/IO/lib/IO/File.pm b/ext/IO/lib/IO/File.pm
index ef9d510f91..9b3025f36d 100644
--- a/ext/IO/lib/IO/File.pm
+++ b/ext/IO/lib/IO/File.pm
@@ -43,7 +43,7 @@ IO::File - supply object methods for filehandles
=head1 DESCRIPTION
-C<IO::File> is inherits from C<IO::Handle> ans C<IO::Seekable>. It extends
+C<IO::File> inherits from C<IO::Handle> and C<IO::Seekable>. It extends
these classes with methods that are specific to file handles.
=head1 CONSTRUCTOR
diff --git a/ext/IO/lib/IO/Handle.pm b/ext/IO/lib/IO/Handle.pm
index e4abdd2ecb..4b0b93cc6f 100644
--- a/ext/IO/lib/IO/Handle.pm
+++ b/ext/IO/lib/IO/Handle.pm
@@ -169,7 +169,7 @@ module keeps a C<timeout> variable in 'io_socket_timeout'.
L<perlfunc>,
L<perlop/"I/O Operators">,
-L<POSIX/"FileHandle">
+L<FileHandle>
=head1 BUGS
diff --git a/ext/SDBM_File/sdbm/sdbm.c b/ext/SDBM_File/sdbm/sdbm.c
index d4836be671..a62334c45e 100644
--- a/ext/SDBM_File/sdbm/sdbm.c
+++ b/ext/SDBM_File/sdbm/sdbm.c
@@ -135,7 +135,7 @@ int mode;
* open the files in sequence, and stat the dirfile.
* If we fail anywhere, undo everything, return NULL.
*/
-# ifdef OS2
+#if defined(OS2) || defined(MSDOS)
flags |= O_BINARY;
# endif
if ((db->pagf = open(pagname, flags, mode)) > -1) {
diff --git a/ext/SDBM_File/sdbm/sdbm.h b/ext/SDBM_File/sdbm/sdbm.h
index 8fcdda0f9f..c05f0d0fa8 100644
--- a/ext/SDBM_File/sdbm/sdbm.h
+++ b/ext/SDBM_File/sdbm/sdbm.h
@@ -108,19 +108,6 @@ extern long sdbm_hash proto((char *, int));
# endif
#endif
-#ifdef MYMALLOC
-# ifdef HIDEMYMALLOC
-# define malloc Mymalloc
-# define realloc Myremalloc
-# define free Myfree
-# define calloc Mycalloc
-# endif
-# define safemalloc malloc
-# define saferealloc realloc
-# define safefree free
-# define safecalloc calloc
-#endif
-
#if defined(__STDC__) || defined(_AIX) || defined(__stdc__) || defined(__cplusplus)
# define STANDARD_C 1
#endif
@@ -163,6 +150,31 @@ extern long sdbm_hash proto((char *, int));
#define MEM_SIZE Size_t
+/* This comes after <stdlib.h> so we don't try to change the standard
+ * library prototypes; we'll use our own instead. */
+
+#if defined(MYMALLOC) && (defined(HIDEMYMALLOC) || defined(EMBEDMYMALLOC))
+
+# ifdef HIDEMYMALLOC
+# define malloc Mymalloc
+# define calloc Mycalloc
+# define realloc Myremalloc
+# define free Myfree
+# endif
+# ifdef EMBEDMYMALLOC
+# define malloc Perl_malloc
+# define calloc Perl_calloc
+# define realloc Perl_realloc
+# define free Perl_free
+# endif
+
+ Malloc_t malloc _((MEM_SIZE nbytes));
+ Malloc_t calloc _((MEM_SIZE elements, MEM_SIZE size));
+ Malloc_t realloc _((Malloc_t where, MEM_SIZE nbytes));
+ Free_t free _((Malloc_t where));
+
+#endif /* MYMALLOC && (HIDEMYMALLOC || EMBEDMYMALLOC) */
+
#ifdef I_STRING
#include <string.h>
#else