mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-31 07:04:20 +00:00 
			
		
		
		
	Build for mac os without significant changes of master's code (insead of osx branch). A bit later I can provide signed binary build for osx.
This commit is contained in:
		
							
								
								
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -42,3 +42,8 @@ Makefile* | ||||
| # Excludes compiled files | ||||
| imports | ||||
| cool-retro-term | ||||
|  | ||||
| # Mac OSX | ||||
|  | ||||
| .DS_Store | ||||
| *.app | ||||
|   | ||||
| @@ -6,7 +6,10 @@ TEMPLATE = lib | ||||
| CONFIG += qt plugin hide_symbols | ||||
| QT += qml quick widgets | ||||
|  | ||||
| DEFINES += HAVE_POSIX_OPENPT HAVE_SYS_TIME_H HAVE_UPDWTMPX | ||||
| DEFINES += HAVE_POSIX_OPENPT HAVE_SYS_TIME_H | ||||
|  | ||||
| !macx:DEFINES += HAVE_UPDWTMPX | ||||
| macx:DEFINES += HAVE_UTMPX HAVE_UT_USER | ||||
|  | ||||
| #MANUALY DEFINED PLATFORM | ||||
| DEFINES += Q_WS_UBUNTU | ||||
|   | ||||
| @@ -506,7 +506,11 @@ void KPty::login(const char * user, const char * remotehost) | ||||
|     // note: strncpy without terminators _is_ correct here. man 4 utmp | ||||
|  | ||||
|     if (user) { | ||||
| # ifdef HAVE_UT_USER | ||||
|         strncpy(l_struct.ut_user, user, sizeof(l_struct.ut_user)); | ||||
| #elif | ||||
|         strncpy(l_struct.ut_name, user, sizeof(l_struct.ut_name)); | ||||
| #endif | ||||
|     } | ||||
|  | ||||
|     if (remotehost) { | ||||
| @@ -617,7 +621,13 @@ void KPty::logout() | ||||
|     setutent(); | ||||
|     if ((ut = getutline(&l_struct))) { | ||||
| #  endif | ||||
|  | ||||
| # ifdef HAVE_UT_USER | ||||
|         memset(ut->ut_user, 0, sizeof(*ut->ut_user)); | ||||
| #elif | ||||
|         memset(ut->ut_name, 0, sizeof(*ut->ut_name)); | ||||
| #endif | ||||
|  | ||||
|         memset(ut->ut_host, 0, sizeof(*ut->ut_host)); | ||||
| #  ifdef HAVE_STRUCT_UTMP_UT_SYSLEN | ||||
|         ut->ut_syslen = 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user