Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use of <cinttypes> in memcache.h is C++11 specific #57

Closed
m6w6 opened this issue Jan 20, 2020 · 0 comments
Closed

Use of <cinttypes> in memcache.h is C++11 specific #57

m6w6 opened this issue Jan 20, 2020 · 0 comments

Comments

@m6w6
Copy link
Collaborator

m6w6 commented Jan 20, 2020

Imported from Launchpad using lp2gh.


I have it on good authority (including gcc-4.4.6 on CentOS-6.2) that wasn't added until C++11. Seems like using <inttypes.h> instead would address that simply. (Unless the expectation is that C++11 is required.)

diff --git a/libmemcached-1.0/memcached.h b/libmemcached-1.0/memcached.h
index bc16e73..b258fbe 100644
--- a/libmemcached-1.0/memcached.h
+++ b/libmemcached-1.0/memcached.h
@@ -42,12 +42,12 @@
 #  define __STDC_FORMAT_MACROS
 #endif
 
+#include <inttypes.h>
+
 #ifdef __cplusplus
-#  include <cinttypes>
 #  include <cstddef>
 #  include <cstdlib>
 #else
-#  include <inttypes.h>
 #  include <stddef.h>
 #  include <stdlib.h>
 #  include <stdbool.h>
@m6w6 m6w6 added New and removed New labels Jan 20, 2020
@m6w6 m6w6 closed this as completed in c3ae351 Jan 22, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant