📄 readme
字号:
# @(#)README 8.2 (Berkeley) 9/6/93This is the area for building the libdb library. There are a numberof porting directories, for various architecture/OS combinations. Pickthe one that's closest to yours and try "make". For the rest of thisfile, I'll use "MACH" as a fake architecture/OS name.To PORT to a new system, create the following subdirectories andsymbolic links. mkdir MACH (for example: mkdir sunos.4.0) cd MACH cp ../Makefile . chmod 664 Makefile ln -s ../clib . mkdir include local ln -s include sys cd include ln -s ../../include/*.h . rm compat.h cp ../../include/compat.h . chmod 664 compat.h cd ..The basic idea is that you now have a local area that you can modify.In particular, you have local copies of the Makefile and the includefile compat.h. Read through the Makefile and compat.h and make whateverchanges are appropriate to your system. If there's an architecturethat's close to yours, you probably should diff the Makefile andcompat.h in that tree against the standard ones and see what changeswere necessary, as they're probably necessary for you as well. Then,enter "make" and see what happens!There are several subroutines that are found in POSIX 1003.2, or ANSIC, or 4.4BSD that you may not have. Once you get libdb.a to compile,go through the list of undefined routines and add entries to the MISCline in the Makefile as necessary.If you have to add some functions that are missing, please don't addthem in the PORT/clib directory. Add them in MACH/local directory,and add lines of the form: function.o: local/function.o ${CL} -Ilocal local/function.oto your local Makefile.Hopefully, over time, we'll develop a set of system directories thatare known to work. If you send me the changes that were necessaryto make your system work, this will happen much more quickly.In some of the system directories, you'll see a file named OTHER_PATCHES.This is a set of patches which you'll have to make from the top-level dbdirectory to get libdb.a to run on this system.Some knobs you may have to turn:In include/compat.h: Before attempting to build nvi, you should look through the compat.h file, and adjust it as necessary for your system. It's possible to use the #ifndef construct to figure out if a #ifdef has been set, but C provides no similar method to figure out if a typedef has been done. Your compile errors should give you a good indication of which ones you need.You may see warning messages about illegal pointer combinations. Systemsprototype malloc, calloc and realloc in different places, and the missingprototypes will produce such warnings. You may also see lots of warningmessages about #define's being redefined. These can mostly be ignored.In general, I ignore all warning messages until something doesn't work.Some systems produce thousands of lines of completely useless warnings.The other parts of the PORT directory are as follows: The directory PORT/clib is a set of functions that the 4.4BSD C library had and which your system may not have. They are added to the MISC line of the Makefile if they aren't defined when you try and load libdb.a. The directory PORT/include is header files that the 4.4BSD system had which your system may not have. The really important one is compat.h, which is a set of compatibility work-arounds that you'll almost certainly have to modify for a new system. The symbolic link PORT/sys points to the PORT/include directory so that includes of the form <sys/xxx.h> work.Some of the more common portability problems: If you don't have: memmove(3), add memmove.o mkstemp(3), add mktemp.o ... to the MISC line in the Makefile. If realloc(3) of a NULL pointer on your system isn't the same as a malloc(3) call, add realloc.o to the MISC line in the Makefile. If you don't have snprintf/vsnprintf(3), add snprintf.o to the MISC line in the Makefile. This workaround depends on your system having vsprintf(3) -- if you don't, there's no workaround other than changing the source code to not use the snprintf calls. If you have to make that change, check to see if your vsprintf returns a length or a char *; if it's the latter, make sure you set VSPRINTF_CHARSTAR in the include/compat.h file.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -