summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2010-01-04 10:30:37 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2010-01-04 10:30:37 +0000
commit339c8e972e5343b1f97b07ab04943ae42d20eb1a (patch)
tree44a252a2a2fdf642a64ddb01639025097203fc56 /src
parent1a9b7d72d2706d6d3083363af3aeb2152ea152f7 (diff)
Fixed previous commit (s/gethostbyname/gethostname/) and added
#if defined (__GNUC__) to remove #warnings from other (Windows) compilers. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6988 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Preferences.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx
index ffa497f9c..b1694a7fa 100644
--- a/src/Fl_Preferences.cxx
+++ b/src/Fl_Preferences.cxx
@@ -82,7 +82,9 @@ const char *Fl_Preferences::newUUID()
b.byte8, b.byte9, b.byte10, b.byte11, b.byte12, b.byte13, b.byte14, b.byte15);
CFRelease(theUUID);
#elif defined (WIN32)
+#if defined (__GNUC__)
#warning MSWindows implementation missing!
+#endif // (__GNUC__)
// UUID b;
// UuidCreate(&b);
unsigned char b[16];
@@ -103,9 +105,11 @@ const char *Fl_Preferences::newUUID()
b[11] = (unsigned char)(a>>24);
char name[80]; // last four bytes
// BOOL GetComputerName(LPTSTR lpBuffer, LPDWORD nSize);
-#warning gethostbyname needs winsock!
+#if defined (__GNUC__)
+#warning gethostname needs winsock!
+#endif // (__GNUC__)
// gethostname(name, 79); // A.S. temporarily replaced by:
- strcpy (name,"localhost"); // A.S. fix gethostbyname
+ strcpy (name,"localhost"); // A.S. FIXME: gethostname
memcpy(b+12, name, 4);
sprintf(uuidBuffer, "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",
b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7],