Port to mingw+msys, BeOS and others.

Bug #339946 reported by Carlo Bramini
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libmms
Won't Fix
Undecided
Unassigned

Bug Description

Hello,
I did several fixes for porting LibMMS to Mingw+MSys, BeOS and minor fixes for Sun station and HP-UX.
Here you are the description of my changes:

configure.in
- Added AC_CANONICAL_HOST for detecting target host.
- Added AC_LIBTOOL_WIN32_DLL for allowing the creation of shared libraries under Windows.
- Added detection of some include files
- Added a case statement where you could add system dependant flags (actually only mingw and BeOS are using it).

src/bswap.h
- if types like u_int16_t are not available, it will use stdint types (required by mingw and others).

src/mms.c
- Some include files may not be present, so I added conditional includes.
- In Windows, the errors made with the network are not done with errno, but you must read/write them with WSA functions. So the errors are now handled with simple macros.
- In Windows, close() works for files only. If you want to close a socket you must call closesocket(). This has been unified too with a macro.
- In Windows, read() and write() work for files only. If you want to interact with a socket you must call send() and recv(). I made an #ifdef for fixing it.
- Added non blocking configuration on the socket for BeOS and Win32.
- Added function mms_internal_winsock_load() for opening Winsock. This function is static because (1) it is small and (2) I saw that mms.c and mmsh.c have many similar functions but these two sources do not share that code, so I follower the same coding style.
- I simplified a piece of code by calling mms_close() instead of freeing everything manually.
- fixed mms_close(), now it does not crash if "this" is NULL.

src/mmsh.c
See all notes on mms.c

src/mmsio.h
- Added sys/types.h because you may need it for off_t declaration, otherwise mmsx may fail its compilation (fix for mingw).

src/mmsh.h
- Removed sys/types.h since it has been added into src/mmsio.h

src/mms.h
- Removed sys/types.h since it has been added into src/mmsio.h

Sincerely,

Carlo Bramini.

Revision history for this message
Carlo Bramini (carlo-bramix) wrote :
Revision history for this message
Avuton Olrich (avuton) wrote :

For the record, the patch is completely unmergeable to 0.6. 0.5 merged and worked here.

Revision history for this message
Carlo Bramini (carlo-bramix) wrote :

I updated the patch to libMMS 0.6

Sincerely,

Carlo Bramini.

Soren Hansen (soren)
Changed in libmms:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.