forked from mirrors/tftp-hpa-google
		
	A few more renames; fix <inttypes.h> emulation.
This commit is contained in:
		
							parent
							
								
									cba23571e2
								
							
						
					
					
						commit
						b46e220d49
					
				
					 4 changed files with 14 additions and 14 deletions
				
			
		
							
								
								
									
										12
									
								
								config.h
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								config.h
									
										
									
									
									
								
							| 
						 | 
					@ -81,18 +81,18 @@
 | 
				
			||||||
#ifdef HAVE_LONG_LONG
 | 
					#ifdef HAVE_LONG_LONG
 | 
				
			||||||
typedef long long intmax_t;
 | 
					typedef long long intmax_t;
 | 
				
			||||||
typedef unsigned long long uintmax_t;
 | 
					typedef unsigned long long uintmax_t;
 | 
				
			||||||
#define PRIdMAX	"%Ld"
 | 
					#define PRIdMAX	"Ld"
 | 
				
			||||||
#define PRIuMAX "%Lu"
 | 
					#define PRIuMAX "Lu"
 | 
				
			||||||
#define PRIxMAX "%Lx"
 | 
					#define PRIxMAX "Lx"
 | 
				
			||||||
#define INTMAX_C(x)  (x##LL)
 | 
					#define INTMAX_C(x)  (x##LL)
 | 
				
			||||||
#define UINTMAX_C(x) (x##ULL)
 | 
					#define UINTMAX_C(x) (x##ULL)
 | 
				
			||||||
#define strtoumax(p,e,b) strtoull(p,e,b)
 | 
					#define strtoumax(p,e,b) strtoull(p,e,b)
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
typedef long intmax_t;
 | 
					typedef long intmax_t;
 | 
				
			||||||
typedef unsigned long uintmax_t;
 | 
					typedef unsigned long uintmax_t;
 | 
				
			||||||
#define PRIdMAX "%ld"
 | 
					#define PRIdMAX "ld"
 | 
				
			||||||
#define PRIuMAX "%lu"
 | 
					#define PRIuMAX "lu"
 | 
				
			||||||
#define PRIxMAX "%lx"
 | 
					#define PRIxMAX "lx"
 | 
				
			||||||
#define INTMAX_C(x)  (x##L)
 | 
					#define INTMAX_C(x)  (x##L)
 | 
				
			||||||
#define UINTMAX_C(x) (x##UL)
 | 
					#define UINTMAX_C(x) (x##UL)
 | 
				
			||||||
#define strtoumax(p,e,b) strtoul(p,e,b)
 | 
					#define strtoumax(p,e,b) strtoul(p,e,b)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -41,7 +41,7 @@
 | 
				
			||||||
#ifndef RECVFILE_H
 | 
					#ifndef RECVFILE_H
 | 
				
			||||||
#define RECVFILE_H
 | 
					#define RECVFILE_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void	recvfile (int, char *, char *);
 | 
					void	tftp_recvfile (int, char *, char *);
 | 
				
			||||||
void	sendfile (int, char *, char *);
 | 
					void	tftp_sendfile (int, char *, char *);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -385,7 +385,7 @@ put(int argc, char *argv[])
 | 
				
			||||||
			printf("putting %s to %s:%s [%s]\n",
 | 
								printf("putting %s to %s:%s [%s]\n",
 | 
				
			||||||
				cp, hostname, targ, mode);
 | 
									cp, hostname, targ, mode);
 | 
				
			||||||
		peeraddr.sin_port = port;
 | 
							peeraddr.sin_port = port;
 | 
				
			||||||
		sendfile(fd, targ, mode);
 | 
							tftp_sendfile(fd, targ, mode);
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
				/* this assumes the target is a directory */
 | 
									/* this assumes the target is a directory */
 | 
				
			||||||
| 
						 | 
					@ -403,7 +403,7 @@ put(int argc, char *argv[])
 | 
				
			||||||
			printf("putting %s to %s:%s [%s]\n",
 | 
								printf("putting %s to %s:%s [%s]\n",
 | 
				
			||||||
				argv[n], hostname, targ, mode);
 | 
									argv[n], hostname, targ, mode);
 | 
				
			||||||
		peeraddr.sin_port = port;
 | 
							peeraddr.sin_port = port;
 | 
				
			||||||
		sendfile(fd, targ, mode);
 | 
							tftp_sendfile(fd, targ, mode);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -475,7 +475,7 @@ get(int argc, char *argv[])
 | 
				
			||||||
				printf("getting from %s:%s to %s [%s]\n",
 | 
									printf("getting from %s:%s to %s [%s]\n",
 | 
				
			||||||
					hostname, src, cp, mode);
 | 
										hostname, src, cp, mode);
 | 
				
			||||||
			peeraddr.sin_port = port;
 | 
								peeraddr.sin_port = port;
 | 
				
			||||||
			recvfile(fd, src, mode);
 | 
								tftp_recvfile(fd, src, mode);
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		cp = tail(src);         /* new .. jdg */
 | 
							cp = tail(src);         /* new .. jdg */
 | 
				
			||||||
| 
						 | 
					@ -488,7 +488,7 @@ get(int argc, char *argv[])
 | 
				
			||||||
			printf("getting from %s:%s to %s [%s]\n",
 | 
								printf("getting from %s:%s to %s [%s]\n",
 | 
				
			||||||
				hostname, src, cp, mode);
 | 
									hostname, src, cp, mode);
 | 
				
			||||||
		peeraddr.sin_port = port;
 | 
							peeraddr.sin_port = port;
 | 
				
			||||||
		recvfile(fd, src, mode);
 | 
							tftp_recvfile(fd, src, mode);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -110,7 +110,7 @@ static void tpacket(const char *, struct tftphdr *, int);
 | 
				
			||||||
 * Send the requested file.
 | 
					 * Send the requested file.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
sendfile(int fd, char *name, char *mode)
 | 
					tftp_sendfile(int fd, char *name, char *mode)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct tftphdr *ap;	   /* data and ack packets */
 | 
						struct tftphdr *ap;	   /* data and ack packets */
 | 
				
			||||||
	struct tftphdr *dp;
 | 
						struct tftphdr *dp;
 | 
				
			||||||
| 
						 | 
					@ -212,7 +212,7 @@ abort:
 | 
				
			||||||
 * Receive a file.
 | 
					 * Receive a file.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
recvfile(int fd, char *name, char *mode)
 | 
					tftp_recvfile(int fd, char *name, char *mode)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct tftphdr *ap;
 | 
						struct tftphdr *ap;
 | 
				
			||||||
	struct tftphdr *dp;
 | 
						struct tftphdr *dp;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue