SCTP Discussions

Text archives Help


[SCTP-Discussion] Patch for Win32


Chronological Thread 
  • From: Carsten Fuchs <CarstenFuchs AT T-Online.de>
  • To: sctp-discussion AT sctp.de
  • Subject: [SCTP-Discussion] Patch for Win32
  • Date: Thu, 07 Feb 2008 17:37:29 +0100
  • List-archive: <http://lists.franken.de/pipermail/sctp-discussion>
  • List-id: SCTP Discussions <sctp-discussion.sctp.de>

Hi all,

as mentioned before, I've been making some changes to facilitate the use of sctplib on the Win32 platform natively. My results are included in the patch that I've attached to this email. The patch itself is in unified diff format and made against sctplib-1.0.8beta2. It contains the following changes:

a) Fixes for compiler warnings (highest warning level) in some files in
sctplib/programs/.

b) Same for (just a few) files in sctplib/sctp/*.c

c) A custom SConscript file that I used for building (in place of a Makefile). You can of course ignore this file entirely: it's almost, but not entirely self-contained (requires a small SConstruct file to work). (For more details on scons see <http://www.scons.org>.)

d) The new directory and files sctplib/sctp/glib-repl/*
This contains a minimalist glib replacement that uses only functions from the regular C runtime libs (malloc, realloc, free, memcpy, ...). Testing, reviews, or other correction-verifying measures would be appreciated. Performance should not be significantly worse than that of glib, but there is also room for improvement, e.g. by introducing memory pools for GLink and GRealArray objects (with a good memory allocator implementation this should not even be necessary).
Feel free to update the license text/banners/comments to whatever seems
appropriate.

e) Directories inc-win32/ and inc-linux/ with a pre-made config.h file in each. I made these because under Windows, there is no autoconf / "configure" facility, and even under Linux (where I compile with the exact same SConscript file above, which handles everything) I prefer to work without running "configure" (don't know the situation on other Unixes though).
For win32, I put the definition of uint32_t into the config.h, for Linux, it's a copy of a configure-created sample, where I also added the defs for TRUE and FALSE, which apparently are normally provided by glib(?).


Everything was tested on Win2000 with VC++ 8 (2005), and under i386 Debian GNU/Linux 3.1 (Sarge) with gcc as well.
On both platforms I did some testing with the combined_server and a terminal, both in different shells on the local machine only.

I'd be happy if you added these changes to the official code base. They make working under Windows a *lot* more simple and convenient. However, not that they also suggest that glib usage should not be expanded in the future (in order to avoid the necessity to update the glib-repl with each new release).

Thank you very much.

Oh, and I have to quit now, because all of a sudden, I'm in a hurry: looking forward to finally trying the new SCTP in my programs! :-) (Or maybe reading the API first.)

Best regards,
Carsten



--
Ca3D - Engine http://www.Ca3D-Engine.de
Carsten Fuchs http://www.Ca3D-Engine.de/c_Carsten.php

Attachment: Win32-gesamt_patch.zip
Description: Zip compressed data




Archive powered by MHonArc 2.6.19+.

Top of page