summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2002-03-04 22:48:38 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-04 22:17:56 +0000
commit1cb0fb506639f41107792256805556ee04e5463a (patch)
treeedcae7d6f9d2e1e4ca67c0e7cd70b1943e06b734 /ext
parent26f1752374957703dbfe054b7fa25c12c67ca6f3 (diff)
downloadperl-1cb0fb506639f41107792256805556ee04e5463a.tar.gz
(was Re: [PATCH @13746] h2xs)
Message-ID: <20020304224837.GA4284@Bagpuss.unfortu.net> p4raw-id: //depot/perl@15023
Diffstat (limited to 'ext')
-rw-r--r--ext/Fcntl/Fcntl.xs4
-rw-r--r--ext/Fcntl/Makefile.PL3
-rw-r--r--ext/File/Glob/Glob.xs4
-rw-r--r--ext/File/Glob/Makefile.PL3
-rw-r--r--ext/GDBM_File/GDBM_File.xs4
-rw-r--r--ext/GDBM_File/Makefile.PL3
-rw-r--r--ext/I18N/Langinfo/Langinfo.xs4
-rw-r--r--ext/I18N/Langinfo/Makefile.PL13
-rw-r--r--ext/POSIX/Makefile.PL3
-rw-r--r--ext/POSIX/POSIX.xs4
-rw-r--r--ext/Socket/Makefile.PL3
-rw-r--r--ext/Socket/Socket.xs4
-rw-r--r--ext/Sys/Syslog/Makefile.PL3
-rw-r--r--ext/Sys/Syslog/Syslog.xs4
14 files changed, 25 insertions, 34 deletions
diff --git a/ext/Fcntl/Fcntl.xs b/ext/Fcntl/Fcntl.xs
index 9f167d07f8..c907c9ac8d 100644
--- a/ext/Fcntl/Fcntl.xs
+++ b/ext/Fcntl/Fcntl.xs
@@ -33,8 +33,8 @@
--AD October 16, 1995
*/
-#include "constants.c"
+#include "const-c.inc"
MODULE = Fcntl PACKAGE = Fcntl
-INCLUDE: constants.xs \ No newline at end of file
+INCLUDE: const-xs.inc
diff --git a/ext/Fcntl/Makefile.PL b/ext/Fcntl/Makefile.PL
index 030c8b4239..d9551a913e 100644
--- a/ext/Fcntl/Makefile.PL
+++ b/ext/Fcntl/Makefile.PL
@@ -1,11 +1,10 @@
use ExtUtils::MakeMaker;
-use ExtUtils::Constant 0.07 'WriteConstants';
+use ExtUtils::Constant 0.11 'WriteConstants';
WriteMakefile(
NAME => 'Fcntl',
MAN3PODS => {}, # Pods will be built by installman.
XSPROTOARG => '-noprototypes', # XXX remove later?
VERSION_FROM => 'Fcntl.pm',
- realclean => {FILES=> 'constants.c constants.xs'},
);
my @names = (qw(FAPPEND FASYNC FCREAT FDEFER FDSYNC FD_CLOEXEC FEXCL FLARGEFILE
diff --git a/ext/File/Glob/Glob.xs b/ext/File/Glob/Glob.xs
index 037b85cc47..bc58b6a934 100644
--- a/ext/File/Glob/Glob.xs
+++ b/ext/File/Glob/Glob.xs
@@ -14,7 +14,7 @@ START_MY_CXT
#define GLOB_ERROR (MY_CXT.x_GLOB_ERROR)
-#include "constants.c"
+#include "const-c.inc"
#ifdef WIN32
#define errfunc NULL
@@ -69,4 +69,4 @@ PPCODE:
bsd_globfree(&pglob);
}
-INCLUDE: constants.xs
+INCLUDE: const-xs.inc
diff --git a/ext/File/Glob/Makefile.PL b/ext/File/Glob/Makefile.PL
index 0ff49ebe17..3cf83f1b12 100644
--- a/ext/File/Glob/Makefile.PL
+++ b/ext/File/Glob/Makefile.PL
@@ -1,11 +1,10 @@
use ExtUtils::MakeMaker;
-use ExtUtils::Constant 0.08 'WriteConstants';
+use ExtUtils::Constant 0.11 'WriteConstants';
WriteMakefile(
NAME => 'File::Glob',
VERSION_FROM => 'Glob.pm',
MAN3PODS => {}, # Pods will be built by installman.
OBJECT => 'bsd_glob$(OBJ_EXT) Glob$(OBJ_EXT)',
- realclean => {FILES=> 'constants.c constants.xs'},
## uncomment for glob debugging (will cause make test to fail)
# DEFINE => '-DGLOB_DEBUG',
diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs
index d58feeccef..5684a968e0 100644
--- a/ext/GDBM_File/GDBM_File.xs
+++ b/ext/GDBM_File/GDBM_File.xs
@@ -77,11 +77,11 @@ output_datum(pTHX_ SV *arg, char *str, int size)
#define gdbm_setopt(db,optflag,optval,optlen) not_here("gdbm_setopt")
#endif
-#include "constants.c"
+#include "const-c.inc"
MODULE = GDBM_File PACKAGE = GDBM_File PREFIX = gdbm_
-INCLUDE: constants.xs
+INCLUDE: const-xs.inc
GDBM_File
gdbm_TIEHASH(dbtype, name, read_write, mode, fatal_func = (FATALFUNC)croak)
diff --git a/ext/GDBM_File/Makefile.PL b/ext/GDBM_File/Makefile.PL
index f9dd2d203c..abdceecd5d 100644
--- a/ext/GDBM_File/Makefile.PL
+++ b/ext/GDBM_File/Makefile.PL
@@ -1,12 +1,11 @@
use ExtUtils::MakeMaker;
-use ExtUtils::Constant 0.07 'WriteConstants';
+use ExtUtils::Constant 0.11 'WriteConstants';
WriteMakefile(
NAME => 'GDBM_File',
LIBS => ["-L/usr/local/lib -lgdbm", "-ldbm"],
MAN3PODS => {}, # Pods will be built by installman.
XSPROTOARG => '-noprototypes', # XXX remove later?
VERSION_FROM => 'GDBM_File.pm',
- realclean => {FILES=> 'constants.c constants.xs'},
);
WriteConstants(
NAME => 'GDBM_File',
diff --git a/ext/I18N/Langinfo/Langinfo.xs b/ext/I18N/Langinfo/Langinfo.xs
index f1a0a1728b..39faaf1a3c 100644
--- a/ext/I18N/Langinfo/Langinfo.xs
+++ b/ext/I18N/Langinfo/Langinfo.xs
@@ -6,13 +6,13 @@
# include <langinfo.h>
#endif
-#include "constants.c"
+#include "const-c.inc"
MODULE = I18N::Langinfo PACKAGE = I18N::Langinfo
PROTOTYPES: ENABLE
-INCLUDE: constants.xs
+INCLUDE: const-xs.inc
SV*
langinfo(code)
diff --git a/ext/I18N/Langinfo/Makefile.PL b/ext/I18N/Langinfo/Makefile.PL
index 5015fce5ea..730a45fecc 100644
--- a/ext/I18N/Langinfo/Makefile.PL
+++ b/ext/I18N/Langinfo/Makefile.PL
@@ -13,10 +13,6 @@ WriteMakefile(
# Insert -I. if you add *.h files later:
'INC' => '', # e.g., '-I/usr/include/other'
'MAN3PODS' => {}, # Pods will be built by installman
- # Without this the constants xs files are spotted, and cause rules to be
- # added to delete the similarly named C files, which isn't what we want.
- XS => {'Langinfo.xs' => 'Langinfo.c'},
- realclean => {FILES=> 'constants.c constants.xs'},
# Un-comment this if you add C files to link with later:
# 'OBJECT' => '$(O_FILES)', # link all the C files too
);
@@ -46,8 +42,9 @@ if (eval {require ExtUtils::Constant; 1}) {
);
} else {
use File::Copy;
- copy ('fallback.c', 'constants.c')
- or die "Can't copy fallback.c to constants.c: $!";
- copy ('fallback.xs', 'constants.xs')
- or die "Can't copy fallback.xs to constants.xs: $!";
+ use File::Spec;
+ foreach my $file ('const-c.inc', 'const-xs.inc') {
+ my $fallback = File::Spec->catfile('fallback', $file);
+ copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";
+ }
}
diff --git a/ext/POSIX/Makefile.PL b/ext/POSIX/Makefile.PL
index 6424066b47..04ba7459ba 100644
--- a/ext/POSIX/Makefile.PL
+++ b/ext/POSIX/Makefile.PL
@@ -1,5 +1,5 @@
use ExtUtils::MakeMaker;
-use ExtUtils::Constant 0.07 'WriteConstants';
+use ExtUtils::Constant 0.11 'WriteConstants';
use Config;
my @libs;
if ($^O ne 'MSWin32') {
@@ -11,7 +11,6 @@ WriteMakefile(
MAN3PODS => {}, # Pods will be built by installman.
XSPROTOARG => '-noprototypes', # XXX remove later?
VERSION_FROM => 'POSIX.pm',
- realclean => {FILES=> 'constants.c constants.xs'},
);
my @names =
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index b30edf18f4..238c5285ef 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -372,7 +372,7 @@ not_here(char *s)
return -1;
}
-#include "constants.c"
+#include "const-c.inc"
/* These were implemented in the old "constant" subroutine. They are actually
macros that take an integer argument and return an integer result. */
@@ -792,7 +792,7 @@ setcc(termios_ref, ccix, cc)
MODULE = POSIX PACKAGE = POSIX
-INCLUDE: constants.xs
+INCLUDE: const-xs.inc
void
int_macro_int(sv, iv)
diff --git a/ext/Socket/Makefile.PL b/ext/Socket/Makefile.PL
index c01d45ac8c..19f0acd49a 100644
--- a/ext/Socket/Makefile.PL
+++ b/ext/Socket/Makefile.PL
@@ -1,5 +1,5 @@
use ExtUtils::MakeMaker;
-use ExtUtils::Constant 0.07 'WriteConstants';
+use ExtUtils::Constant 0.11 'WriteConstants';
use Config;
WriteMakefile(
NAME => 'Socket',
@@ -7,7 +7,6 @@ WriteMakefile(
($Config{libs} =~ /(-lsocks\S*)/ ? (LIBS => [ "$1" ] ) : ()),
MAN3PODS => {}, # Pods will be built by installman.
XSPROTOARG => '-noprototypes', # XXX remove later?
- realclean => {FILES=> 'constants.c constants.xs'},
);
my @names = (qw(AF_802 AF_AAL AF_APPLETALK AF_CCITT AF_CHAOS AF_CTF
AF_DATAKIT AF_DECnet AF_DLI AF_ECMA AF_GOSIP AF_HYLINK
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index 504cbd1ed1..79e1dfd22a 100644
--- a/ext/Socket/Socket.xs
+++ b/ext/Socket/Socket.xs
@@ -211,11 +211,11 @@ not_here(char *s)
*
* --jhi */
-#include "constants.c"
+#include "const-c.inc"
MODULE = Socket PACKAGE = Socket
-INCLUDE: constants.xs
+INCLUDE: const-xs.inc
void
inet_aton(host)
diff --git a/ext/Sys/Syslog/Makefile.PL b/ext/Sys/Syslog/Makefile.PL
index 1de0148d41..1a5f1fc124 100644
--- a/ext/Sys/Syslog/Makefile.PL
+++ b/ext/Sys/Syslog/Makefile.PL
@@ -1,12 +1,11 @@
use ExtUtils::MakeMaker;
-use ExtUtils::Constant 0.07 'WriteConstants';
+use ExtUtils::Constant 0.11 'WriteConstants';
WriteMakefile(
NAME => 'Sys::Syslog',
VERSION_FROM => 'Syslog.pm',
MAN3PODS => {}, # Pods will be built by installman.
XSPROTOARG => '-noprototypes',
- realclean => {FILES=> 'constants.c constants.xs'},
);
# We hope syslogd understands /dev/log.
diff --git a/ext/Sys/Syslog/Syslog.xs b/ext/Sys/Syslog/Syslog.xs
index 157c7320e5..93f1272e91 100644
--- a/ext/Sys/Syslog/Syslog.xs
+++ b/ext/Sys/Syslog/Syslog.xs
@@ -6,11 +6,11 @@
#include <syslog.h>
#endif
-#include "constants.c"
+#include "const-c.inc"
MODULE = Sys::Syslog PACKAGE = Sys::Syslog
-INCLUDE: constants.xs
+INCLUDE: const-xs.inc
int
LOG_FAC(p)