rand-egd.o rand-timer.o rand-unix.o rand.o rc2.o rc4.o \
rijndael-alg-fst.o rnd_keys.o sha.o sha256.o sha512.o ui.o \
validate.o \
- cloexec.o ct.o issuid.o net_read.o net_write.o warnerr.o
+ cloexec.o ct.o issuid.o net_read.o net_write.o snprintf.o \
+ warnerr.o
OBJECTS = $(COMMON_OBJS) rand-fortuna.o $(ROKEN_LIBOBJS)
net_write.o: ${UPSTREAM}/roken/net_write.c
$(AFS_CCRULE) $(UPSTREAM)/roken/net_write.c
+# The upstream snprintf.c has some pointer warnings in it
+CFLAGS_snprintf.o = @CFLAGS_NOERROR@
+
+snprintf.o: ${UPSTREAM}/roken/snprintf.c
+ $(AFS_CCRULE) $(UPSTREAM)/roken/snprintf.c
+
# These bits of libroken are compatibility functions. They should get moved
# out into a new libroken top level target, which allows the use of an
# existing libroken, if one is available.
#endif
#endif
+#ifndef HAVE___ATTRIBUTE__
+#define __attribute__(x)
+#endif
+
typedef int rk_socket_t;
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL issuid(void);
+#if !defined(HAVE_SNPRINTF) || defined(NEED_SNPRINTF_PROTO)
+#ifndef HAVE_SNPRINTF
+#define snprintf rk_snprintf
+#endif
+ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
+ rk_snprintf (char *, size_t, const char *, ...)
+ __attribute__ ((format (printf, 3, 4)));
+#endif
+
+#if !defined(HAVE_VSNPRINTF) || defined(NEED_VSNPRINTF_PROTO)
+#ifndef HAVE_VSNPRINTF
+#define vsnprintf rk_vsnprintf
+#endif
+ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
+ rk_vsnprintf (char *, size_t, const char *, va_list)
+ __attribute__((format (printf, 3, 0)));
+#endif
+
+#if !defined(HAVE_ASPRINTF) || defined(NEED_ASPRINTF_PROTO)
+#ifndef HAVE_ASPRINTF
+#define asprintf rk_asprintf
+#endif
+ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
+ rk_asprintf (char **, const char *, ...)
+ __attribute__ ((format (printf, 2, 3)));
+#endif
+
+#if !defined(HAVE_VASPRINTF) || defined(NEED_VASPRINTF_PROTO)
+#ifndef HAVE_VASPRINTF
+#define vasprintf rk_vasprintf
+#endif
+ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
+ rk_vasprintf (char **, const char *, va_list)
+ __attribute__((format (printf, 2, 0)));
+#endif
+
+#if !defined(HAVE_ASNPRINTF) || defined(NEED_ASNPRINTF_PROTO)
+#ifndef HAVE_ASNPRINTF
+#define asnprintf rk_asnprintf
+#endif
+ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
+ rk_asnprintf (char **, size_t, const char *, ...)
+ __attribute__ ((format (printf, 3, 4)));
+#endif
+
+#if !defined(HAVE_VASNPRINTF) || defined(NEED_VASNPRINTF_PROTO)
+#ifndef HAVE_VASNPRINTF
+#define vasnprintf rk_vasnprintf
+#endif
+ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
+ vasnprintf (char **, size_t, const char *, va_list)
+ __attribute__((format (printf, 3, 0)));
+#endif
+
#ifndef HAVE_STRLCPY
#define strlcpy rk_strlcpy
ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
#define _PATH_DEVNULL "/dev/null"
#endif
+
#endif /* OPENAFS_ROKEN_H */
OBJECTS = $(ROKEN_LIBOBJS) \
cloexec.o ct.o hex.o issuid.o net_read.o net_write.o socket.o \
- warnerr.o
+ snprintf.o warnerr.o
$(TOP_LIBDIR)/$(SHLIBOBJ): $(SHLIBOBJ)
$(TOP_OBJDIR)/src/config/shlib-install -d $(TOP_LIBDIR) \
socket.o: ${UPSTREAM}/socket.c
$(AFS_CCRULE) $(UPSTREAM)/socket.c
+# The upstream snprintf.c has some pointer warnings in it
+CFLAGS_snprintf.o = @CFLAGS_NOERROR@
+
+snprintf.o: ${UPSTREAM}/snprintf.c
+ $(AFS_CCRULE) $(UPSTREAM)/snprintf.c
+
strlcat.o: ${UPSTREAM}/strlcat.c
$(AFS_CCRULE) $(UPSTREAM)/strlcat.c