aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/api/testdata/static-lib-deps/d.cpp
blob: 07d7197ce6f5d6e3472b8e0e68a5e9e8441e7849 (plain)
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
#ifdef WITH_PTHREAD
#include <pthread.h>
#elif defined(WITH_LEX_YACC)
extern "C" int yywrap(void);
extern "C" void yyerror(char const *s);
#elif defined(WITH_SETUPAPI)
#include <windows.h>
#include <Setupapi.h>
#endif

void b();
void c();

int d()
{
    b();
    c();

#ifdef WITH_PTHREAD
    pthread_t self = pthread_self();
    return static_cast<int>(self);
#elif defined(WITH_LEX_YACC)
    yywrap();
    yyerror("no error");
    return 0;
#elif defined(WITH_SETUPAPI)
    CABINET_INFO ci;
    ci.SetId = 0;
    SetupIterateCabinet(L"invalid-file-path", 0, NULL, NULL);
    return ci.SetId;
#else
    return 0;
#endif
}