]> andersk Git - moira.git/blobdiff - include/moira.h
missed 2 classes in CLASSES; now make clean really does.
[moira.git] / include / moira.h
index 0f6b5266c937aaf3583bef8f9173d6e1a2d40f19..49983ea0153e3f9dfb0a532c3241ab1674e87528 100644 (file)
@@ -7,13 +7,23 @@
 #ifndef _moira_h_
 #define _moira_h_
 
-/* return values from queries (and error codes) */
+#ifdef _WIN32
+#include <windows.h>
+#ifndef strcasecmp
+#define strcasecmp      stricmp
+#endif
+#ifndef snprintf
+#define snprintf      _snprintf
+#endif
+#endif /*_WIN32 */
 
+/* return values from queries (and error codes) */
+#include <sys/types.h>
 #include <com_err.h>
 #include "mr_et.h"
 #include "krb_et.h"
-#include "gdss_et.h"
 #include "ureg_err.h"
+
 #define MR_SUCCESS 0           /* Query was successful */
 
 #define MR_VERSION_1 1         /* Version in use from 7/87 to 4/88 */
@@ -35,7 +45,9 @@
 #define MR_ACCESS 4
 #define MR_DO_UPDATE 5
 #define MR_MOTD 6
-#define MR_MAX_PROC 6
+#define MR_PROXY 7
+#define MR_SETVERSION 8
+#define MR_MAX_PROC 8
 
 /* values used in NFS physical flags */
 #define MR_FS_STUDENT  0x0001
@@ -86,9 +98,7 @@ void LookForSt(char *nm);
 void LookForO(char *nm);
 void TrimTrailingSpace(char *ip);
 void GetMidInit(char *nm, char *mi);
-
-/* prototypes from gdss_convert.c */
-int gdss2et(int code);
+void RemoveHyphens(char *str);
 
 /* prototypes from hash.c */
 struct hash *create_hash(int size);
@@ -100,10 +110,6 @@ void hash_step(struct hash *h, void (*callback)(int, void *, void *),
               void *hint);
 void hash_destroy(struct hash *h);
 
-/* prototypes from idno.c */
-void RemoveHyphens(char *str);
-void EncryptID(char *sbuf, char *idnumber, char *first, char *last);
-
 /* prototypes from kname_unparse.c */
 char *kname_unparse(char *p, char *i, char *r);
 
@@ -121,6 +127,7 @@ int sq_save_unique_string(struct save_queue *sq, char *data);
    pointer to a pointer */
 int sq_get_data(struct save_queue *sq, void *data);
 int sq_remove_data(struct save_queue *sq, void *data);
+void sq_remove_last_data(struct save_queue *sq);
 int sq_empty(struct save_queue *sq);
 void sq_destroy(struct save_queue *sq);
 
@@ -129,6 +136,13 @@ char *strtrim(char *s);
 char *uppercase(char *s);
 char *lowercase(char *s);
 
+#ifndef HAVE_STRLCPY
+size_t strlcpy(char *dst, const char *src, size_t size);
+#endif
+#ifndef HAVE_STRLCAT
+size_t strlcat(char *dst, const char *src, size_t size);
+#endif
+
 /* mr_ functions */
 int mr_access(char *handle, int argc, char **argv);
 int mr_auth(char *prog);
@@ -138,15 +152,21 @@ int mr_do_update(void);
 int mr_host(char *host, int size);
 int mr_motd(char **motd);
 int mr_noop(void);
+int mr_proxy(char *principal, char *orig_authtype);
 int mr_query(char *handle, int argc, char **argv,
             int (*callback)(int, char **, void *), void *callarg);
+int mr_version(int version);
 
 /* error-name backward compatibility */
 #define MR_INGRES_ERR          MR_DBMS_ERR
 #define MR_INGRES_SOFTFAIL     MR_DBMS_SOFTFAIL
 
 
-#ifndef __GNUC__
+#ifdef __GNUC__
+#if __GNUC_MINOR__ < 7
+#define __attribute__(x)
+#endif
+#else /* ! __GNUC __ */
 #define __attribute__(x)
 #endif
 
This page took 0.039998 seconds and 4 git commands to generate.