# New Ticket Created by  Jürgen Bömmels 
# Please include the string:  [perl #23162]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=23162 >


Hi,

I just tried to get 
perl Configure.pl --miniparrot
running

following problems I need to solve:

In embed.c the type off_t is used which is defined in unistd.h but not
in plain ansi. In case there is no unistd.h I changed this type to
off_t.

Parrot_memalign is not defined in config/gen/platform/ansi.c. I
removed the tests for memalign in case of miniparrot.

There was also a little problem with io_stdio.c:
fopen (name, "r+") fails if the file does not exists. I added a check
for this and use "w+" in the case of nonexisting files.

Many tests are failing because of double close of the standard
file-descriptors. I will solve these after [perl #23124] is applied.

bye
boe



-- attachment  1 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/61930/45654/4e2e29/miniparrot.diff

Index: embed.c
===================================================================
RCS file: /cvs/public/parrot/embed.c,v
retrieving revision 1.75
diff -u -r1.75 embed.c
--- embed.c	21 Jul 2003 18:00:24 -0000	1.75
+++ embed.c	29 Jul 2003 18:49:55 -0000
@@ -16,7 +16,6 @@
 #include "parrot/parrot.h"
 #include "parrot/embed.h"
 
-
 struct Parrot_Interp *
 Parrot_new(void)
 {
@@ -68,7 +67,11 @@
 struct PackFile *
 Parrot_readbc(struct Parrot_Interp *interpreter, char *filename)
 {
+#if HAS_HEADER_UNISTD
     off_t program_size, wanted;
+#else
+    size_t program_size, wanted;
+#endif
     char *program_code;
     struct PackFile *pf;
     PMC * io = NULL;
Index: config/auto/memalign.pl
===================================================================
RCS file: /cvs/public/parrot/config/auto/memalign.pl,v
retrieving revision 1.4
diff -u -r1.4 memalign.pl
--- config/auto/memalign.pl	13 Jul 2003 18:52:36 -0000	1.4
+++ config/auto/memalign.pl	29 Jul 2003 18:49:55 -0000
@@ -6,7 +6,17 @@
 
 $description="Determining if your C library supports memalign...";
 
[EMAIL PROTECTED](miniparrot);
+
 sub runstep {
+    my ($miniparrot) = @_;
+
+    if ($miniparrot) {
+        Configure::Data->set(memalign => '');
+	print "(skipped)";
+	return;
+    }
+
     my $test = 0;
 
     if (Configure::Data->get('i_malloc')) {
Index: io/io_stdio.c
===================================================================
RCS file: /cvs/public/parrot/io/io_stdio.c,v
retrieving revision 1.23
diff -u -r1.23 io_stdio.c
--- io/io_stdio.c	21 Jul 2003 18:00:45 -0000	1.23
+++ io/io_stdio.c	29 Jul 2003 18:49:55 -0000
@@ -130,6 +130,10 @@
     /* Try opening the file- note that this can't really handle O_EXCL, etc. */
     fptr = fopen(spath, oflags);
 
+    if (fptr == NULL && errno == ENOENT && (flags & PIO_F_WRITE)) {
+        fptr = fopen(spath, "w+b");
+    }
+
     /* File open */
     if (fptr != NULL) {
         if (PIO_isatty(fptr))

Reply via email to