Port to mingw+msys, BeOS and others.

Bug #339946 reported by Carlo Bramini on 2009-03-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Won't Fix

Bug Description

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:

- 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).

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

- 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.

See all notes on mms.c

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

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

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


Carlo Bramini.

Carlo Bramini (carlo-bramix) wrote :
Avuton Olrich (avuton) wrote :

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

Carlo Bramini (carlo-bramix) wrote :

I updated the patch to libMMS 0.6


Carlo Bramini.

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

Other bug subscribers

Bug attachments