Applied coding rule
[platform/core/system/setup-adaptor.git] / src / sa_common.h
1 /*
2  * Copyright (c) 2016-2017 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #ifndef __SA_COMMON_H__
17 #define __SA_COMMON_H__
18
19 #include <unistd.h>
20 #include <dlog.h>
21
22 #ifdef LOG_TAG
23 #undef LOG_TAG
24 #endif
25
26 #define LOG_TAG "SETUP-ADAPTOR"
27
28 #ifdef MIN
29 #undef MIN
30 #endif
31
32 #define MIN(X, Y) ((X) < (Y) ? (X) : (Y))
33 #ifndef TRUE
34 #define TRUE 1
35 #endif
36 #ifndef FALSE
37 #define FALSE 0
38 #endif
39
40 #define _E(fmt, arg...) LOGE(fmt, ##arg)
41 #define _D(fmt, arg...) LOGD(fmt, ##arg)
42 #define _W(fmt, arg...) LOGW(fmt, ##arg)
43
44 #endif                                                  /* __SA_COMMON_H__ */