[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] Re: MinGW Port (Request and Question) (Peg)

From: Roger While
Subject: [open-cobol-list] Re: MinGW Port (Request and Question) (Peg)
Date: Sat Dec 3 09:50:26 2005

  There are neither signal SIGHUP and SIGQUIT in Windows.
  I did CommentOut.

Done in a different way. Because MingW is really
"minimalistic", and MS says that you practically can NOT
do anything after a signal return, just undefine HAVE_SIGNAL_H
for MingW.

  Because int8_t, int16_t, int32_t, int64_t and register_t
  has defined it in stdint.h, it becomes a compile error.
  I did CommentOut.(u_intx_t is defined by uintx_t.)

Sorry, can not reproduce this.
stdint.h is nowhere included.
The changes to the types were done by Keisuke.

  There is no fsync. I corrected it as follows.

fileio.c : 44
 #ifdef _WIN32
 #include <windows.h>           /* for GetTempPath, GetTempFileName */
+#define fsync _commit

  Please correct the following codes.

fileio.c : 320
-                       fsync (fileno (f->file));
+                       fsync (fileno ((FILE *)f->file));

fileio.c : 532
-                       fcntl (fileno (f->file), F_SETLK, &lock);
+                       fcntl (fileno ((FILE *)f->file), F_SETLK, &lock);

fileio.c : 98
-#define SEEK_INIT(f)   fseek (f->file, 0, SEEK_CUR)
+#define SEEK_INIT(f)   fseek (f->file, (off_t) 0, SEEK_CUR)

All correct as stated and will be updated.

 RELATIVE doesn't operate.

fileio.c : 446
                if (f->organization == COB_ORG_RELATIVE)
                        fp = fopen (filename, "wb+");
 #ifndef        __MINGW32__
                else if (f->organization == COB_ORG_LINE_SEQUENTIAL)
                        fp = fopen (filename, "w");
                        fp = fopen (filename, "wb");

Not quite correct. The endif should be before the else.

There is a question about _ setmode of LINE SEQUENTIAL and common.c.
In the software that moves with Windows, the line feed code is CR+LF.
I had added the following codes to fileio.c before.
(It asked Keisuke for the addition.)

Quite simply - What is MingW/Msys tring to do ? - Give a minimalistic
UNIX environment. You must have Msys to gen OC.
So, do echo something >somefile
What is the actual contents of "somefile" ?
Is it -
something with a carriage-return, line-feed and CTRL-Z
or simply
something with a line-feed ?
Enough said. QED.

If somebody wants to start a REAL win port, fine by me.

I state again, that anyone trying to use OC under Win should/must use
Cygwin (For which the default is UNIX lf)
MingW is OK for testing. It is NOT OK for serious Linux/UNIX ports.
(And the gcc is borked)

I will accept corrections for MingW but I will NOT actively test this.
(Unless a bug report like this happens)
I do and will continue to do test Cygwin.

Note that nobody has put together a reasonable "Ming" release that contains
a half-way working development environment.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]