aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-01-19 09:37:39 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-01-19 09:37:39 +0000
commit9c695393b28e78890e8228e8ca41048ddf997bf8 (patch)
treeacf313b84afb09074dd64d8841c952128a3983c4 /docs
parent444024ea1494ceab7747ba0e99ac9382fdbac957 (diff)
edited the portable code section
Diffstat (limited to 'docs')
-rw-r--r--docs/INTERNALS21
1 files changed, 12 insertions, 9 deletions
diff --git a/docs/INTERNALS b/docs/INTERNALS
index de86315ac..b35298dea 100644
--- a/docs/INTERNALS
+++ b/docs/INTERNALS
@@ -36,22 +36,25 @@ Windows vs Unix
the Windows way. The four perhaps most notable details are:
1. Different function names for close(), read(), write()
+
+ In curl, this is solved with defines and macros, so that the source looks
+ the same at all places except for the header file that defines them.
+
2. Windows requires a couple of init calls for the socket stuff
+
+ Those must be made by the application that uses libcurl, in curl that means
+ src/main.c has some code #ifdef'ed to do just that.
+
3. The file descriptors for network communication and file operations are
not easily interchangable as in unix
+
+ We avoid this by not trying any funny tricks on file descriptors.
+
4. When writing data to stdout, Windows makes end-of-lines the DOS way, thus
destroying binary data, although you do want that conversion if it is
text coming through... (sigh)
- In curl, (1) is made with defines and macros, so that the source looks the
- same at all places except for the header file that defines them.
-
- (2) must be made by the application that uses libcurl, in curl that means
- src/main.c has some code #ifdef'ed to do just that.
-
- (3) is simply avoided by not trying any funny tricks on file descriptors.
-
- (4) we set stdout to binary under windows
+ We set stdout to binary under windows
Inside the source code, I do make an effort to avoid '#ifdef WIN32'. All
conditionals that deal with features *should* instead be in the format