-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlatform.cpp
More file actions
37 lines (31 loc) · 876 Bytes
/
Platform.cpp
File metadata and controls
37 lines (31 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Version 3, 29 June 2007
//
// Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
//
// Everyone is permitted to copy and distribute verbatim copies of this license
// document, but changing it is not allowed.
//
// This version of the GNU Lesser General Public License incorporates the terms
// and conditions of version 3 of the GNU General Public License, supplemented
// by the additional permissions listed below.
#include "stdafx.h"
#include "Platform.h"
#ifdef _WIN32
#include <Windows.h>
#endif
int GetLastSystemError() {
#ifdef _WIN32
return ::GetLastError();
#else
return errno;
#endif
}
void DumpSystemError(const char* error) {
#ifdef _WIN32
::OutputDebugString(error);
::MessageBox(NULL, error, _T("Mpeg Audio Info Error"),
MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
fprintf(stderr, "mp3: %s\n", error);
#endif
}