Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime header file io.h conflicts with a system header file #4175

Closed
vicuna opened this issue Nov 28, 2006 · 3 comments
Closed

runtime header file io.h conflicts with a system header file #4175

vicuna opened this issue Nov 28, 2006 · 3 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Nov 28, 2006

Original bug ID: 4175
Reporter: @oandrieu
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2016-12-07T10:47:08Z)
Resolution: duplicate
Priority: normal
Severity: minor
Target version: 4.02.2+dev / +rc1
Fixed in version: 4.03.0+dev / +beta1
Category: ~DO NOT USE (was: OCaml general)
Tags: patch
Duplicate of: #5887
Monitored by: Camarade_Tux

Bug description

Le fichier byterun/io.h est en conflit avec le io.h standard de Windows. La règle de compilation de win32.o dans Makefile.nt essaye bien de bricoler pour contourner le problème mais ce n'est pas suffisant : par exemple sous mingw, <fcntl.h> fait un include <io.h> mais lors de la compilation dans amsrun/ c'est le io.h de caml qui est inclus (à cause de l'option -I../byterun).

Il faudrait soit:

  • renommer io.h en caml_io.h par exemple
  • éviter complètement l'option -I../byterun dans asmrun/Makefile et asmrun/Makefile.nt en liant/copiant les fichiers .h de la même façon que les fichiers .c

En attachement, un patch avec quelques #include supplémentaires pour éviter des warnings du compilateur C.

File attachments

@vicuna
Copy link
Author

vicuna commented Jul 13, 2012

Comment author: vouillon

There are several warnings (implicit declaration of function) when compiling win32unix with MinGW because of this issue. Hopefully, they are harmless...

@vicuna
Copy link
Author

vicuna commented Jan 13, 2013

Comment author: Camarade_Tux

I've had issues with this which have prevented me from building (currently adding cross-compilation support to ocaml). Even if we only consider the warnings, they don't seem completely harmless. As far as I'm concerned, I've renamed the header to "_caml_io.h".

I don't understand why '#include <io.h>' uses the caml header: using '<io.h>' instead of '"io.h"' is supposed to pull the system header... It's not the first time I notice something like that however.

@vicuna
Copy link
Author

vicuna commented Jul 2, 2013

Comment author: @damiendoligez

This PR is a kind of subset of 5887, let's continue the discussion in that PR instead of here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants