简体   繁体   English

与Windows OS等效的Mac OSX API

[英]Mac OSX API Equivalent To Windows OS

I just started migrating to Mac OS X and I wanted to port a couple of tools I wrote for Windows. 我刚开始迁移到Mac OS X,并且想移植我为Windows编写的一些工具。 The question is what is the equivalent for the following: 问题是什么等效于以下内容:

CreateFile()
CreateFileMapping()
MapViewOfFile()

I would appreciate if someone could either guide me to a place where I can read about it or if there is some sort of a quick guide for such common questions/problems or simply answer my question. 如果有人可以将我引导到可以阅读的地方,或者有针对此类常见问题/问题的快速指南,或者只是回答我的问题,我将不胜感激。

The language of choice is C/C++ for a command line tool. 对于命令行工具,选择的语言是C / C ++。

The equivalent of CreateFile would be open . 相当于CreateFile将被open The latter two steps for mapping a file, CreateFileMapping and MapViewOfFile , are condensed into one step on Mac OS X, with the mmap function. 在Mac OS X上,使用mmap函数将映射文件的后两个步骤CreateFileMappingMapViewOfFile压缩为一个步骤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM