summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/X11/Xauth.h35
1 files changed, 31 insertions, 4 deletions
diff --git a/include/X11/Xauth.h b/include/X11/Xauth.h
index a51bc72..bd558eb 100644
--- a/include/X11/Xauth.h
+++ b/include/X11/Xauth.h
@@ -67,12 +67,34 @@ typedef struct xauth {
_XFUNCPROTOBEGIN
+#ifndef __has_attribute
+# define __has_attribute(x) 0 /* Compatibility with older compilers */
+#endif
+
+#if __has_attribute(access)
+# define XAU_ACCESS_ATTRIBUTE(X) __attribute__((access X))
+#else
+# define XAU_ACCESS_ATTRIBUTE(X)
+#endif
+
+#if __has_attribute(malloc)
+# define XAU_MALLOC_ATTRIBUTE(X) __attribute__((malloc X))
+#else
+# define XAU_MALLOC_ATTRIBUTE(X)
+#endif
+
char *XauFileName(void);
+void XauDisposeAuth(
+Xauth* /* auth */
+);
+
+XAU_MALLOC_ATTRIBUTE((XauDisposeAuth, 1))
Xauth *XauReadAuth(
FILE* /* auth_file */
);
+XAU_ACCESS_ATTRIBUTE((read_only, 1)) /* file_name */
int XauLockAuth(
_Xconst char* /* file_name */,
int /* retries */,
@@ -80,15 +102,20 @@ int /* timeout */,
long /* dead */
);
+XAU_ACCESS_ATTRIBUTE((read_only, 1)) /* file_name */
int XauUnlockAuth(
_Xconst char* /* file_name */
);
+XAU_ACCESS_ATTRIBUTE((read_only, 2)) /* auth */
int XauWriteAuth(
FILE* /* auth_file */,
Xauth* /* auth */
);
+XAU_ACCESS_ATTRIBUTE((read_only, 3, 2)) /* address */
+XAU_ACCESS_ATTRIBUTE((read_only, 5, 4)) /* number */
+XAU_ACCESS_ATTRIBUTE((read_only, 7, 6)) /* name */
Xauth *XauGetAuthByAddr(
#if NeedWidePrototypes
unsigned int /* family */,
@@ -112,6 +139,10 @@ unsigned short /* name_length */,
_Xconst char* /* name */
);
+XAU_ACCESS_ATTRIBUTE((read_only, 3, 2)) /* address */
+XAU_ACCESS_ATTRIBUTE((read_only, 5, 4)) /* number */
+XAU_ACCESS_ATTRIBUTE((read_only, 7, 6)) /* type_names */
+XAU_ACCESS_ATTRIBUTE((read_only, 8, 6)) /* type_lengths */
Xauth *XauGetBestAuthByAddr(
#if NeedWidePrototypes
unsigned int /* family */,
@@ -132,10 +163,6 @@ char** /* type_names */,
_Xconst int* /* type_lengths */
);
-void XauDisposeAuth(
-Xauth* /* auth */
-);
-
_XFUNCPROTOEND
/* Return values from XauLockAuth */