?? porting
字號:
Portability of the new file(1) command.@(#) /projects/agile/cvs/harvest/src/gatherer/essence/file/PORTING,v 1.1.1.1 1994/04/26 19:07:46 hardy ExpRead this file only if the program doesn't compile on your system.I have tried to make a program that doesn't need any command-linedefines (-D) to specify what version of UNIX is in use,by using the definitions available in the system #includefiles. For example, the lstat(2) call is normally found in4BSD systems, but might be grafted into some other variantof UNIX. If it's done right (ie., using the same definitions),my program will compile and work correctly. Look at the #ifdefsto see how it's done. I've also tried to include all the non-portable library routinesI used (getopt, str*). Non-portable here means `not in everyreasonably standard UNIX out there: V7, System V, 4BSD'.There is one area that just might cause problems. On SystemV, they moved the definition of major() and minor() out of<sys/types.h> into <sys/sysmacros.h>. Hence, if major isn'tdefined after including types.h, I automatically include sys/sysmacros.h.This will work for 99% of the systems out there. ONLY if youhave a system in which neither types.h nor sysmacros.h defines`major' will this automatic include fail (I hope). On suchsystems, you will get a compilation error in trying to compilea warning message. Please do the following: 1) change the appropriate (2nd) #include at the start of fsmagic.cand 2) let me know the name of the system, the release number, and the name of the header file that *does* include this "standard" definition.If you are running the old Ritchie PDP-11 C compiler orsome other compiler that doesn't know about `void', you will haveto un-comment-out the definition of `void=int' in the Makefile.Other than this, there should be no portability problems,but one never knows these days. Please let me know of anyother problems you find porting to a UNIX system. I don't muchcare for non-UNIX systems but will collect widely-used magic numbers for them as well as for UNIX systems.Ian DarwinToronto, Canada
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -