diff options
author | Vijay Bellur <vijay@gluster.com> | 2012-04-09 23:11:52 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-04-11 10:25:56 -0700 |
commit | 076830c068fb39bbc3e863c89a4253cbea36357e (patch) | |
tree | 842884d8db9a40d5a53e5171c852a84daa8e0f65 /doc/legacy/porting_guide.txt | |
parent | df8e2f53b70f4f49af70df308010dddfe5ca35ec (diff) |
doc: Move outdated documentation to legacy
Change-Id: I0ceba9a993e8b1cdef4ff6a784bfd69c08107d88
BUG: 811311
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Reviewed-on: http://review.gluster.com/3116
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'doc/legacy/porting_guide.txt')
-rw-r--r-- | doc/legacy/porting_guide.txt | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/doc/legacy/porting_guide.txt b/doc/legacy/porting_guide.txt new file mode 100644 index 00000000000..5705cd96461 --- /dev/null +++ b/doc/legacy/porting_guide.txt @@ -0,0 +1,45 @@ + GlusterFS Porting Guide + ----------------------- + +* General setup + +The configure script will detect the target platform for the build. +All platform-specific CFLAGS, macro definitions should be done +in configure.ac + +Platform-specific code can be written like this: + +#ifdef GF_DARWIN_HOST_OS + /* some code specific to Darwin */ +#endif + +* Coding guidelines + +In general, avoid glibc extensions. For example, nested functions don't work +on Mac OS X. It is best to stick to C99. + +When using library calls and system calls, pay attention to the +portability notes. As far as possible stick to POSIX-specified behavior. +Do not use anything expressly permitted by the specification. For example, +some fields in structures may be present only on certain platforms. Avoid +use of such things. + +Do not pass values of constants such as F_*, O_*, errno values, etc. across +platforms. + +Please refer compat-errno.h for more details about errno handling inside +glusterfs for cross platform. + +* Specific issues + +- The argp library is available only on Linux through glibc, but for other + platforms glusterfs has already included argp-standalone library which will + statically linked during the glusterfs build. + +- Extended attribute calls (setxattr, listxattr, etc.) have differing prototypes + on different platforms. See compat.h for macro definitions to resolve this, also + read out the specific extended attribute documentation for your platforms. + +------------------------------------------ +Last revised: Thu Feb 28 13:58:07 IST 2008 +------------------------------------------ |