summaryrefslogtreecommitdiff
path: root/src/mingw_functions.c
diff options
context:
space:
mode:
authorBryan Ischo <bryan@ischo.com>2008-12-30 12:29:54 +0000
committerBryan Ischo <bryan@ischo.com>2008-12-30 12:29:54 +0000
commit203d33fdb7778080865879fb173f52009652fbd7 (patch)
tree60bf716f3cf955ae2897483aa7f27eb15a7090bd /src/mingw_functions.c
parent37d90995389c2aed1d37b7b3aa6215759e14b94a (diff)
downloadceph-libs3-203d33fdb7778080865879fb173f52009652fbd7.tar.gz
* Undid my last change. Now I realize why you should only ever use spaces
in code indentations (because it's impossible to get everything to line up if tabs of arbitrary width are used), and so I'm reverting back to spaces for everything.
Diffstat (limited to 'src/mingw_functions.c')
-rw-r--r--src/mingw_functions.c114
1 files changed, 57 insertions, 57 deletions
diff --git a/src/mingw_functions.c b/src/mingw_functions.c
index fb3ec4d..0e2b7b2 100644
--- a/src/mingw_functions.c
+++ b/src/mingw_functions.c
@@ -29,91 +29,91 @@
unsigned long pthread_self()
{
- return (unsigned long) GetCurrentThreadId();
+ return (unsigned long) GetCurrentThreadId();
}
int pthread_mutex_init(pthread_mutex_t *mutex, void *v)
{
- (void) v;
+ (void) v;
- InitializeCriticalSection(&(mutex->criticalSection));
+ InitializeCriticalSection(&(mutex->criticalSection));
- return 0;
+ return 0;
}
int pthread_mutex_lock(pthread_mutex_t *mutex)
{
- EnterCriticalSection(&(mutex->criticalSection));
+ EnterCriticalSection(&(mutex->criticalSection));
- return 0;
+ return 0;
}
int pthread_mutex_unlock(pthread_mutex_t *mutex)
{
- LeaveCriticalSection(&(mutex->criticalSection));
+ LeaveCriticalSection(&(mutex->criticalSection));
- return 0;
+ return 0;
}
int pthread_mutex_destroy(pthread_mutex_t *mutex)
{
- DeleteCriticalSection(&(mutex->criticalSection));
+ DeleteCriticalSection(&(mutex->criticalSection));
- return 0;
+ return 0;
}
int uname(struct utsname *u)
{
- OSVERSIONINFO info;
- info.dwOSVersionInfoSize = sizeof(info);
-
- if (!GetVersionEx(&info)) {
- return -1;
- }
-
- u->machine = "";
-
- switch (info.dwMajorVersion) {
- case 4:
- switch (info.dwMinorVersion) {
- case 0:
- u->sysname = "Microsoft Windows NT 4.0";
- break;
- case 10:
- u->sysname = "Microsoft Windows 98";
- break;
- case 90:
- u->sysname = "Microsoft Windows Me";
- break;
- default:
- return -1;
- }
- break;
-
- case 5:
- switch (info.dwMinorVersion) {
- case 0:
- u->sysname = "Microsoft Windows 2000";
- break;
- case 1:
- u->sysname = "Microsoft Windows XP";
- break;
- case 2:
- u->sysname = "Microsoft Server 2003";
- break;
- default:
- return -1;
- }
- break;
-
- default:
- return -1;
- }
-
- return 0;
+ OSVERSIONINFO info;
+ info.dwOSVersionInfoSize = sizeof(info);
+
+ if (!GetVersionEx(&info)) {
+ return -1;
+ }
+
+ u->machine = "";
+
+ switch (info.dwMajorVersion) {
+ case 4:
+ switch (info.dwMinorVersion) {
+ case 0:
+ u->sysname = "Microsoft Windows NT 4.0";
+ break;
+ case 10:
+ u->sysname = "Microsoft Windows 98";
+ break;
+ case 90:
+ u->sysname = "Microsoft Windows Me";
+ break;
+ default:
+ return -1;
+ }
+ break;
+
+ case 5:
+ switch (info.dwMinorVersion) {
+ case 0:
+ u->sysname = "Microsoft Windows 2000";
+ break;
+ case 1:
+ u->sysname = "Microsoft Windows XP";
+ break;
+ case 2:
+ u->sysname = "Microsoft Server 2003";
+ break;
+ default:
+ return -1;
+ }
+ break;
+
+ default:
+ return -1;
+ }
+
+ return 0;
}