facebook / facebook/rocksdb

RocksDB fails to compile on linux platforms when -Wundef

Open
#3,690 1 comment 0 reactions 1 assignee Claimed by @ajkr View on GitHub
Dominant language
C++
Stars
32.1k
Forks
6.9k
Avg merge
32m
Merged PRs (30d)
1

Description

> Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://www.facebook.com/groups/rocksdb.dev

### Expected behavior
Expect proper macro utilization

### Actual behavior
```
.../rocksdb/include/rocksdb/sst_file_writer.h:20:7: warning: "_WIN32" is not defined [-Wundef]
#elif _WIN32
^
```
```
.../rocksdb/include/rocksdb/db.h:37:7: warning: "_WIN32" is not defined [-Wundef]
#elif _WIN32
^
```
```
.../rocksdb/include/rocksdb/utilities/utility_db.h:24:7: warning: "_WIN32" is not defined [-Wundef]
#elif _WIN32
^
```
### Steps to reproduce the behavior
These should be something like
```
#else if defined(_WIN32) && _WIN32
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.