Author: cazfi
Date: Mon Apr 11 19:36:58 2016
New Revision: 32359

URL: http://svn.gna.org/viewcvs/freeciv?rev=32359&view=rev
Log:
Removed unused fc_uname()

See patch #7027

Modified:
    branches/S2_6/utility/support.c
    branches/S2_6/utility/support.h

Modified: branches/S2_6/utility/support.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/support.c?rev=32359&r1=32358&r2=32359&view=diff
==============================================================================
--- branches/S2_6/utility/support.c     (original)
+++ branches/S2_6/utility/support.c     Mon Apr 11 19:36:58 2016
@@ -1088,112 +1088,6 @@
 }
 
 /*****************************************************************
-  Returns an uname like string.
-*****************************************************************/
-void fc_uname(char *buf, size_t len)
-{
-#ifdef HAVE_UNAME
-  {
-    struct utsname un;
-
-    uname(&un);
-    fc_snprintf(buf, len, "%s %s [%s]", un.sysname, un.release, un.machine);
-  }
-#else /* ! HAVE_UNAME */
-  /* Fill in here if you are making a binary without sys/utsname.h and know
-     the OS name, release number, and machine architechture */
-#ifdef WIN32_NATIVE
-  {
-    /* TODO: Add handling of newer Windows versions. */
-    char cpuname[16];
-    char *osname;
-    SYSTEM_INFO sysinfo;
-    OSVERSIONINFO osvi;
-
-    osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-    GetVersionEx(&osvi);
-
-    switch (osvi.dwPlatformId) {
-    case VER_PLATFORM_WIN32s:
-      osname = "Win32s";
-      break;
-
-    case VER_PLATFORM_WIN32_WINDOWS:
-      osname = "Win32";
-
-      if (osvi.dwMajorVersion == 4) {
-       switch (osvi.dwMinorVersion) {
-       case  0: osname = "Win95";    break;
-       case 10: osname = "Win98";    break;
-       case 90: osname = "WinME";    break;
-       default:                            break;
-       }
-      }
-      break;
-
-    case VER_PLATFORM_WIN32_NT:
-      osname = "WinNT";
-
-      if (osvi.dwMajorVersion == 5) {
-       switch (osvi.dwMinorVersion) {
-       case 0: osname = "Win2000";   break;
-       case 1: osname = "WinXP";           break;
-       default:                            break;
-       }
-      }
-      break;
-
-    default:
-      osname = osvi.szCSDVersion;
-      break;
-    }
-
-    GetSystemInfo(&sysinfo); 
-    switch (sysinfo.wProcessorArchitecture) {
-      case PROCESSOR_ARCHITECTURE_INTEL:
-       {
-         unsigned int ptype;
-         if (sysinfo.wProcessorLevel < 3) /* Shouldn't happen. */
-           ptype = 3;
-         else if (sysinfo.wProcessorLevel > 9) /* P4 */
-           ptype = 6;
-         else
-           ptype = sysinfo.wProcessorLevel;
-
-          fc_snprintf(cpuname, sizeof(cpuname), "i%d86", ptype);
-       }
-       break;
-
-      case PROCESSOR_ARCHITECTURE_MIPS:
-       sz_strlcpy(cpuname, "mips");
-       break;
-
-      case PROCESSOR_ARCHITECTURE_ALPHA:
-       sz_strlcpy(cpuname, "alpha");
-       break;
-
-      case PROCESSOR_ARCHITECTURE_PPC:
-       sz_strlcpy(cpuname, "ppc");
-       break;
-#if 0
-      case PROCESSOR_ARCHITECTURE_IA64:
-       sz_strlcpy(cpuname, "ia64");
-       break;
-#endif
-      default:
-       sz_strlcpy(cpuname, "unknown");
-       break;
-    }
-    fc_snprintf(buf, len, "%s %ld.%ld [%s]",
-                osname, osvi.dwMajorVersion, osvi.dwMinorVersion, cpuname);
-  }
-#else  /* WIN32_NATIVE */
-  fc_snprintf(buf, len, "unknown unknown [unknown]");
-#endif /* WIN32_NATIVE */
-#endif /* HAVE_UNAME */
-}
-
-/*****************************************************************
   basename() replacement that always takes const parameter.
   POSIX basename() modifies its parameter, GNU one does not.
   Ideally we would like to use GNU one, when available, directly

Modified: branches/S2_6/utility/support.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/support.h?rev=32359&r1=32358&r2=32359&view=diff
==============================================================================
--- branches/S2_6/utility/support.h     (original)
+++ branches/S2_6/utility/support.h     Mon Apr 11 19:36:58 2016
@@ -173,8 +173,6 @@
 char fc_toupper(char c);
 char fc_tolower(char c);
 
-void fc_uname(char *buf, size_t len);
-
 const char *fc_basename(const char *path);
 
 int fc_at_quick_exit(void (*func)(void));


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to