Author: piumarta Date: 2012-09-13 11:55:29 -0700 (Thu, 13 Sep 2012) New Revision: 2601 Modified: trunk/platforms/unix/CMakeLists.txt trunk/platforms/unix/ChangeLog trunk/platforms/unix/plugins/UUIDPlugin/config.cmake trunk/platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c trunk/platforms/unix/src/plugins/DBusPlugin/DBusPlugin.c trunk/platforms/unix/vm-display-custom/sqUnixCustomWindow.c trunk/platforms/unix/vm/config.cmake Log: rename "aio.h" -> "sqaio.h" Modified: trunk/platforms/unix/CMakeLists.txt =================================================================== --- trunk/platforms/unix/CMakeLists.txt 2012-09-13 15:59:45 UTC (rev 2600) +++ trunk/platforms/unix/CMakeLists.txt 2012-09-13 18:55:29 UTC (rev 2601) @@ -97,6 +97,14 @@ SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/pkg/include") ENDIF (EXISTS /usr/pkg/include) +IF (EXISTS /usr/local/include) + SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/local/include") +ENDIF (EXISTS /usr/local/include) + +IF (EXISTS /usr/local/lib) + SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -L/usr/local/lib") +ENDIF (EXISTS /usr/local/lib) + MESSAGE (STATUS "Using CFLAGS ${CMAKE_C_FLAGS}") MACRO (USE_LIBRARY lib) Modified: trunk/platforms/unix/ChangeLog =================================================================== --- trunk/platforms/unix/ChangeLog 2012-09-13 15:59:45 UTC (rev 2600) +++ trunk/platforms/unix/ChangeLog 2012-09-13 18:55:29 UTC (rev 2601) @@ -1,3 +1,18 @@ +2012-09-14 Ian Piumarta <[hidden email]> + + * vm/config.cmake: Check for and use libiconv if available. + + * plugins/UUIDPlugin/sqUnixUUID.c (MakeUUID): Use uuid_create() if + available. + + * plugins/UUIDPlugin/config.cmake: Also check for uuid_create(). + + * CMakeLists.txt: If /usr/local/include and/or /usr/local/lib + exist, search them for headers and libraries, respectively. + + * vm-display-custom/sqUnixCustomWindow.c: Rename "aio.h" -> + "sqaio.h". + 2012-09-14 Ian Piumarta <com -dot- gmail -at- piumarta (backwards)> * cmake/squeak.in (jit): Allow the interpreter VM to execute Modified: trunk/platforms/unix/plugins/UUIDPlugin/config.cmake =================================================================== --- trunk/platforms/unix/plugins/UUIDPlugin/config.cmake 2012-09-13 15:59:45 UTC (rev 2600) +++ trunk/platforms/unix/plugins/UUIDPlugin/config.cmake 2012-09-13 18:55:29 UTC (rev 2601) @@ -23,9 +23,12 @@ CHECK_FUNCTION_EXISTS (uuid_generate HAVE_UUID_GENERATE) CONFIG_DEFINE (HAVE_UUID_GENERATE) -IF (NOT HAVE_UUIDGEN AND NOT HAVE_UUID_GENERATE) +CHECK_FUNCTION_EXISTS (uuid_create HAVE_UUID_CREATE) +CONFIG_DEFINE (HAVE_UUID_CREATE) + +IF (NOT HAVE_UUIDGEN AND NOT HAVE_UUID_GENERATE AND NOT HAVE_UUID_CREATE) PLUGIN_DISABLE () -ENDIF (NOT HAVE_UUIDGEN AND NOT HAVE_UUID_GENERATE) +ENDIF (NOT HAVE_UUIDGEN AND NOT HAVE_UUID_GENERATE AND NOT HAVE_UUID_CREATE) # IF (UUID_UUID_GENERATE) # SET (HAVE_UUID_GENERATE 1) Modified: trunk/platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c =================================================================== --- trunk/platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c 2012-09-13 15:59:45 UTC (rev 2600) +++ trunk/platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c 2012-09-13 18:55:29 UTC (rev 2601) @@ -16,15 +16,22 @@ int MakeUUID(char *location) { +#if defined(HAVE_UUID_CREATE) + size_t len= 16; /* 128 bits */ + uuid_t *uuid; + uuid_create(&uuid); + uuid_make(uuid, UUID_MAKE_V1); + uuid_export(uuid, UUID_FMT_BIN, (void **)&location, &len); + uuid_destroy(uuid); +#else uuid_t uuid; - -#if defined(HAVE_UUIDGEN) +# if defined(HAVE_UUIDGEN) uuidgen(&uuid, 1); -#elif defined(HAVE_UUID_GENERATE) +# elif defined(HAVE_UUID_GENERATE) uuid_generate(uuid); +# endif + memcpy((void *)location, (void *)&uuid, sizeof(uuid)); #endif - - memcpy((void *)location, (void *)&uuid, sizeof(uuid)); return 1; } Modified: trunk/platforms/unix/src/plugins/DBusPlugin/DBusPlugin.c =================================================================== --- trunk/platforms/unix/src/plugins/DBusPlugin/DBusPlugin.c 2012-09-13 15:59:45 UTC (rev 2600) +++ trunk/platforms/unix/src/plugins/DBusPlugin/DBusPlugin.c 2012-09-13 18:55:29 UTC (rev 2601) @@ -27,7 +27,7 @@ // was #undef EXPORT(returnType) but screws NorCroft cc #define EXPORT(returnType) static returnType #endif -#include "aio.h" +#include "sqaio.h" #define DBUS_API_SUBJECT_TO_CHANGE #include <dbus/dbus.h> typedef struct sqDBusData { Modified: trunk/platforms/unix/vm/config.cmake =================================================================== --- trunk/platforms/unix/vm/config.cmake 2012-09-13 15:59:45 UTC (rev 2600) +++ trunk/platforms/unix/vm/config.cmake 2012-09-13 18:55:29 UTC (rev 2601) @@ -147,6 +147,11 @@ TRY_COMPILE (HAVE_LANGINFO_CODESET ${bld} ${config}/testLanginfoCodeset.c) ENDIF (HAVE_LANGINFO_H) +CHECK_LIBRARY_EXISTS (iconv libiconv_open "" HAVE_LIBICONV) +IF (HAVE_LIBICONV) + USE_LIBRARY (iconv) +ENDIF (HAVE_LIBICONV) + CONFIG_DEFINE (HAVE_ICONV_H) CONFIG_DEFINE (HAVE_LANGINFO_CODESET) Modified: trunk/platforms/unix/vm-display-custom/sqUnixCustomWindow.c =================================================================== --- trunk/platforms/unix/vm-display-custom/sqUnixCustomWindow.c 2012-09-13 15:59:45 UTC (rev 2600) +++ trunk/platforms/unix/vm-display-custom/sqUnixCustomWindow.c 2012-09-13 18:55:29 UTC (rev 2601) @@ -17,7 +17,7 @@ #include "sqUnixMain.h" #include "sqUnixGlobals.h" #include "sqUnixCharConv.h" /* not required, but probably useful */ -#include "aio.h" /* ditto */ +#include "sqaio.h" /* ditto */ #include "SqDisplay.h" |
Free forum by Nabble | Edit this page |